Update to eventseg #266
Merged
Update to eventseg #266
Conversation
…n notebook eventseg example, also updated download link in isfc example
Great looking tutorial! So far, we have been committing example code without outputs, for ease of tracking changes. Clearly it is helpful to have the outputs visible on the web. I will merge your PR (after you address the minor comment) and try to solve the problem in issue #268. |
brainiak/eventseg/event.py
Outdated
@@ -345,7 +364,11 @@ def find_events(self, testing_data, var=None, scramble=False): | |||
""" | |||
|
|||
if var is None: | |||
var = self.event_var_ | |||
if self.event_var_ is None: |
mihaic
Sep 19, 2017
Contributor
The test should check the existence of the attribute, not whether it is None
. The documentation is not perfectly clear, but the code is:
the existence of parameters with trailing _ is used to check if the estimator has been fitted.
http://scikit-learn.org/stable/developers/contributing.html#parameters-and-init
if not all_or_any([hasattr(estimator, attr) for attr in attributes]):
raise NotFittedError(msg % {'name': type(estimator).__name__})
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/validation.py#L793
The test should check the existence of the attribute, not whether it is None
. The documentation is not perfectly clear, but the code is:
the existence of parameters with trailing _ is used to check if the estimator has been fitted.
http://scikit-learn.org/stable/developers/contributing.html#parameters-and-init
if not all_or_any([hasattr(estimator, attr) for attr in attributes]):
raise NotFittedError(msg % {'name': type(estimator).__name__})
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/validation.py#L793
You should also update the paper reference to point to Neuron. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Minor update to eventseg to support additional use case, added ipython notebook eventseg example, also updated download link in isfc example