-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG: Update repository structure #21
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
641b6a1
more iclabel to a 'icabel' submodule and add '_' to all private funct…
mscheltienne 7fb7f91
add entrypoints to iclabel and to mne_icalabel
mscheltienne e762c5e
black
mscheltienne 156163f
fix missed
mscheltienne 8d9c9ce
rename to label_components
mscheltienne 4474b5b
add tests
mscheltienne 8f36110
fix resample_poly that requires up and down as integers
mscheltienne f95e8da
sort imports with isort
mscheltienne 4c62518
Merge branch 'main' into structure
mscheltienne b6a6856
run sort and black
mscheltienne 2596739
fix for resampling
mscheltienne bb1584d
run black
mscheltienne 5efbd0c
simpler
mscheltienne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
# License: BSD (3-clause) | ||
|
||
__version__ = "0.1dev0" | ||
|
||
from .label_components import label_components # noqa: F401 |
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,8 @@ | ||
"""ICLabel - An automated electroencephalographic independent component | ||
classifier, dataset, and website. | ||
This is a python implementation of the EEGLAB plugin 'ICLabel'.""" | ||
|
||
from .features import get_features # noqa: F401 | ||
from .label_components import label_components # noqa: F401 | ||
from .network import ICLabelNet, run_iclabel # noqa: F401 |
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
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,32 @@ | ||
from typing import Union | ||
|
||
from mne import BaseEpochs | ||
from mne.io import BaseRaw | ||
from mne.preprocessing import ICA | ||
|
||
from .features import get_features | ||
from .network import run_iclabel | ||
|
||
|
||
def label_components(inst: Union[BaseRaw, BaseEpochs], ica: ICA): | ||
""" | ||
Label the provided ICA components with the ICLabel neural network. This | ||
network uses 3 features: | ||
- Topographic maps, based on the ICA decomposition. | ||
- Power Spectral Density (PSD), based on the ICA decomposition and the | ||
provided instance. | ||
- Autocorrelation, based on the ICA decomposition and the provided | ||
instance. | ||
Parameters | ||
---------- | ||
inst : Raw | Epochs | ||
Instance used to fit the ICA decomposition. The instance should be | ||
referenced to a common average and bandpass filtered between 1 and | ||
100 Hz. | ||
ica : ICA | ||
ICA decomposition of the provided instance. | ||
""" | ||
features = get_features(inst, ica) | ||
labels = run_iclabel(*features) | ||
return labels |
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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking maybe we even rename this to
get_iclabel_features
, since we'll presumably have other models which also have feature engineering which would haveget_<model_X>_features
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good idea.