Code Monkey home page Code Monkey logo

link-prediction's Introduction

Link predicition in a citation network

Environment setting-up

pyenv virtualenv 3.9.9 link-prediction
pyenv local link-prediction
pip install -r requirements.txt

Database creation

First the graph is preprocessed in order to create a dataset.

This can be done with a script:

python -m src.graph.preprocessing --OPTIONS

Script usage:

usage: preprocessing.py [-h] [--subgraphratio SUBGRAPHRATIO]
                        [--tainsetratio TAINSETRATIO]

optional arguments:
  -h, --help            show this help message and exit
  --subgraphratio SUBGRAPHRATIO
                        Part of the graph to use
  --tainsetratio TAINSETRATIO
                        Ratio of the training part of the dataset

Run experiments

The main script can be called this way:

python -m src.run_experiment --OPTIONS

Script usage:

usage: run_experiment.py [-h] [--metadata_features | --no-metadata_features]
                         [--graph_features | --no-graph_features]
                         [--graph_learned_features | --no-graph_learned_features]
                         [--tfidf | --no-tfidf] [--experiment EXPERIMENT]
                         [--classification {nn,lr,rf,xgboost,svm}]
                         [--submission_name SUBMISSION_NAME]

optional arguments:
  -h, --help            show this help message and exit
  --metadata_features, --no-metadata_features
                        Add the option for using metadata features (authors,
                        years, title) (default: False)
  --graph_features, --no-graph_features
                        Add the option for using basic graph features
                        (default: False)
  --graph_learned_features, --no-graph_learned_features
                        Add the option for using advanced learned graph
                        features with Word2Vec (default: False)
  --tfidf, --no-tfidf   Add the option for using advanced textual information
                        from the abstract with TFIDF (default: False)
  --experiment EXPERIMENT
                        Choose the experiment
  --classification {nn,lr,rf,xgboost,svm}
                        Choose a classifier

link-prediction's People

Contributors

maximecharpentierdata avatar

Watchers

 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.