diff options
Diffstat (limited to 'gensvm')
| -rw-r--r-- | gensvm/__init__.py | 2 | ||||
| -rw-r--r-- | gensvm/core.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gensvm/__init__.py b/gensvm/__init__.py index 62ac067..c8cd0be 100644 --- a/gensvm/__init__.py +++ b/gensvm/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -__version__ = "0.2.2" +__version__ = "0.2.3" from .core import GenSVM from .gridsearch import GenSVMGridSearchCV diff --git a/gensvm/core.py b/gensvm/core.py index c994995..f0e7820 100644 --- a/gensvm/core.py +++ b/gensvm/core.py @@ -408,6 +408,8 @@ class GenSVM(BaseEstimator, ClassifierMixin): trainX, accept_sparse=False, dtype=np.float64, order="C" ) + gamma = 1.0 / X.shape[1] if self.gamma == "auto" else self.gamma + V = self.combined_coef_ if self.kernel == "linear": predictions = wrapper.predict_wrap(X, V) @@ -420,7 +422,7 @@ class GenSVM(BaseEstimator, ClassifierMixin): V, n_class, kernel_idx, - self.gamma, + gamma, self.coef, self.degree, self.kernel_eigen_cutoff, |
