Package smile.regression
Interface DataFrameRegression
- All Superinterfaces:
Regression<Tuple>
,Serializable
,ToDoubleFunction<Tuple>
- All Known Implementing Classes:
GradientTreeBoost
,LinearModel
,RandomForest
,RegressionTree
Regression trait on DataFrame.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The regression trainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic DataFrameRegression
ensemble
(DataFrameRegression... models) Return an ensemble of multiple base models to obtain better predictive performance.formula()
Returns the model formula.static DataFrameRegression
of
(Formula formula, DataFrame data, Properties params, Regression.Trainer<double[], ?> trainer) Fits a vector regression model on data frame.default double[]
Predicts the dependent variables of a data frame.schema()
Returns the schema of predictors.Methods inherited from interface smile.regression.Regression
applyAsDouble, online, predict, predict, predict, predict, update, update, update
-
Method Details
-
formula
Formula formula()Returns the model formula.- Returns:
- the model formula.
-
schema
StructType schema()Returns the schema of predictors.- Returns:
- the schema of predictors.
-
predict
Predicts the dependent variables of a data frame.- Parameters:
data
- the data frame.- Returns:
- the predicted values.
-
of
static DataFrameRegression of(Formula formula, DataFrame data, Properties params, Regression.Trainer<double[], ?> trainer) Fits a vector regression model on data frame.- Parameters:
formula
- a symbolic description of the model to be fitted.data
- the data frame of the explanatory and response variables.params
- the hyperparameters.trainer
- the training lambda.- Returns:
- the model.
-
ensemble
Return an ensemble of multiple base models to obtain better predictive performance.- Parameters:
models
- the base models.- Returns:
- the ensemble model.
-