hanaml.ExponentialRegression {hana.ml.r}R Documentation

Exponential Regression

Description

hanaml.ExponentialRegression is a R wrapper for PAL Exponential Regression algorithm.

Usage

hanaml.ExponentialRegression (conn.context,
                             data = NULL,
                             key = NULL,
                             features = NULL,
                             label = NULL,
                             formula = NULL,
                             decomposition = NULL,
                             adjusted.r2 = NULL,
                             pmml.export = NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

key

character, optional
Name of the ID column. If not provided, the data is assumed to have no ID column. No default value.

features

character or list characters, optional
Name of the features column.
If not provided, it defaults the the all non-ID, non-label column of data.

label

character
Name of the column in data that specifies the dependent variable. Defaults to the last column of data if not provided.

formula

formula type, optional
Formula to be used for model generation. format = label~<feature_list> e.g.formula = LABEL~V1+V2+V3 You can either give the formula, or features and label combination. Do not provide both.
Defaults to NULL.

decomposition

{"LU", "SVD"}, optional
Specifies decomposition method.

  • "LU": Doolittle decomposition.

  • "SVD": singular value decomposition.

Defaults to "LU".

adjusted.r2

logical, optional
If TRUE, include the adjusted R^2 value in the statistics table.
Defaults to FALSE.

pmml.export

{"no", "single-row", "multi-row"}, optional
Controls whether to output a PMML representation of the model, and how to format the PMML.

  • "no": No PMML model.

  • "single-row": Exports a PMML model in a maximum of one row. Fails if the model doesn't fit in one row.

  • "multi-row": Exports a PMML model, splitting it across multiple rows if it doesn't fit in one.

Defaults to "no".

Format

R6Class object.

Details

Exponential regression is an approach to modeling the relationship between a scalar variable y and one or more variables denoted X. In exponential regression, data is modeled using exponential functions, and unknown model parameters are estimated from the data. Such models are called exponential models.

Value

Return a "ExponentialRegression" object with following values:

See Also

predict.ExponentialRegression

Examples

## Not run: 
 Training DataFrame data:

 > data
       ID    Y   X1   X2
    1   0 0.50 0.13 0.33
    2   1 0.15 0.14 0.34
    3   2 0.25 0.15 0.36
    4   3 0.35 0.16 0.35
    5   4 0.45 0.17 0.37
    6   5 0.55 0.18 0.38
    7   6 0.65 0.19 0.39
    8   7 0.75 0.19 0.31
    9   8 0.85 0.11 0.32
    10  9 0.95 0.12 0.33

 Train the model:

 er <-  hanaml.ExponentialRegression(conn.context = conn,
                                     data = data.fit,
                                     key = 'ID',
                                     label = 'Y',
                                     features = list('X1','X2'),
                                     pmml.export='multi-row')

 Output:

 > er$coefficients
 VARIABLE_NAME COEFFICIENT_VALUE
 1 __PAL_INTERCEPT__          2.727731
 2                X1          2.674141
 3                X2         -6.180427


## End(Not run)

[Package hana.ml.r version 1.0.8 Index]