Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dokato/navisml
interface between navis and scikit learn
https://github.com/dokato/navisml
Last synced: 18 days ago
JSON representation
interface between navis and scikit learn
- Host: GitHub
- URL: https://github.com/dokato/navisml
- Owner: dokato
- License: mit
- Created: 2022-04-08T13:01:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-22T13:43:55.000Z (about 1 year ago)
- Last Synced: 2024-10-16T12:39:40.366Z (2 months ago)
- Language: Python
- Size: 4.74 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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
```python
import navis
from navisML.extractor import NeuralFeatures
from sklearn.cluster import KMeansneurons = 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
- [Navis](https://github.com/navis-org/navis)
- [scikit-learn](https://github.com/scikit-learn/scikit-learn/)