transform.DiscriminantAnalysis {hana.ml.r} | R Documentation |
Make Projections from a Linear Discriminant Analysis Object
## S3 method for class 'DiscriminantAnalysis' transform(model, data, key, features = NULL, proj.dim = NULL)
model |
|
data |
|
key |
|
features |
|
proj.dim |
|
DataFrame
Projected result, structured as follows:
1st column, ID, with the same name and data type as data for projection.
other columns with name DISCRIMINANT_i, where i iterates from 1 to the number of elements in features, data type DOUBLE.
## Not run: Perform transform with a DiscriminantAnalysis object 'lda': > result <- transform(lda, test.set, key = "ID" features=list("ID","X1","X2","X3","X4")) > result$Collect() ID DISCRIMINANT_1 DISCRIMINANT_2 DISCRIMINANT_3 DISCRIMINANT_4 0 1 12.313584 -0.245578 None None 1 2 10.732231 1.432811 None None 2 3 11.215154 0.184080 None None 3 4 10.015174 -0.214504 None None ... 26 27 -7.058927 -0.877426 None None 27 28 -8.754272 -0.095103 None None 28 29 -8.935789 1.285655 None None 29 30 -8.674729 -1.208049 None None ## End(Not run)