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

Add metric and loss modules for RMSE, RMSPE, and AUC #1214

Merged
merged 12 commits into from
Jun 25, 2021

Conversation

ANarayan
Copy link
Collaborator

This PR adds support for RMSE, RMSPE, and AUC.

Specifically it adds a metric and loss module for both RMSE and RMSPE and a metric module for AUC.



def rmspe_loss(targets, predictions):
if type(predictions) == dict and PREDICTIONS in predictions.keys():
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would remove this, and just have the loss passing the right tensors and the metric passing the tensor associated with predictions key. This way this function is more atomic and reusable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

elif self.loss[TYPE] == "root_mean_squared_percentage_error":
self.metric_functions[LOSS] = RMSPEMetric(name="eval_loss")

self.metric_functions[ERROR] = ErrorScore(name="metric_error")
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we can get rid of error, it's just not informative. can also get rid of ErrorScore.

Copy link
Collaborator Author

@ANarayan ANarayan Jun 24, 2021

Choose a reason for hiding this comment

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

@w4nderlust w4nderlust merged commit 99e5681 into ludwig-ai:master Jun 25, 2021
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.

None yet

3 participants