Skip to content
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

Adding positive_only objectives to non_core_objectives #1661

Merged
merged 5 commits into from Jan 8, 2021

Conversation

freddyaboulton
Copy link
Contributor

Pull Request Description

Fixes #1660


After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of docs/source/release_notes.rst to include this pull request by adding :pr:123.

@freddyaboulton freddyaboulton changed the title Adding only_positive objectives to non_core_objectives Adding positive_only objectives to non_core_objectives Jan 7, 2021
assert all([obj not in only_positive for obj in search.additional_objectives])


def test_automl_validate_objective(X_y_regression):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we had coverage for this before? Let me know if this is redundant!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freddyaboulton Good addition, but why specifically for these 2 objectives?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just cause they were non-core but I changed the test to check all non-core objectives hehe!

@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #1661 (ae622f9) into main (aad370f) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             main    #1661     +/-   ##
=========================================
+ Coverage   100.0%   100.0%   +0.1%     
=========================================
  Files         240      240             
  Lines       18485    18503     +18     
=========================================
+ Hits        18477    18495     +18     
  Misses          8        8             
Impacted Files Coverage Δ
evalml/objectives/utils.py 100.0% <ø> (ø)
evalml/tests/automl_tests/test_automl.py 100.0% <100.0%> (ø)
evalml/tests/objective_tests/test_objectives.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aad370f...ae622f9. Read the comment docs.

@freddyaboulton freddyaboulton added the bug Issues tracking problems with existing features. label Jan 7, 2021
@freddyaboulton freddyaboulton self-assigned this Jan 7, 2021
@freddyaboulton freddyaboulton marked this pull request as ready for review January 7, 2021 23:03
Copy link
Contributor

@bchen1116 bchen1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


@pytest.mark.parametrize('problem_type', [ProblemTypes.BINARY, ProblemTypes.MULTICLASS,
ProblemTypes.TIME_SERIES_REGRESSION, ProblemTypes.REGRESSION])
def test_automl_does_not_include_positive_only_objectives_by_default(problem_type, X_y_regression):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@ParthivNaresh ParthivNaresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

assert all([obj not in only_positive for obj in search.additional_objectives])


def test_automl_validate_objective(X_y_regression):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@freddyaboulton Good addition, but why specifically for these 2 objectives?

Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@freddyaboulton freddyaboulton merged commit a1bf204 into main Jan 8, 2021
@bchen1116 bchen1116 mentioned this pull request Jan 26, 2021
@freddyaboulton freddyaboulton deleted the negative-target-error branch June 17, 2021 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues tracking problems with existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AutoMLSearch can't score regression problems with negative targets
4 participants