hanaml.ExponentialRegression.Rdhanaml.ExponentialRegression is a R wrapper for SAP HANA PAL Exponential Regression algorithm.
hanaml.ExponentialRegression( data = NULL, key = NULL, features = NULL, label = NULL, formula = NULL, decomposition = NULL, adjusted.r2 = NULL, pmml.export = NULL )
| data |
|
|---|---|
| key |
|
| features |
|
| label |
|
| formula |
|
| decomposition |
Defaults to "QR". |
| adjusted.r2 |
|
| pmml.export |
Default to "no". |
Return a "ExponentialRegression" object with following values:
coefficients: DataFrame
Fitted regression coefficients.
pmml: DataFrame
Regression model content in PMML format.
Set to NULL if no PMML model was requested.
model: DataFrame
Model is used to save coefficients or PMML model.
If PMML model is requested,
model defaults to PMML model. Otherwise, it is coefficients.
fitted: DataFrame
Predicted dependent variable values for training data.
Set to NULL if the training data has no row IDs.
statistics: DataFrame
Regression-related statistics, like mean square error, F-statistics, etc.
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.
Input DataFrame data:
> data$Collect()
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
Call the function:
er <- hanaml.ExponentialRegression(data = data, key = "ID", label = "Y", features = list("X1","X2"), pmml.export="multi-row")
Output:
> er$coefficients$Collect()
VARIABLE_NAME COEFFICIENT_VALUE
1 __PAL_INTERCEPT__ 2.727731
2 X1 2.674141
3 X2 -6.180427