Skip to content

Conversation

@TheaperDeng
Copy link
Contributor

@TheaperDeng TheaperDeng commented Nov 29, 2021

Why we need chronos.metric?

We need to complete *.evaluate(...) in chronos with self-contained code without any dependency on bigdl-orca.
Convenient for future light HPO.
Convenient for future AD HPO.

What does this PR do?

first version with basic test and similar API to orca, we may discuss about the details later.

@@ -0,0 +1,59 @@
#
Copy link
Contributor

Choose a reason for hiding this comment

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

typo in file name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, I will fix it.

Ground truth (correct) target values.
:param y_pred: Array-like of shape = (n_samples, \*).
Estimated target values.
:param multioutput: String in ['raw_values', 'uniform_average']
Copy link
Contributor

Choose a reason for hiding this comment

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

"raw_values" and “uniform_average” is too long and does not accurately describe what it means ("raw_values" actually means "element-wise", and "uniform_average" actually means aggregated by mean (comparing againse element-wise). Actually the hyper parameter "multioutput“ itself is confusing as well.

My suggestion is: If we have only two options here, we can use a bool parameter, e.g. aggrerate=True or element-wise=True. If we have more than two aggregation option plus an element-wise option, then we can use aggregate='None', 'mean', etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This setting is inherited from orca.automl (which inherited from sklearn). I think a string type aggregate is much better since we do plan to add more settings for our users' convenience.

A floating point value, or an
array of floating point values, one for each individual target.
"""
metric = metric.lower()
Copy link
Contributor

Choose a reason for hiding this comment

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

evaluate does not take a list of metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This setting is inherited from orca.automl, I think we can support it easily.

array of floating point values, one for each individual target.
"""
metric = metric.lower()
assert metric in TORCHMETRICS_REGRESSION_MAP.keys(),\
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use assert for parameter checks?

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 think it's OK? Since a false input will definitely give a error. Or should we use a NotImplementedError or RuntimeError here?

@TheaperDeng TheaperDeng force-pushed the chronos-built-in-metrics branch from e935df9 to 1a00a4e Compare November 29, 2021 06:36
@TheaperDeng TheaperDeng force-pushed the chronos-built-in-metrics branch from 1a00a4e to 8220016 Compare November 30, 2021 02:13
@TheaperDeng
Copy link
Contributor Author

@TheaperDeng
Copy link
Contributor Author

I will first merge this PR and add more uts and give some enhancement to chronos.metric later with liang

@TheaperDeng TheaperDeng merged commit a433483 into intel:branch-2.0 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants