GithubHelp home page GithubHelp logo

auranic / elastic-principal-graphs Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 6.0 25.08 MB

Matlab implementation of the Elastic Principal Graphs (ElPiGraph) method

License: GNU General Public License v3.0

MATLAB 99.92% Batchfile 0.01% Mathematica 0.07%

elastic-principal-graphs's Introduction

Elastic principal graphs

Matlab implementation of Elastic Principal Graphs (ElPiGraph) method.

To overview the features of the method, make ElPiGraph working directory, and execute

 setallpaths; 
 basicCodeTest;

Basic self-contained formal description of ElPiGraph can be found here.

Principal graphs are graphs that are embedded into a high-dimensional space and minimize the distance to the data points, while maximizing some regular properties.

Elastic principal graphs are based on minimization of the energy potential containing three parts :

equation

where MSE is the mean squared error of data approximation, equation - is the sum of squared edge lengths, equation is a term minimizing the deviation of the principal graph embedment from harmonicity (generalization of linearity), equation ,equation are coefficients of regularization.

The structure of the graph is computed by an optimal application of a sequence of graph transformations, using operations from predefined graph grammar. The simplest graph grammar "Bisect an edge", "Add a node to a node" leads to construction of a principal tree.

Read wiki of this repository for more detailed information on the algorithm and examples of its application.

Go to R implementation of elastic principal graphs coded by Luca Albergante.

For more details of elastic principal graph theory read:

Gorban AN and Zinovyev AY. Principal Graphs and Manifolds. In Handbook of Research on Machine Learning Applications and Trends: Algorithms, Methods and Techniques (eds. Olivas E.S., Guererro J.D.M., Sober M.M., Benedito J.R.M., Lopes A.J.S.). Information Science Reference, September 4, 2009.

Gorban A., Sumner N., Zinovyev A. Topological grammars for data approximation. 2007. Applied Mathematics Letters 20(4), 382-386.

Gorban A., Mirkes E., Zinovyev A. Robust principal graphs for data approximation. Archives of Data Science 2(1):1:16, 2017.

Gorban A.N., Zinovyev A. 2010. Principal manifolds and graphs in practice: from molecular biology to dynamical systems. Int J Neural Syst 20(3):219-32.

Organization of the code

Folders:

ElPiGraph/core_algorithm - contains the core MATLAB code of the algorithm (self-contained)

ElPiGraph/core_algorithm_java - old MATLAB wrapper of the Java code for ElPiGraph

ElPiGraph/docs - some documentation on the method and the code

ElPiGraph/examples - some example applications of the method

ElPiGraph/simulations - code generating synthetic datasets (e.g., with known branching topology)

ElPiGraph/test_code - testing critical parts of the code (not needed for the package use)

ElPiGraph/test_data - example datasets

ElPiGraph/utils - utility functions for manipulating data and the graph (e.g., projection function)

ElPiGraph/visualization - utility functions used for visualizing the results of the method application (such as applying metro map layout of the principal tree)

MasterApplet - Java applet implementing several methods for constructing complex data approximators including elastic principal trees. The applet can be run as a standalone jar file.

Functions in the root "ElPiGraph" folder:

computeElasticPrincipalCircle.m - computes closed elastic principal curve with a given number of nodes

computeElasticPrincipalCurve.m - computes elastic principal curve with a given number of nodes

computeElasticPrincipalGraph.m - computes elastic principal graph for a dataset with a given number of nodes and defined set of grammars (principal tree grammar by default)

computeRobustElasticPrincipalGraph.m - computes robust version of elastic principal graph for a dataset with a given number of nodes and defined set of grammars (principal tree grammar by default)

setallpaths.m - set all paths to other folders (needed if some functions are called directly, bypassing the root folder "computeElasticPrincipalXXX.m" functions)

Acknowledgements

Supported by the University of Leicester (UK), Institut Curie (FR), the Ministry of Education and Science of the Russian Federation, project โ„– 14.Y26.31.0022, ITMO Cancer SysBio program (MOSAIC project), INCa PLBIO program (Calys project).

elastic-principal-graphs's People

Contributors

auranic avatar mirkes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

elastic-principal-graphs's Issues

Undefined function 'diag' for input arguments of type 'struct'

Hello! I am new in Matlab. I can't resolve this error, when run basicCodeTest;, can you help me?

Undefined function 'diag' for input arguments of type 'struct'.

Error in PrimitiveElasticGraphEmbedment>ComputeSpringLaplacianMatrix (line 269)
    Mu = diag(ElasticMatrix);

Error in PrimitiveElasticGraphEmbedment (line 116)
    SpringLaplacianMatrix = ComputeSpringLaplacianMatrix(ElasticMatrix);

Error in ApplyOptimalGraphGrammarOperation (line 127)
                PrimitiveElasticGraphEmbedment(data, graph, part);

Error in ElPrincGraph (line 261)
                ApplyOptimalGraphGrammarOperation(data, graph, part,...

Error in computeElasticPrincipalGraph (line 203)
            ElPrincGraph(data_centered, NumNodes, Lambda, Mu, varargin{:});

Error in basicCodeTest (line 7)
[NodePositions,Edges,ReportTable] = computeElasticPrincipalGraph(data,20);

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.