-
Notifications
You must be signed in to change notification settings - Fork 69
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
Multiple minor bug fixes and improvements #392
Merged
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
- In scikit-learn v0.19.1, the stratified split functions fail if the labels are floating point so we need to catch that condition in SKLL to provide a more informative message.
- Initialize possibly unbound variable and add an error check.
- Add a check to make sure probability is true if it's used as the objective. - Add a test.
- If we have a single featureset of length 1, then we cannot ablate anything.
mulhod
reviewed
Nov 13, 2017
skll/config.py
Outdated
@@ -654,6 +654,12 @@ def _parse_config_file(config_path, log_level=logging.INFO): | |||
output_metrics = [metric for metric in output_metrics | |||
if metric not in common_metrics_and_objectives] | |||
|
|||
# if the grid objectives contains `neg_log_loss`, then probability | |||
# must be specified as true since that' needed to compute the loss |
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.
that' --> that's
I fixed the coverage issue. This PR is now ready to be reviewed :) |
mulhod
approved these changes
Nov 14, 2017
Lguyogiro
approved these changes
Nov 14, 2017
jbiggsets
approved these changes
Nov 14, 2017
Thanks! |
This was referenced Dec 4, 2017
This was referenced Dec 4, 2017
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.
This is another short PR that encompasses several minor bugfixes and improvements:
Update to scikit-learn v0.19.1. In this particular scikit-learn release, the stratified split functions fail if the labels are floating point so we need to catch that condition in SKLL to provide a more informative message. Added such a condition to
learner.cross_validate()
and a test.Deal with empty feature files by raising an exception. Added a test and also fixed an unbound variable bug.
Add
neg_log_loss
as a possible metric and tuning objective for classifiers. This requiresprobability
to beTrue
so add a check for that and a test.If we are just specifying a
train_file
and atest_file
, there are no featuresets and hence it doesn't make any sense to do ablation in that case. Added a warning and a fall-through to handle this scenario.Updated documentation for all of the above as appropriate.