Skip to main content

A command line interface for DyNeuSR

Project description

DyNeuSR Fire

A command line interface for DyNeuSR based on the Python Fire library.

Usage

DyNeuSR Fire provides a command line interface for DyNeuSR. It wraps kmapper and dyneusr into a single pipeline, and uses the Python Fire library to automatically generate a simple command line interface that accepts several important options and allows users to customize this pipeline. For more information about DyNeuSR, check out the docs.

To get started, check out the examples, or try running one of the commands below on your own data.

Basic Usage

You can run the entire pipeline from the command line:

$ dyneusr-fire load_example --size=500 - run_mapper --projection=PCA(2) --resolution=10 --gain=0.5 - visualize

Interactive Mode

To run in interactive mode, you can run the following from the command line:

$ dyneusr-fire init -- --interactive

This will open an IPython shell.

Fire is starting a Python REPL with the following objects:
Modules: fire, np, pd
Objects: Bunch, Cover, DBSCAN, DyNeuGraph, DyNeuSR, HDBSCAN, KMeans, KeplerMapper, MinMaxScaler, PCA, StandardScaler, TSNE, UMAP, check_estimator, component, f, result, self, trace

Python 3.7.2 | packaged by conda-forge | (default, Mar 19 2019, 20:46:22) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:                                                               

Then, you can step through the pipeline:

In [1]: pipeline = DyNeuSR()

In [2]: pipeline.load_data(X='trefoil.npy', y='trefoil-target.npy')

In [3]: pipeline.run_mapper(projection=PCA(2), resolution=10, gain=0.5, clusterer=DBSCAN())

In [4]: pipeline.visualize()

Or, run it all at once:

In [1]: DyNeuSR().load_example().run_mapper(projection=PCA(2), resolution=10, gain=0.5, clusterer=DBSCAN()).visualize()

Note, in the examples above, load_example is used for demo purposes only. You can replace load_example with load_data and load your own data by passing the file names of your data and target labels to the X and y arguments, respectively.

Setup

Dependencies

Python 3.6+

Required Python Packages

Install with PIP

To install with pip:

pip install dyneusr-fire

To install from source:

git clone https://github.com/braindynamicslab/dyneusr-fire.git
cd dyneusr-fire

pip install -e .

Support

Please feel free to report any issues, request new features, or propose improvements. You can also contact Caleb Geniesse at geniesse [at] stanford [dot] edu.

Citation

Geniesse, C., Sporns, O., Petri, G., & Saggar, M. (2019). Generating dynamical neuroimaging spatiotemporal representations (DyNeuSR) using topological data analysis. Network Neuroscience. Advance publication. doi:10.1162/netn_a_00093

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dyneusr-fire, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size dyneusr_fire-0.0.3-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size dyneusr-fire-0.0.3.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page