public class KernelMachine<T> extends KernelMachine<T> implements Regression<T>
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 similiarity function.
Regression.Metric| Constructor and Description |
|---|
KernelMachine(smile.math.kernel.MercerKernel<T> kernel,
T[] instances,
double[] weight)
Constructor.
|
KernelMachine(smile.math.kernel.MercerKernel<T> kernel,
T[] instances,
double[] weight,
double b)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
predict(T x)
Predicts the dependent variable of an instance.
|
instances, intercept, kernel, score, toString, toSVM, weightsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyAsDouble, metric, metric, predictpublic KernelMachine(smile.math.kernel.MercerKernel<T> kernel, T[] instances, double[] weight)
kernel - Kernel function.instances - The instances in the kernel machine, e.g. support vectors.weight - The weights of instances.public double predict(T x)
Regressionpredict in interface Regression<T>x - an instance.