predict.LogisticRegression {hana.ml.r}R Documentation

Make Predictions from a "LogisticRegression" Object

Description

Similar to other predict methods, this function predicts fitted values from a fitted "LogisticRegression" object.

Usage

## S3 method for class 'LogisticRegression'
predict(model, key, data, features = NULL,
  verbose = FALSE)

Arguments

model

R6Class object
A LogisticRegression object for prediction.

key

character
Name of the ID column.

data

DataFrame
The DataFrame for prediction.

features

list of character, optional
Names of the feature columns. If not provided, it defaults to all non-ID columns.

verbose

logical, optional
Defaults to FALSE.

Value

Dataframe
Predicted values, structured as follows.

Examples

## Not run: 
 df2 <- conn$sql('select * from DATA_TBL_PREDICT') -
 The DataFrame for prediction
 predict(lr, df2, key = 'ID', features = list('V1', 'V2', 'V3'))
 - lr is a generated LogisticRegression object.

## End(Not run)

[Package hana.ml.r version 1.0.8 Index]