-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] Test & Learn: number of folds causes many errors #2348
Merged
Conversation
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
jerneju
changed the title
Test & Learn: number of folds causes many errors
[WIP][FIX]Test & Learn: number of folds causes many errors
May 29, 2017
kernc
reviewed
May 29, 2017
Orange/evaluation/testing.py
Outdated
@@ -276,7 +276,7 @@ def get_augmented_data(self, model_names, include_attrs=True, include_prediction | |||
|
|||
# add fold info | |||
if self.folds is not None: | |||
new_meta_attr.append(DiscreteVariable(name="Fold", values=[i+1 for i, s in enumerate(self.folds)])) | |||
new_meta_attr.append(DiscreteVariable(name="Fold", values=[str(i+1) for i, s in enumerate(self.folds)])) |
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.
# alternatives
[str(i) for i, _ in enumerate(self.folds, 1)]
[str(i) for i in range(1, len(self.folds) + 1)]
np.arange(1, len(self.folds) + 1, dtype=str).tolist()
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.
# the second alternative below is the fastest:
[i+1 for i, s in enumerate(self.folds)] # 0.957
[i+1 for i, _ in enumerate(self.folds)] # 0.916
[str(i) for i, _ in enumerate(self.folds, 1)] # 2.527
[str(i) for i in range(1, len(self.folds) + 1)] # 2.417
np.arange(1, len(self.folds) + 1, dtype=str).tolist() # does not work
Codecov Report
@@ Coverage Diff @@
## master #2348 +/- ##
==========================================
- Coverage 73.29% 73.28% -0.01%
==========================================
Files 317 317
Lines 55474 55474
==========================================
- Hits 40658 40655 -3
- Misses 14816 14819 +3 |
jerneju
changed the title
[WIP][FIX]Test & Learn: number of folds causes many errors
[FIX]Test & Learn: number of folds causes many errors
May 30, 2017
jerneju
changed the title
[FIX]Test & Learn: number of folds causes many errors
[FIX] Test & Learn: number of folds causes many errors
May 30, 2017
3 tasks
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
https://sentry.io/biolab/orange3/issues/267670404/
https://sentry.io/biolab/orange3/issues/269582517/
https://sentry.io/biolab/orange3/issues/282342454/
https://sentry.io/biolab/orange3/issues/282342206/
https://sentry.io/biolab/orange3/issues/196744688/
Description of changes
ContinuousVariable with Folds now contains string values instead of int.
Includes