forked from TNTLFreiburg/braindecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some refactorings and rst-compliant readme
- Loading branch information
1 parent
b75f320
commit af1d1a0
Showing
7 changed files
with
98 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,17 @@ | ||
Note: The old braindecode repository has been moved to https://github.com/robintibor/braindevel. | ||
Note: The old braindecode repository has been moved to | ||
https://github.com/robintibor/braindevel. | ||
|
||
Braindecode | ||
=========== | ||
|
||
# Braindecode | ||
A deep learning for raw time-domain EEG decoding toolbox. | ||
|
||
Installation | ||
============ | ||
|
||
Install pytorch from http://pytorch.org/. | ||
|
||
Documentation | ||
============= | ||
|
||
Documentation is online under http://braindecode.readthedocs.io/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class SignalAndTarget(object): | ||
def __init__(self, X, y): | ||
assert len(X) == len(y) | ||
self.X = X | ||
self.y = y | ||
|
||
|
||
def apply_to_X_y(fn, *sets): | ||
X = fn(*[s.X for s in sets]) | ||
y = fn(*[s.y for s in sets]) | ||
return SignalAndTarget(X,y) | ||
|
||
|
||
def split_into_two_sets(dataset, fraction=None, n_boundary=None): | ||
assert fraction is not None or n_boundary is not None | ||
if n_boundary is None: | ||
n_boundary = int(round(len(dataset.X) * fraction)) | ||
first_set = apply_to_X_y(lambda a: a[:n_boundary], dataset) | ||
second_set = apply_to_X_y(lambda a: a[n_boundary:], dataset) | ||
return first_set, second_set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from setuptools import setup # Always prefer setuptools over distutils | ||
from codecs import open # To use a consistent encoding | ||
from os import path | ||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
# Get the long description from the relevant file | ||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
setup( | ||
name='Braindecode', | ||
|
||
# Versions should comply with PEP440. For a discussion on single-sourcing | ||
# the version across setup.py and the project code, see | ||
# http://packaging.python.org/en/latest/tutorial.html#version | ||
version='0.1.1', | ||
|
||
description='A deep learning for raw time-domain EEG decoding toolbox.', | ||
long_description=long_description, #this is the | ||
|
||
# The project's main homepage. | ||
url='https://github.com/robintibor/braindecode', | ||
|
||
# Author details | ||
author='Robin Tibor Schirrmeister', | ||
author_email='[email protected]', | ||
|
||
# Choose your license | ||
license='BSD 3-Clause', | ||
|
||
install_requires=['numpy','mne'], | ||
#tests_require = [...] | ||
|
||
# See https://PyPI.python.org/PyPI?%3Aaction=list_classifiers | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
|
||
# Indicate who your project is intended for | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
'Topic :: Software Development :: Build Tools', | ||
|
||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
|
||
# Pick your license as you wish (should match "license" above) | ||
'License :: OSI Approved :: BSD License', | ||
|
||
# Specify the Python versions you support here. In particular, ensure | ||
# that you indicate whether you support Python 2, Python 3 or both. | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3.5', | ||
], | ||
|
||
# What does your project relate to? | ||
keywords='eeg deep-learning brain-state-decoding', | ||
|
||
packages=['braindecode'], | ||
|
||
) |