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 Regression
Regression.Trainer<T,M> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:RegressionPredicts the dependent variable of an instance.- Specified by:
predictin interfaceRegression<int[]>- Parameters:
x- an instance.- Returns:
- the predicted value of dependent variable.
-