Skip to content

dokato/navisML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

navisML

navisML provides an easy interface between navis module for neurons analysis and scikit-learn for machine learning. For every neuron object (mesh and skeleton) from a neuronlist it enables you to extract scalar information to use as a feature in a ML modelling.

Installation

$ pip install git+https://github.com/dokato/navisML

Example

import navis
from navisML.extractor import NeuralFeatures
from sklearn.cluster import KMeans

neurons = navis.read_swc("path/to/data.zip", read_meta=True)

nrnfeats = NeuralFeatures({
    'upstream' : 'upstream',
    'downstream' : 'downstream',
    'has_soma' : 'has_soma',
    'custom_feature' : custom_function
})

X = nrnfeats.fit_transform(neurons)

kmeans = KMeans(n_clusters=2, random_state=0).fit(X)

References

About

interface between navis and scikit learn

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages