-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] sgd: Change deprecated n_iter to max_iter #2920
Changes from 1 commit
e8286f2
e3940c0
297835c
60c741f
936cf1f
9d208e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ class Outputs(OWBaseLearner.Outputs): | |
learning_rate_index = Setting(0) | ||
eta0 = Setting(.01) | ||
power_t = Setting(.25) | ||
n_iter = Setting(5) | ||
max_iter = Setting(10) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please implement a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know how to do it.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should do the trick. Perhaps delete the setting |
||
|
||
def add_main_layout(self): | ||
self._add_algorithm_to_layout() | ||
|
@@ -150,8 +150,8 @@ def _add_learning_params_to_layout(self): | |
callback=self.settings_changed) | ||
gui.separator(box, height=12) | ||
|
||
self.n_iter_spin = gui.spin( | ||
box, self, 'n_iter', 1, MAXINT - 1, label='Number of iterations: ', | ||
self.max_iter_spin = gui.spin( | ||
box, self, 'max_iter', 1, MAXINT - 1, label='Number of iterations: ', | ||
controlWidth=80, alignment=Qt.AlignRight, | ||
callback=self.settings_changed) | ||
# Wrap shuffle_cbx inside another hbox to align it with the random_seed | ||
|
@@ -246,7 +246,7 @@ def create_learner(self): | |
learning_rate=self.learning_rates[self.learning_rate_index][1], | ||
eta0=self.eta0, | ||
power_t=self.power_t, | ||
n_iter=self.n_iter, | ||
max_iter=self.max_iter, | ||
preprocessors=self.preprocessors, | ||
**params) | ||
|
||
|
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.
Default in sklearn is 5. Is there a particular reason to have it at 10?
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.
No particular reason. Sklearn will change it to 1000 from 0.21. I decided for 10 only to see if I changed everything correctly (testing widget in Orange).