GithubHelp home page GithubHelp logo

jonasspinner / weighted-f-free-edge-editing Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 3.18 MB

Thesis project about Weighted F-free Edge Editing. https://www.doi.org/10.5445/IR/1000135117

License: MIT License

CMake 1.31% C++ 71.40% Python 10.01% Jupyter Notebook 17.26% C 0.02%

weighted-f-free-edge-editing's Introduction

Weighted F-free Edge Editing

example-unedited example-edited

Example of a protein-protein interaction network which is edited to be (C4, P4)-free. The connected components can be interpreted as clusters of the original graph.

This is the source code for a bachelor thesis regarding the Weighted F-free Edge Editing Problem [PDF]. We implement exact FPT and ILP algorithms. The FPT algorithm is based on work from [GHS+20] for (unweighted) F-free Edge Editing.

The code was further developed after the thesis was submitted. The project state at the time of submission can be found in commit fa537279.

Setup and Installation

Dependencies

The required dependencies are Boost, YAML CPP and robin-hood-hashing. To clone submodules and install the dependencies execute the following commands:

git submodule update --init --recursive
sudo apt install libboost-all-dev libyaml-cpp-dev

Optional Dependencies

Gurobi is a commercial LP-Solver. It is used for an ILP algorithm as an alternative solver and for Linear Program Relaxation to compute lower bounds for the FPT algorithm. You can get Gurobi here.

nps_mwis is a Maximum Weight Independet Set (MWIS) solver from [NPS18] (website). It is used for computing a subgraph packing to get lower bounds for the FPT algorithm. It can be downloaded by executing extern/nps_mwis/get.sh.

lsswz_mwis is also a MWIS solver used for lower bounds. It is from [LSSWZ18] and the code is not publicly available.

Datasets

The datasets used are protein-protein interaction matrices derived from the biological dataset. The instances must follow the METIS data format for graphs. The datasets can be downloaded and transformed using snakemake.

snakemake -j all \
    data/bio \
    data/bio-C4P4-subset \
    data/bio-subset-A \
    data/bio-subset-B \
    data/bio-unweighted

Alternatively, the required scripts can be executed by hand.

python3 scripts/download_dataset.py --dir data/bio --config data/bio.yaml --biological --max-size 1000
python3 scripts/generate_dataset_subset.py data/bio-C4P4-subset.yaml
...

Building

The project uses CMake for building.

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make fpt

To try out the algorithm you can use this example.

build/fpt --multiplier 100 --F C4P4 \
    --input data/bio/bio-nr-3-size-16.graph \
    --lower-bound SortedGreedy \
    --selector MostAdjacentSubgraphs \
    --search-strategy Fixed --k 500

How to cite

Jonas Spinner. Weighted F-free Edge Editing. Bachelor thesis, Karlsruhe, 2019.
@thesis{Spinner2019,
    author       = {Spinner, Jonas},
    year         = {2019},
    title        = {Weighted F-free Edge Editing},
    doi          = {10.5445/IR/1000135117},
    publisher    = {{Karlsruhe Institute of Technology (KIT)}},
    pagetotal    = {53},
    type         = {Bachelor thesis},
    school       = {Karlsruhe Institute of Technology (KIT)},
    language     = {english}
}

License

This project is licensed under the MIT license. The licenses of external sources can be found in their respective directories.

weighted-f-free-edge-editing's People

Contributors

jonasspinner avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

allehop

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.