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 callbacks to model search #42

Merged
merged 5 commits into from Sep 3, 2019
Merged

Add callbacks to model search #42

merged 5 commits into from Sep 3, 2019

Conversation

kmax12
Copy link
Contributor

@kmax12 kmax12 commented Sep 3, 2019

Fixes #20

Todos

  • Write tests
  • Document

if self.verbose:
self._log_title("Beginning pipeline search")
self._log("Optimizing for %s. " % self.objective.name, new_line=False)
self._log_title("Beginning pipeline search")
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 changed due to updates to _log

@@ -47,6 +50,9 @@ def __init__(self, problem_type, tuner, cv, objective, max_pipelines, max_time,
self.default_objectives = default_objectives

def _log(self, msg, color=None, new_line=True):
if not self.verbose:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handling verbose here to avoid any printing when calling log

@@ -33,4 +33,6 @@ def objective_function(self, y_predicted, y_true):
profit = self.true_positives * true_positives
profit += self.false_positives * false_positives

return profit
profit_per_lead = profit / len(y_true)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

squeezing this in to the PR. just updating the metric to be normalized per transaction considered

Copy link
Contributor

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

We could include useful default callback functions or examples of functions but otherwise LGTM!

@@ -17,6 +17,8 @@ def __init__(self,
cv=None,
tuner=None,
detect_label_leakage=True,
start_iteration_callback=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any useful callback functions we could include as a default?

@kmax12
Copy link
Contributor Author

kmax12 commented Sep 3, 2019

added #44 to finish writing documentation

@kmax12 kmax12 merged commit b89f280 into master Sep 3, 2019
@dsherry dsherry deleted the add-callbacks branch May 26, 2020 21:06
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.

Allow user to provide callbacks during pipeline search
2 participants