Package smile.regression
Class KernelMachine<T>
java.lang.Object
smile.base.svm.KernelMachine<T>
smile.regression.KernelMachine<T>
- Type Parameters:
T
- the data type of model input objects.
- All Implemented Interfaces:
Serializable
,ToDoubleFunction<T>
,Regression<T>
The learning methods building on kernels. Kernel methods owe their name to
the use of kernel functions, which enable them to operate in a high-dimensional,
implicit feature space without ever computing the coordinates of the data
in that space, but rather by simply computing the inner products between
the images of all pairs of data in the feature space.
Kernel methods can be thought of as instance-based learners: rather than learning some fixed set of parameters corresponding to the features of their inputs, they instead store (a subset of) their training set (or a new representation) and learn for it a corresponding weight. Prediction for unlabeled inputs is treated by the application of a similarity function.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface smile.regression.Regression
Regression.Trainer<T,
M extends Regression<T>> -
Constructor Summary
ConstructorDescriptionKernelMachine
(MercerKernel<T> kernel, T[] instances, double[] weight) Constructor.KernelMachine
(MercerKernel<T> kernel, T[] instances, double[] weight, double b) Constructor. -
Method Summary
Methods inherited from class smile.base.svm.KernelMachine
intercept, kernel, score, toString, vectors, weights
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface smile.regression.Regression
applyAsDouble, online, predict, predict, predict, update, update, update
-
Constructor Details
-
KernelMachine
Constructor.- Parameters:
kernel
- Kernel function.instances
- The instances in the kernel machine, e.g. support vectors.weight
- The weights of instances.
-
KernelMachine
Constructor.- Parameters:
kernel
- Kernel function.instances
- The instances in the kernel machine, e.g. support vectors.weight
- The weights of instances.b
- The intercept;
-
-
Method Details
-
predict
Description copied from interface:Regression
Predicts the dependent variable of an instance.- Specified by:
predict
in interfaceRegression<T>
- Parameters:
x
- an instance.- Returns:
- the predicted value of dependent variable.
-