Skip to content

Commit

Permalink
fix SVR
Browse files Browse the repository at this point in the history
  • Loading branch information
haifengl committed Dec 15, 2022
1 parent 8f3f8a5 commit 5798b6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clojure/src/smile/regression.clj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(ns smile.regression
"Regression Analysis"
{:author "Haifeng Li"}
(:import [smile.regression OLS RidgeRegression LASSO MLP RBFNetwork SVR
(:import [smile.regression OLS RidgeRegression LASSO MLP RBFNetwork SVM
RegressionTree RandomForest GradientTreeBoost
GaussianProcessRegression]
[smile.base.cart Loss]))
Expand Down Expand Up @@ -298,10 +298,10 @@
([x y neurons] (rbfnet x y neurons false))
([x y neurons normalized] (RBFNetwork/fit x y neurons normalized)))

(defn svr
(defn svm
"Support vector regression.
Like SVM for classification, the model produced by SVR depends only on a
Like SVM for classification, the model produced by SVM depends only on a
subset of the training data, because the cost function ignores any training
data close to the model prediction (within a threshold).
Expand All @@ -311,8 +311,8 @@
`eps` is the loss function error threshold.
`C` is the soft margin penalty parameter.
`tol` is the tolerance of convergence test."
([x y kernel eps C] (svr x y kernel eps C 1E-3))
([x y kernel eps C tol] (SVR/fit x y kernel eps C tol)))
([x y kernel eps C] (svm x y kernel eps C 1E-3))
([x y kernel eps C tol] (SVM/fit x y kernel eps C tol)))

(defn cart
"Regression tree.
Expand Down

0 comments on commit 5798b6d

Please sign in to comment.