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

added new metrics for regression tasks #364

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Conversation

IdoAmosIBM
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@mosheraboh mosheraboh 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!
Minors inline.

), f"Spearman corr expected to get pred and target with same length but got pred={len(pred)} - target={len(target)}"

statistic, p_value = spearmanr(
pred, target, nan_policy="propagate"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we expose nan_policy to be an argument in metric class?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it made sense to me to make this visibility to understand where nans might come from but i don't mind removing

)


class MetricSpearmanCorrelation(MetricDefault):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest that all of those metrics (including MetricPearsonCorrelation) be put in a new folder for regression. Makes sense?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes makes a lot of sense, will refractor

Copy link
Collaborator

@mosheraboh mosheraboh left a comment

Choose a reason for hiding this comment

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

LGTM

@IdoAmosIBM IdoAmosIBM merged commit ea54b8c into master Sep 10, 2024
5 checks passed
@IdoAmosIBM IdoAmosIBM deleted the regression_metrics branch September 10, 2024 13:42
@YoelShoshan
Copy link
Collaborator

FYI

@IdoAmosIBM @mosheraboh
Note that as a result of this PR some tests in dependent libs failed, as it relied on imports from a certain sub dir/module.
For backward compatibility I'm making them accessible from the same location (do tell me if you prefer something else)

here's the PR - #365

@IdoAmosIBM
Copy link
Collaborator Author

IdoAmosIBM commented Sep 11, 2024 via email

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.

3 participants