Skip to content

Commit 15413b7

Browse files
authored
Merge pull request KordingLab#7 from KordingLab/fast_installation
Fast installation
2 parents d179c0a + 9aca08d commit 15413b7

File tree

7 files changed

+72
-0
lines changed

7 files changed

+72
-0
lines changed

Neural_Decoding/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .decoders import WienerFilterDecoder, WienerCascadeDecoder, KalmanFilterDecoder,\
2+
DenseNNDecoder, SimpleRNNDecoder, GRUDecoder, LSTMDecoder, XGBoostDecoder, SVRDecoder, NaiveBayesDecoder
3+
from .metrics import get_R2, get_rho
4+
from .preprocessing_funcs import bin_output, bin_spikes, get_spikes_with_history
File renamed without changes.
File renamed without changes.
File renamed without changes.

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,25 @@ Code used for the paper is in the "Paper_code" folder. It is described further a
1313

1414
All 3 datasets (motor cortex, somatosensory cortex, and hippocampus) used in the paper can be downloaded [here](https://www.dropbox.com/sh/n4924ipcfjqc0t6/AACPWjxDKPEzQiXKUUFriFkJa?dl=0). They are in both matlab and python formats, and can be used in the example files described below.
1515

16+
## Installation
17+
18+
This package can be installed via `pip` at the command line by typing
19+
```buildoutcfg
20+
pip install Neural-Decoding
21+
```
22+
or manually via
23+
```buildoutcfg
24+
git clone https://github.com/KordingLab/Neural_Decoding.git
25+
cd Neural_Decoding
26+
python setup.py install
27+
```
28+
You'll have to install each dependency yourself if you install manually. We've designed the code so that not all machine learning packages
29+
need to be installed for the others to work.
30+
1631
## Dependencies
32+
All packages will be installed automatically when installing from `pip` (because of the `requirements.txt` file).
33+
34+
If installing manually via `python setup.py install`:
1735
In order to run all the decoders based on neural networks, you need to install [Keras](https://keras.io/#installation) <br>
1836
In order to run the XGBoost Decoder, you need to install [XGBoost](https://pypi.python.org/pypi/xgboost/) <br>
1937
In order to run the Wiener Filter, Wiener Cascade, or Support Vector Regression you will need [scikit-learn](http://scikit-learn.org/stable/install.html). <br>

requirements.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
xgboost>=0.9.0
2+
statsmodels>=0.9.0
3+
scipy>=1.2.1
4+
numpy>=1.16.3
5+
keras>=2.2.4
6+
scikit_learn>=0.21.2
7+
xgboost>=0.90

setup.py

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#! /usr/bin/env python
2+
import setuptools # noqa; we are using a setuptools namespace
3+
# from numpy.distutils.core import setup
4+
from setuptools import setup, Extension
5+
6+
descr = """A python package that includes many methods for decoding neural activity."""
7+
8+
DISTNAME = 'Neural Decoding'
9+
DESCRIPTION = descr
10+
MAINTAINER = 'Josh Glaser'
11+
MAINTAINER_EMAIL = '[email protected] '
12+
LICENSE = 'BSD 3-Clause License'
13+
DOWNLOAD_URL = 'https://github.com/KordingLab/Neural_Decoding.git'
14+
VERSION = '0.1.2.dev'
15+
with open('requirements.txt') as f:
16+
requirements = f.read().splitlines()
17+
18+
if __name__ == "__main__":
19+
setup(name=DISTNAME,
20+
maintainer=MAINTAINER,
21+
maintainer_email=MAINTAINER_EMAIL,
22+
description=DESCRIPTION,
23+
license=LICENSE,
24+
version=VERSION,
25+
download_url=DOWNLOAD_URL,
26+
long_description=open('README.md').read(),
27+
long_description_content_type= 'text/markdown',
28+
classifiers=[
29+
'Intended Audience :: Science/Research',
30+
'Intended Audience :: Developers',
31+
'License :: OSI Approved',
32+
'Programming Language :: Python',
33+
'Topic :: Software Development',
34+
'Topic :: Scientific/Engineering',
35+
'Operating System :: Microsoft :: Windows',
36+
'Operating System :: POSIX',
37+
'Operating System :: Unix',
38+
'Operating System :: MacOS',
39+
],
40+
platforms='any',
41+
packages=['Neural_Decoding'],
42+
install_requires=requirements,
43+
)

0 commit comments

Comments
 (0)