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

Fix xgboost example for hyperparameter tuning #476

Merged
merged 4 commits into from
Jan 15, 2019

Conversation

richardsliu
Copy link
Contributor

@richardsliu richardsliu commented Jan 14, 2019

  • Don't shuffle the input data to reduce randomness between trials
  • Output mean_absolute_error in the format that katib metric collector expects

This change is Reviewable

@@ -61,7 +62,7 @@ def train_model(train_X,
def eval_model(model, test_X, test_y):
"""Evaluate the model performance."""
predictions = model.predict(test_X)
print("MAE on test: {:.2f}".format(mean_absolute_error(predictions, test_y)))
print("mean_absolute_error={:.2f}".format(mean_absolute_error(predictions, test_y)))
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 the logging module rather than print?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@jlewi
Copy link
Contributor

jlewi commented Jan 14, 2019

/assign @zhenghuiwang

@zhenghuiwang
Copy link
Contributor

/lgtm

@jlewi
Copy link
Contributor

jlewi commented Jan 15, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlewi, richardsliu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@richardsliu richardsliu merged commit 64c3889 into kubeflow:master Jan 15, 2019
@richardsliu richardsliu deleted the hp_tuning branch January 15, 2019 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants