hanaml.TSNE.Rdhanaml.TSNE is a R wrapper for SAP HANA PAL T-distributed Stochastic Neighbour Embedding.
hanaml.TSNE( data = NULL, key = NULL, features = NULL, max.iter = NULL, obj.freq = NULL, dim = NULL, learning.rate = NULL, theta = NULL, perplexity = NULL, exaggeration = NULL, random.state = NULL, thread.ratio = NULL )
| data |
|
|---|---|
| key |
|
| features |
|
| max.iter |
|
| obj.freq |
|
| dim |
|
| learning.rate |
|
| theta |
|
| perplexity |
|
| exaggeration |
|
| random.state |
|
| thread.ratio |
|
Returns a list of DataFrame
DataFrame 1
Result of points in low-dimensional embedded space, structured as follows
ID: ID (correspond to input table).
x: Coordinate value of the 1st dimension.
y: Coordinate value of the 2nd dimension.
z: Coordinate value of the 3rd dimension.(NULL if the embedded space is 2 dimension)
DataFrame 2
Statistical info, structured as follows
STAT_NAME: Statistics name.
STAT_VALUE: Statistics value.
DataFrame 3
Recorded values of objective function for TSNE.
ITER: Iteration step.
OBJ_VALUE: Objective value of the iteration.
This algorithm prepares the data for visualization of the data with the TSNE method. It returns a DataFrame of two-dimensional embeddings of the high-dimensional rows of input data.
> data$Collect() ID ATT1 ATT2 ATT3 ATT4 ATT5 1 1 1 2 -10 -20 3 2 2 4 5 -30 -10 6 3 3 7 8 -40 -50 9 4 4 10 11 -25 -15 12 5 5 13 14 -12 -24 15 6 6 16 17 -9 -13 18
Call the function:
> results <- hanaml.TSNE(data = data, perplexity = 1, max.iter = 500,
dim = 3, theta = 0, obj.freq = 50, random.state = 30)
Results:
> results[[1]]$Collect() ID x y z 1 1 4.875853 -189.0905 -229.5364 2 2 -67.675459 213.6617 178.3976 3 3 -68.852910 162.7109 284.9663 4 4 -68.056108 193.1181 220.2754 5 5 76.524624 -189.8509 -227.6257 6 6 123.184000 -190.5492 -226.4772