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, weights
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyAsDouble, metric, metric, predict
public 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)
Regression
predict
in interface Regression<T>
x
- an instance.