| hanaml.PolynomialRegression {hana.ml.r} | R Documentation |
hanaml.PolynomialRegression is a R wrapper for PAL Polynomial Regression.
hanaml.PolynomialRegression (conn.context,
data = NULL,
key = NULL,
features = NULL,
label = NULL,
formula = NULL,
degree = NULL,
decomposition = NULL,
adjusted.r2 = NULL,
pmml.export = NULL)
conn.context |
|
data |
|
key |
|
features |
|
label |
|
formula |
|
degree |
|
decomposition |
Defaults to "LU". |
adjusted.r2 |
|
pmml.export |
Default to "no". |
R6Class object.
Polynomial regression is an approach to modeling the relationship between a scalar variable y and a variable denoted X. In polynomial regression, data is modeled using polynomial functions, and unknown model parameters are estimated from the data. Such models are called polynomial models.
coefficients : DataFrame
Fitted regression coefficients.
pmml : DataFrame
PMML model. Set to NULL if no PMML model is 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, such as mean squared error.
## Not run:
Input DataFrame df for training:
>df$Collect()
ID Y X1
1 0 5 1
2 1 20 2
3 2 43 3
4 3 89 4
5 4 166 5
6 5 247 6
7 6 403 7
Training the model:
>pr <- hanaml.PolynomialRegression(conn, data.fit, key = "ID", formula= Y~X1,
degree = 3L, pmml.export = "multi-row")
Output:
> pr$coefficients$Collect()
VARIABLE_NAME COEFFICIENT_VALUE
1 __PAL_INTERCEPT__ -11.000000
2 X1__PAL_DELIMIT__1 17.250000
3 X1__PAL_DELIMIT__2 -3.416667
4 X1__PAL_DELIMIT__3 1.333333
## End(Not run)