predict.tsneReductor | R Documentation |
This function performs an embedding of new data using an existing embedding.
## S3 method for class 'tsneReductor' predict(object, k = NULL, ...)
object |
A returned object of tsneReductor function |
k |
The number is used for computing the means of #neighbors with min distance (#Neighbor=sqrt(#Samples/k). |
... |
New samples set |
tsneY:An embedding of new data
library("mlbench") data(Sonar) rndSamples <- sample(nrow(Sonar),150) trainData <- Sonar[rndSamples,] testData <- Sonar[-rndSamples,] tsne_trainData <- tsneReductor(trainData[,1:60],dim = 3,perplexity = 10,max_iter = 1000) tsne_testData <- predict(tsne_trainData,k=3,testData[,1:60])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.