removed left-over comment
@@ -277,39 +277,6 @@ def _daal_var(X):
return ssc[0, 0] / X.size
-
-"""
- if self.gamma in ('scale', 'auto_deprecated'):
- if sparse:
- # var = E[X^2] - E[X]^2
- X_var = (X.multiply(X)).mean() - (X.mean()) ** 2
- else:
- X_var = X.var()
- if self.gamma == 'scale':
- if X_var != 0:
- self._gamma = 1.0 / (X.shape[1] * X_var)
- else:
- self._gamma = 1.0
- else:
- kernel_uses_gamma = (not callable(self.kernel) and self.kernel
- not in ('linear', 'precomputed'))
- if kernel_uses_gamma and not np.isclose(X_var, 1.0):
- # NOTE: when deprecation ends we need to remove explicitly
- # setting `gamma` in examples (also in tests). See
- # https://github.com/scikit-learn/scikit-learn/pull/10331
- # for the examples/tests that need to be reverted.
- warnings.warn("The default value of gamma will change "
- "from 'auto' to 'scale' in version 0.22 to "
- "account better for unscaled features. Set "
- "gamma explicitly to 'auto' or 'scale' to "
- "avoid this warning.", FutureWarning)
- self._gamma = 1.0 / X.shape[1]
- elif self.gamma == 'auto':
- self._gamma = 1.0 / X.shape[1]
- else:
- self._gamma = self.gamma
-"""
-
def __compute_gamma__(gamma, kernel, X, sparse, use_var=True):
if gamma in ('scale', 'auto_deprecated'):
kernel_uses_gamma = (not callable(kernel) and kernel
