Skip to content

Introduce the concept of ranking metrics #3721

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

Merged
merged 10 commits into from
Oct 4, 2022
Merged

Introduce the concept of ranking metrics #3721

merged 10 commits into from
Oct 4, 2022

Conversation

eccabay
Copy link
Contributor

@eccabay eccabay commented Sep 20, 2022

Closes #3710

Note: with this implementation, get_optimization_objectives is a roundabout way to get our current core metrics. We will want to move away from core for optimization purposes, but we can’t remove the non-optimization non-core (i.e. recall) metrics until our downstream users have made the switch.

@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #3721 (48ef89a) into main (6dc8b76) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            main   #3721     +/-   ##
=======================================
+ Coverage   99.7%   99.7%   +0.1%     
=======================================
  Files        339     339             
  Lines      34819   34845     +26     
=======================================
+ Hits       34688   34714     +26     
  Misses       131     131             
Impacted Files Coverage Δ
evalml/objectives/__init__.py 100.0% <ø> (ø)
evalml/automl/automl_search.py 99.5% <100.0%> (ø)
evalml/objectives/utils.py 100.0% <100.0%> (ø)
evalml/tests/objective_tests/test_objectives.py 100.0% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@eccabay eccabay marked this pull request as ready for review September 20, 2022 15:27
@@ -453,7 +453,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Might need a make lint-fix?

obj()
for obj in all_objectives_dict.values()
if obj.is_defined_for_problem_type(problem_type)
and (obj not in get_non_core_objectives() or obj in ranking_only_objectives())
Copy link
Contributor

Choose a reason for hiding this comment

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

remind me what's behind the obj not in get_non_core_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.

There are some objectives in that list that require additional setup/configuration before they can be used during optimization. An example, the cost benefit matrix needs weights for each true positive/negative and false positive/negative

Copy link
Collaborator

@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.

LGTM - great work!

Returns:
List of ObjectiveBase classes
"""
return [
Copy link
Collaborator

Choose a reason for hiding this comment

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

thoughts on adding ranking_only as a property instead of maintaining a list? I know this is what we do for get_non_core_objectives as well but maybe we could file this as a future enhancement.

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'm not quite sure I understand your suggestion - do you mean a property of the objective classes themselves? I do actually like that better, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Quick investigation shows that making this switch is unfortunately nontrivial, so I think I'll leave it as is for now. It's a good future enhancement though!

@eccabay eccabay enabled auto-merge (squash) October 4, 2022 14:10
@eccabay eccabay merged commit 75268a5 into main Oct 4, 2022
@eccabay eccabay deleted the 3710_ranking_metrics branch October 4, 2022 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add concept of ranking objective
3 participants