-
Notifications
You must be signed in to change notification settings - Fork 89
Add callbacks to model search #42
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
Conversation
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") |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this 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, |
There was a problem hiding this comment.
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?
added #44 to finish writing documentation |
Fixes #20
Todos