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