Code Monkey home page Code Monkey logo

photonai_graph's Introduction

Python application Coverage Status Quality Gate Status GitHub Twitter URL

PHOTONAI Graph

photonai-graph

Photon Graph is an extension for the PHOTON framework that allows for the use of machine learning based on graphs. Furthermore, the Graph Utilities contain a wide variety of functions that allow for the visualization and converting of graphs.

Documentation

You can find a detailed documentation here: https://wwu-mmll.github.io/photonai_graph/

Installation

To install photonai-graph create a dedicated conda/python environment and activate it. Then install photonai-graph via

pip install photonai-graph

To be able to use all modules of the toolbox you will still need to install tensorflow, dgl, pytorch and grakel according to your system configuration, for example with

pip install tensorflow
pip install torch
pip install dgl
pip install grakel

For graph embeddings the gem python package is needed, along with tensorflow. Please install tensorflow according to your system.

pip install nxt-gem
pip install tensorflow

For graph kernels the grakel package needs to be installed. You can install grakel via pip.

pip install git+https://github.com/ysig/GraKeL.git@cfd14e0543075308d201327ac778a48643f81095'

For graph neural networks pytorch and deep graph library are required. You can install them via pip

pip install torch
pip install dgl

photonai_graph's People

Contributors

jernsting avatar vholstein avatar nilswinter avatar ksarink avatar julblanke avatar dependabot[bot] avatar

Stargazers

 avatar Nikolaus Schlemm avatar  avatar Ramona Leenings avatar  avatar  avatar  avatar

Watchers

Kostas Georgiou avatar

Forkers

jinfeng-wu

photonai_graph's Issues

Paper: Run TestCase Analyses, Sex and Age

Paper: Run PROTEINS analysis

  • Set up PROTEINS analysis
  • Run PROTEINS analysis
  • Make figure for PROTEINS analysis
  • Select fMRI images with sex and age (decide)
  • Run GCN analysis for sex
  • Run GCN analysis for age
  • Make figure for sex and age

Update setup.py

The setup.py still needs old dependencies.

Update according to requirements.txt

save_networkx_to_file check

All possible export formats have to be tested.
YAML was removed recently because it did not work as expected.

The dot export format is adding a node when reading the generated files.
Please check every output method and remove the export formats that are not working.

GraphMeasures Tests

  • Add test for sporadically failing graphs
    In a list of graphs and by extracting a list of metrics construct a graph in that list where a specific metric will fail to compute and make sure, that the output is as desired.

  • Add tests for extract_measures

Add Documentation and Tests for GraphConstructorSpatial

GraphConstructorSpatial requires a atlas_name_coords.csv. Please provide an example.
Is this constructor intedet for DTI or RestingState data?
Why is the default atlas HO not tested? Why is it not contained in the graph package?

Implement dgl check for graphs with different numbers of nodes

Is your feature request related to a problem? Please describe.
PHOTONAI-Graph only supports dgl graphs with the same number of node features. If you use dgl graphs with varying numbers of nodes/features (eg, dgl mini dataset), the pipeline does not work.

Describe the solution you'd like
Implement a new architecture that uses an MLP to sample down the number of node features to a fixed size. Also build a check that allows for using node degree from within the different architectures.

Additional context
This will be important for version 2.0

Unit Tests
Reimplement these unit tests that use the dgl mini dataset

    def test_gcn_classifier_dgl(self):
        gat_clf = GCNClassifierModel(nn_epochs=20)
        gat_clf.fit(self.X_dgl, self.y)
        output = gat_clf.predict(self.X_dgl)
        self.assertTrue(np.array_equal(np.array(output.shape), self.y.shape))
    def test_gat_classifier_dgl(self):
        gat_clf = GATClassifierModel(nn_epochs=20)
        gat_clf.fit(self.X_dgl, self.y)
        output = gat_clf.predict(self.X_dgl)
        self.assertEqual(output.shape, self.y.shape)

GraphConstructor prep_mtrx order of checks matters?

Lines 83 and following of GraphConstructor are:

    def prep_mtrx(self, adjacency):
        """transforms the matrix according to selected criteria"""
        if self.fisher_transform:
            adjacency = individual_fishertransform(adjacency)
        if self.use_abs:
            adjacency = np.abs(adjacency)
        if self.zscore:
            adjacency = individual_ztransform(adjacency)
        if self.use_abs_zscore:
            adjacency = np.abs(adjacency)

        return adjacency
  • Does the order of this checks matter?
  • Why is the fisher_transform not calculated on the absolute values of the adjacency if np.abs is passed
  • Should there be a use_abs_fisher_transform paramter?
  • Write Tests for all possible combinations of parameters

Rewrite getting started

Why does getting started require such an advanced method for data loading?

Couldn't we simplify this to use for example nx.load (or some other photonai_graph based loader)?

This advanced matlab data loading could be used as a more advanced example.

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.