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

Bi-variate Geometric Regression

Description

hanaml.GeometricRegression is a R wrapper for PAL Bi-variate GeometricRegression algorithm.

Usage

hanaml.GeometricRegression (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, optional
Name of the feature column.
If not provided, it defaults the the first 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 a 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.

Default to "no".

Format

R6Class object.

Details

Geometric regression is an approach used to model the relationship between a scalar variable y and a variable denoted X. In geometric regression, data is modeled using geometric functions, and unknown model parameters are estimated from the data. Such models are called geometric models.

Value

Return a "GeometricRegression" object with following values:

See Also

predict.GeometricRegression

Examples

## Not run: 
 Training DataFrame df:

 > df
    ID     Y X1
 1   0   1.1  1
 2   1   4.2  2
 3   2   8.9  3
 4   3  16.3  4
 5   4  24.0  5
 6   5  36.0  6
 7   6  48.0  7
 8   7  64.0  8
 9   8  80.0  9
 10  9 101.0 10

 Train the model:

 > gr <-  hanaml.GeometricRegression(conn.context = conn, data = df, key = 'ID', label = 'Y',
                                     pmml.export='multi-row')

 Output:

 > gr$coefficients
       VARIABLE_NAME COEFFICIENT_VALUE
 1 __PAL_INTERCEPT__          1.072219
 2                X1          1.959633


## End(Not run)

[Package hana.ml.r version 1.0.8 Index]