Giter Site home page Giter Site logo

graph-classification-with-tda's Introduction

Graph Classification with TDA

This repository contains the code used for my Lab Rotation in the MLCB Lab at ETH Zürich. The goal was to use Persistent Homology for graph classification.

Dependencies

A pyproject.toml file is provided, which means that you can install the dependencies using poetry. Note that it requires the pyper library, which for now is in a private repository.

Quick Demo

The notebook quick_demo.ipynb can be used to easily generate persistence images and use them for classification with random forests. It can be used to evaluate the performance on one dataset for one set of parameters.

Evaluating several methods on numerous datasets

The performance of each method is evaluated by running 10 times a 10-fold nested cross-validation on all the datasets. This takes a long time, especially for large datasets like REDDIT-MULTI-12K. That's why I performed the evaluations in parallel on a cluster (EULER). The script evaluate.py evaluates one method for one dataset and stores the result in a single file. I used simple shell scripts to submit this script with different sets of parameters. Then, the script merge_results.py can be used to aggregate all the results into a single csv file.

Datasets

I downloaded graph datasets from https://chrsmrrs.github.io/datasets/docs/datasets/ and I converted them to pickle files in igraph format (one graph per file). The converted graphs are provided in tests/Datasets/preprocessed. It is also possible to use the script convert_graphs.py in tests/Datasets to convert any graph dataset downloaded from TUDatasets.

graph-classification-with-tda's People

Contributors

e-sollier avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

raghavsriram72

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.