predict.ExponentialRegression.Rd
Similar to other predict methods, this function predicts fitted values from a fitted "ExponentialRegression" object.
# S3 method for ExponentialRegression
predict(
model,
data,
key,
features = NULL,
thread.ratio = NULL,
model.format = NULL
)
S3
methods
R6Class object
A "ExponentialRegression" object for prediction.
DataFrame
DataFrame containting the data.
character
Name of the ID column.
character of list of characters, optional
Name of feature columns for prediction.
If not provided, it defaults to all non-key columns of data.
double, optional
Controls the proportion of available threads that can be used by this
function.
The value range is from 0 to 1, where 0 indicates a single thread,
and 1 indicates all available threads.
Values between 0 and 1 will use up to
that percentage of available threads.Values outside this
range are ignored.
Defaults to 0.
character, optional
Choose the format of mdoel for prediction. optional are "coefficients" or "pmml".
Defaults to "coefficients".
Predicted values are returned as a DataFrame, structured as follows.
ID: with same name and type as data's ID column.
VALUE: type DOUBLE, representing predicted values.
DataFrame data.predict for prediction:
> data.predict$Collect()
ID X1 X2
1 0 0.5 0.30
2 1 4.0 0.40
3 2 0.0 1.60
4 3 0.3 0.45
5 4 0.4 1.70
Fitted values of the prediction data using a "ExponentialRegression" Object er:
> predict(model = er, data = data.predict, key = "ID")
ID VALUE
1 0 0.690059893
2 1 1.234150232
3 2 0.006630664
4 3 0.388797021
5 4 0.005210654