Giter Club home page Giter Club logo

copositive-cutting-plane-max-clique's Introduction

copositive-cutting-plane-max-clique

This code base is using the Julia Language and DrWatson to make a reproducible scientific project named

copositive-cutting-plane-max-clique

To (locally) reproduce this project, do the following:

  1. Download this code base. Notice that raw data are typically not included in the git-history and may need to be downloaded independently.

  2. Set up your conda environment to use dwave-neal:

    > conda create --name "myenv" python=3.9
    > conda activate myenv
    > python -m pip install -r requirements.txt
    
  3. Open a Julia console and do:

    julia> using Pkg
    julia> Pkg.add("DrWatson") # install globally, for using `quickactivate`
    julia> Pkg.activate("path/to/this/project/src/COP")
    julia> Pkg.build("Gurobi") # you may need to set ENV["GUROBI_HOME"] prior if it isn't set
    julia> Pkg.activate("path/to/this/project/")
    julia> Pkg.instantiate()
    

This will install all necessary packages for you to be able to run the julia scripts and everything should work out of the box.

  1. To run the copositive cutting plane algorithm:

    > cd path/to/this/project/scripts
    > julia run_cutting_plane.jl exp_raw --param {#} --anst --neal
    

    Replace {#} with 25, 05, or 75
    --anst runs the cutting plane algorithm with Anstreicher's MILP copositivity formulation
    --neal runs the cutting plane algorithm with dwave neal as the copositivity checker

  2. To run additional benchmarks:

    > python benchmarking.py exp_raw --param {#} --hpo --fixed --gp_cop --gp_mip --dw_mc
    

    Replace {#} with 25, 05, or 75
    --hpo run hyperopt parameter tuning'
    --fixed run fixed neal with 100 sweeps
    --gp_cop run gurobi copositivity check experiment
    --gp_mip run gurobi mip formulations
    --dw_mc run dwave maximum clique sampler

    Note that the graphs are generated in 2. so it needs to be run before 4.

  3. To generate plots: run cells in notebooks/plotting.ipynb

copositive-cutting-plane-max-clique's People

Contributors

robinabrown avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.