GithubHelp home page GithubHelp logo

braph-software / braph-2 Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 12.0 1.11 GB

BRAPH 2.0 is a comprehensive software package for the analysis and visualization of brain connectivity data, offering flexible customization, rich visualization capabilities, and a platform for collaboration in neuroscience research.

Home Page: http://braph.org

License: Other

MATLAB 96.27% C++ 0.16% Rich Text Format 2.58% TeX 0.99%
biomedical-engineering brain-connectivity-analysis brain-research computational-neuroscience connectomics data-analysis data-science data-visualization deep-learning graph-theory machine-learning matlab network-analysis neuroimaging neuroscience open-source reproducible-research research-tools scientific-software toolbox

braph-2's Issues

distance

  • Add distance() to Graph as abstract method

Implement it in all kinds of graphs:

  • GraphBU

  • GraphBD

  • GraphWU

  • GraphWD

  • add concrete method to Graph getDistance()

  • add test

Code Degree, InDegree, OutDegree

Code Degree as child of Measure for BU and WU (same obj.)

Code InDegree and OutDegree as child of Measure for BD and WD (two obj.)

Add list of measures

Mite, please:

  • check and add all measures (as separated) issues from
    https://sites.google.com/site/bctnet/measures/list
    Start with those already implemented in the Braph 1.0

  • check that all measure can be either nodal (vector) or global (scalar) -- maybe we need to introduce new kinds of datatypes, in which case we need to discuss

Normalization

  • add function normalize(A, 'NormalizeRule', RULE) to graph
    RULE can be 'rescale' (A/max(A)) or 'one'|1 (A<0 = 0 and A>1 = 1).

  • Comment function

  • Check this i the constructors of GraphWD (and therefore WU)

  • Explain this in the getDescription() of GraphWD and GraphWU

  • create test_normalize

Calculate Betweeness centrality

Calculate the Betweeness centrality of a node.

The code in Braph 1 currently uses Kintali algorithm (same as BCT). Try to check if there is something else available, if not, the same algorithm can be implemented.

Test Graph.copy()

Write test code for Graph.copy()
It should check that it does a deep copy of the graph, including all measures and references to the graph in the measures.

Bug with the creation of BU/BD graphs

I was not sure where to submit this so I submit this bug as an issue.

When the BU/BD graphs are created, the matrix A associated with the graph is turned into logical matrix (accessed by the getA() method). This creates a problem with the performance of matrix multiplication in the measures (gives the following error: Error using *
Both logical arguments must be scalar. Use TIMES (.*) for elementwise multiplication.)
I double checked, and I think the problem is in the implementation of the function binarize.

What do you think? Should this be changed?

Calculate Global efficiency

Based on the distance matrix, calculate the global efficiency of the nodes (for BD and WD graphs, In and Out Global efficiencies).

Calculate Transitivity

Calculate Transitivity for a graph.

Transitivity can be calculated for BD, BU, WD and WU graphs. It is a global measure.

Write the associated test functions.

Calculate Local efficiency

After implementing the Global efficiency measure, implement local efficiency (which is defined as the global efficiency on the subgraph of node neighbors - nodal measure).

This needs to implemented with care, because the current algorithm in Braph is a bit slow, making the local efficiency generally a limiting factor for these calculations.

Implement also the In and Out Local efficiency (nodal measures).

Implement the global counterparts of these 3 measures.

test_symmetrize

test that a matrix get symmetric, also with each of the rules

Test Graph + children

Write test scripts:

  • test_Graph
  • test_GraphBD
  • test_GraphBU
  • test_GraphWD
  • test_GraphWU

Test Degrees and Strengths

Write test scripts:

  • Degree
  • DegreeAv
  • InDegree
  • InDegreeAv
  • OutDegree
  • OutDegreeAv
  • Strength
  • StrengthAv
  • InStrength
  • InStrengthAv
  • OutStrength
  • OutStrengthAv

Distance measured in edges

  • Measure corresponding to matrix B in the distance for W matrices

  • test function

  • check if revision of Distance is needed

Community Structure of a Graph

Calculate a community structure of a graph. Also write the corresponding test function.

For the calculation, two parameters need to be passed: algorithm that will be used in calculation (Louvain and Newman) and gamma parameters (that defines the resolution of the community).

Issues to decide:

  1. How the community will be implemented for a graph. It is not nodal or global measure in the traditional sense, but the output is indeed a number for each node (number of community to which it participates).
  2. Whether to use the optimization procedure described in other toolboxes. The procedure entails calculating the community structure few times (typically 10 or 100) and use the structure that produces maximum modularity.

Calculate Path Length

Using the distance function, calculate path length of each node.

Path length can be calculated for BU and WU graph. For BD and WD graphs, calculate In and Out - path length for all nodes.

For binary graphs, path length is based on the number of edges needing to reach one node starting from the other. For weighted graphs, the calculation is based on the weights of the edges (Dijkstra's algorithm). Since we have distance based on the number of edges, maybe this variant can be implemented for weighted graphs also.

Calculate Path length - Global

Calculate the path length of a graph (BU, WU graphs). Calculate the In and Out - path length of the graph in the case of BD and WD graphs.

The path length is simply the average of the nodal path lengths for all nodes in the graph. The average can be performed in three ways:

  1. Simple average
  2. within connected subgraphs
  3. Harmonic mean

Once these are implemented, we can discuss about additional ways to perform the averaging procedure. Also, if a graph is disconnected, path length calculated as 1) returns NaN. Based on what we need, we can have additional ways to deal with it (return 0, output warning, etc..).

Restructure auxiliary functions Graph

  • remove_diagonal -> dediagonalize

  • remove_negative_weights -> semipositivize

create/check test functions:

  • test_dediagonalize

  • test_symmetrize

  • test_semipositivize

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.