silvermecer / miprest Goto Github PK
View Code? Open in Web Editor NEWThis project forked from thelahunginjeet/miprest
A package for Mixed PCA/ICA
License: Other
This project forked from thelahunginjeet/miprest
A package for Mixed PCA/ICA
License: Other
Author : Kevin S. Brown ([email protected], github.com/thelahunginjeet), Ameya Akkalkotkar A python package that can be used for Mixed ICA/PCA via the MIPReSt algorithm. See A. Akkalkotkar and K. S. Brown, "An algorithm for separation of mixed sparse and Gaussian sources", Plos ONE, 12(4) e0175775. This package depends on the following additional packages (in addition to standard stuff like numpy, scipy, etc.), all available and actively maintained at github.com/thelahunginjeet: pycar pyica If you use: pip install -r requirements.txt These packages will be installed automatically when miprest is installed. Example usage of the entire pipeline (data to decompose should be in an Nmixtures x Nsamples matrix X): # import necessary modules >>from miprest import miprest,plotting,stopping,pca # initializes with default options (default directory location and options for ica) >>mip = MIPReSt() # uses default options # you can run the parent and decimated decompositions in either order # this block will run 100 2-fold decimations of the input data >>mip.parent_decomposition(X) >>mip.decimated_decomposition(X,dfactor=2,ndec=100) # if you haven't run BOTH decimations, this function will print an error and return (None,None) >>R,deltaij = mip.compute_R_delta() # works on stored reproducibility data # make the R-delta plot and inspect it to determine nsparse >>fig = plotting.plot_R_delta(R,deltaij) >>fig.show() At this point, you should have inspected the R/delta plot and be able to determine the dimension of the sparse subspace, which I will call nsparse in what follows. # project out the sparse subspace >>Xtilde = mip.project_sparse(X,nsparse) # to harvest the sparse signals, use >>Asparse,Ssparse = mip.return_sparse(nsparse) # eigenvalue stopping rules can tell you the dimension of the Gaussian subspace # there are many rules to choose from (see stopping.py); I'm using broken stick here. >>stop = stopping.StoppingRule(Xtilde) >>ng = stop.broken_stick() # finally, you can construct a basis for the Gaussian subspace (and the 'signals') # via principal components >>W,S = pca.pca(Xtilde,ng) # PCA on the matrix of Gaussian components
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.