@@ -188,16 +188,13 @@ def fit(self, X, y, sample_weight=None):
188188 Returns self.
189189 """
190190 # FIXME Remove l1/l2 support in 1.0 -----------------------------------
191- loss_l = self .loss .lower ()
192-
193191 msg = ("loss='%s' has been deprecated in favor of "
194192 "loss='%s' as of 0.16. Backward compatibility"
195193 " for the loss='%s' will be removed in %s" )
196194
197- # FIXME change loss_l --> self.loss after 0.18
198- if loss_l in ('l1' , 'l2' ):
195+ if self .loss in ('l1' , 'l2' ):
199196 old_loss = self .loss
200- self .loss = {'l1' : 'hinge' , 'l2' : 'squared_hinge' }.get (loss_l )
197+ self .loss = {'l1' : 'hinge' , 'l2' : 'squared_hinge' }.get (self . loss )
201198 warnings .warn (msg % (old_loss , self .loss , old_loss , '1.0' ),
202199 DeprecationWarning )
203200 # ---------------------------------------------------------------------
@@ -357,18 +354,15 @@ def fit(self, X, y, sample_weight=None):
357354 Returns self.
358355 """
359356 # FIXME Remove l1/l2 support in 1.0 -----------------------------------
360- loss_l = self .loss .lower ()
361-
362357 msg = ("loss='%s' has been deprecated in favor of "
363358 "loss='%s' as of 0.16. Backward compatibility"
364359 " for the loss='%s' will be removed in %s" )
365360
366- # FIXME change loss_l --> self.loss after 0.18
367- if loss_l in ('l1' , 'l2' ):
361+ if self .loss in ('l1' , 'l2' ):
368362 old_loss = self .loss
369363 self .loss = {'l1' : 'epsilon_insensitive' ,
370364 'l2' : 'squared_epsilon_insensitive'
371- }.get (loss_l )
365+ }.get (self . loss )
372366 warnings .warn (msg % (old_loss , self .loss , old_loss , '1.0' ),
373367 DeprecationWarning )
374368 # ---------------------------------------------------------------------
@@ -467,7 +461,7 @@ class SVC(BaseSVC):
467461 (n_samples, n_classes * (n_classes - 1) / 2).
468462 The default of None will currently behave as 'ovo' for backward
469463 compatibility and raise a deprecation warning, but will change 'ovr'
470- in 0.18 .
464+ in 0.19 .
471465
472466 .. versionadded:: 0.17
473467 *decision_function_shape='ovr'* is recommended.
@@ -620,7 +614,7 @@ class NuSVC(BaseSVC):
620614 (n_samples, n_classes * (n_classes - 1) / 2).
621615 The default of None will currently behave as 'ovo' for backward
622616 compatibility and raise a deprecation warning, but will change 'ovr'
623- in 0.18 .
617+ in 0.19 .
624618
625619 .. versionadded:: 0.17
626620 *decision_function_shape='ovr'* is recommended.
@@ -1038,8 +1032,8 @@ def fit(self, X, y=None, sample_weight=None, **params):
10381032 If X is not a C-ordered contiguous array it is copied.
10391033
10401034 """
1041- super (OneClassSVM , self ).fit (X , np .ones (_num_samples (X )), sample_weight = sample_weight ,
1042- ** params )
1035+ super (OneClassSVM , self ).fit (X , np .ones (_num_samples (X )),
1036+ sample_weight = sample_weight , ** params )
10431037 return self
10441038
10451039 def decision_function (self , X ):
0 commit comments