Package smile.regression
Class GaussianProcessRegression.Trainer<T>
- java.lang.Object
-
- smile.regression.RegressionTrainer<T>
-
- smile.regression.GaussianProcessRegression.Trainer<T>
-
- Enclosing class:
- GaussianProcessRegression<T>
public static class GaussianProcessRegression.Trainer<T> extends RegressionTrainer<T>
Trainer for Gaussian Process for Regression.
-
-
Constructor Summary
Constructors Constructor Description Trainer(MercerKernel<T> kernel, double lambda)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GaussianProcessRegression<T>
train(T[] x, double[] y)
Learns a regression model with given training data.GaussianProcessRegression<T>
train(T[] x, double[] y, T[] t)
Learns a Gaussian Process with given subset of regressors.-
Methods inherited from class smile.regression.RegressionTrainer
setAttributes
-
-
-
-
Constructor Detail
-
Trainer
public Trainer(MercerKernel<T> kernel, double lambda)
Constructor.- Parameters:
kernel
- the Mercer kernel.lambda
- the shrinkage/regularization parameter.
-
-
Method Detail
-
train
public GaussianProcessRegression<T> train(T[] x, double[] y)
Description copied from class:RegressionTrainer
Learns a regression model with given training data.- Specified by:
train
in classRegressionTrainer<T>
- Parameters:
x
- the training instances.y
- the training response values.- Returns:
- a trained regression model.
-
train
public GaussianProcessRegression<T> train(T[] x, double[] y, T[] t)
Learns a Gaussian Process with given subset of regressors.- Parameters:
x
- training samples.y
- training labels in [0, k), where k is the number of classes.t
- the inducing input, which are pre-selected or inducing samples acting as active set of regressors. Commonly, these can be chosen as the centers of k-means clustering.- Returns:
- a trained Gaussian Process.
-
-