@@ -118,7 +118,7 @@ def _init_t(self, loss_function):
118
118
# initialize t such that eta at first sample equals eta0
119
119
self .t_ = 1.0 / (eta0 * self .alpha )
120
120
121
- def get_loss_function (self , loss ):
121
+ def _get_loss_function (self , loss ):
122
122
"""Get concrete ``LossFunction`` object for str ``loss``. """
123
123
try :
124
124
loss_ = self .loss_functions [loss ]
@@ -442,7 +442,7 @@ def _partial_fit(self, X, y, n_iter, classes=None, sample_weight=None,
442
442
self ._allocate_parameter_mem (n_classes , n_features ,
443
443
coef_init , intercept_init )
444
444
445
- self .loss_function = self .get_loss_function (self .loss )
445
+ self .loss_function = self ._get_loss_function (self .loss )
446
446
if self .t_ is None :
447
447
self ._init_t (self .loss_function )
448
448
@@ -976,7 +976,7 @@ def predict(self, X):
976
976
def _fit_regressor (self , X , y , sample_weight , n_iter ):
977
977
dataset , intercept_decay = _make_dataset (X , y , sample_weight )
978
978
5474
td>979
- loss_function = self .get_loss_function (self .loss )
979
+ loss_function = self ._get_loss_function (self .loss )
980
980
penalty_type = self ._get_penalty_type (self .penalty )
981
981
learning_rate_type = self ._get_learning_rate_type (self .learning_rate )
982
982
0 commit comments