aboutsummaryrefslogtreecommitdiff
path: root/gensvm/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'gensvm/core.py')
-rw-r--r--gensvm/core.py4
1 files changed, 3 insertions, 1 deletions
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,