Package smile.regression
Interface Regression<T>
- Type Parameters:
T
- the data type of model input objects.
- All Superinterfaces:
Serializable
,ToDoubleFunction<T>
- All Known Subinterfaces:
DataFrameRegression
- All Known Implementing Classes:
GaussianProcessRegression
,GradientTreeBoost
,KernelMachine
,LinearModel
,MLP
,RandomForest
,RBFNetwork
,RegressionTree
Regression analysis includes any techniques for modeling and analyzing
the relationship between a dependent variable and one or more independent
variables. Most commonly, regression analysis estimates the conditional
expectation of the dependent variable given the independent variables.
Regression analysis is widely used for prediction and forecasting, where
its use has substantial overlap with the field of machine learning.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Regression.Trainer<T,
M extends Regression<T>> The regression trainer. -
Method Summary
Modifier and TypeMethodDescriptiondefault double
applyAsDouble
(T x) static <T> Regression
<T> ensemble
(Regression<T>... models) Return an ensemble of multiple base models to obtain better predictive performance.default boolean
online()
Returns true if this is an online learner.default double[]
Predicts the dependent variable of a list of instances.default double[]
Predicts the dependent variable of a dataset.double
Predicts the dependent variable of an instance.default double[]
Predicts the dependent variable of an array of instances.default void
Updates the model with a mini-batch of new samples.default void
Updates the model with a mini-batch of new samples.default void
Online update the classifier with a new training instance.
-
Method Details
-
predict
Predicts the dependent variable of an instance.- Parameters:
x
- an instance.- Returns:
- the predicted value of dependent variable.
-
applyAsDouble
- Specified by:
applyAsDouble
in interfaceToDoubleFunction<T>
-
predict
Predicts the dependent variable of an array of instances.- Parameters:
x
- the instances.- Returns:
- the predicted values.
-
predict
Predicts the dependent variable of a list of instances.- Parameters:
x
- the instances to be classified.- Returns:
- the predicted class labels.
-
predict
Predicts the dependent variable of a dataset.- Parameters:
x
- the dataset to be classified.- Returns:
- the predicted class labels.
-
online
default boolean online()Returns true if this is an online learner.- Returns:
- true if online learner.
-
update
Online update the classifier with a new training instance. In general, this method may be NOT multi-thread safe.- Parameters:
x
- the training instance.y
- the response variable.
-
update
Updates the model with a mini-batch of new samples.- Parameters:
x
- the training instances.y
- the response variables.
-
update
Updates the model with a mini-batch of new samples.- Parameters:
batch
- the training instances.
-
ensemble
Return an ensemble of multiple base models to obtain better predictive performance.- Type Parameters:
T
- the type of model input object.- Parameters:
models
- the base models.- Returns:
- the ensemble model.
-