Package smile.regression
Class BinarySparseLinearSVM
java.lang.Object
smile.regression.BinarySparseLinearSVM
- All Implemented Interfaces:
Serializable
,ToDoubleFunction<int[]>
,Regression<int[]>
Binary sparse linear support vector machines for regression.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface smile.regression.Regression
Regression.Trainer<T,
M extends Regression<T>> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface smile.regression.Regression
applyAsDouble, online, predict, predict, predict, update, update, update
-
Constructor Details
-
BinarySparseLinearSVM
Constructor.- Parameters:
p
- the dimension of input vector.svm
- The kernel machine.
-
-
Method Details
-
weights
public double[] weights()Returns the linear weights.- Returns:
- the linear weights.
-
intercept
public double intercept()Returns the intercept.- Returns:
- the intercept.
-
predict
public double predict(int[] x) Description copied from interface:Regression
Predicts the dependent variable of an instance.- Specified by:
predict
in interfaceRegression<int[]>
- Parameters:
x
- an instance.- Returns:
- the predicted value of dependent variable.
-