Description Usage Arguments Details Value Author(s) References Examples
Wrapper for the qkernel t-distributed stochastic neighbor embeddingg. qtSNE is a method for constructing a low dimensional embedding of high-dimensional data, distances or similarities.
1 2 3 4 5 6 7 8 9 10 | ## S4 method for signature 'matrix'
qtSNE(x,kernel = "rbfbase", qpar = list(sigma = 0.1, q = 0.9),
initial_config = NULL, no_dims=2, initial_dims=30, perplexity=30, max_iter= 1300,
min_cost=0, epoch_callback=NULL, epoch=100, na.action = na.omit, ...)
## S4 method for signature 'cndkernmatrix'
qtSNE(x,initial_config = NULL, no_dims=2, initial_dims=30,
perplexity=30, max_iter = 1000, min_cost=0, epoch_callback=NULL,epoch=100)
## S4 method for signature 'qkernmatrix'
qtSNE(x,initial_config = NULL, no_dims=2, initial_dims=30,
perplexity=30, max_iter = 1000, min_cost=0, epoch_callback=NULL,epoch=100)
|
x |
the matrix of data to be clustered or a kernel Matrix of class
|
kernel |
the kernel function used in computing the affinity matrix. This parameter can be set to any function, of class kernel, which computes a kernel function value between two vector arguments. kernlab provides the most popular kernel functions which can be used by setting the kernel parameter to the following strings:
The kernel parameter can also be set to a user defined function of class kernel by passing the function name as an argument. |
qpar |
a character string or the list of hyper-parameters (kernel parameters).
The default character string
Hyper-parameters for user defined kernels can be passed through the qkpar parameter as well. |
initial_config |
An intitial configure about x (default: NULL) |
no_dims |
the dimension of the resulting embedding. (default: 2) |
initial_dims |
The number of dimensions to use in reduction method. (default: 30) |
perplexity |
Perplexity parameter |
max_iter |
Number of iterations (default: 1300) |
min_cost |
The minimum cost for every object after the final iteration |
epoch_callback |
A callback function used after each epoch (an epoch here means a set number of iterations) |
epoch |
The interval of the number of iterations displayed (default: 100) |
na.action |
the action to perform on NA |
... |
Other arguments that can be passed to qtSNE |
When the initial_config argument is specified, the algorithm will automatically enter the final momentum stage. This stage has less large scale adjustment to the embedding, and is intended for small scale tweaking of positioning. This can greatly speed up the generation of embeddings for various similar X datasets, while also preserving overall embedding orientation.
qtSNE
gives out an S4 object which is a LIST with components
dimRed |
Matrix containing the new representations for the objects after qtSNE |
cndkernf |
The kernel function used |
Yusen Zhang
yusenzhang@126.com
Maaten, L. Van Der, 2014. Accelerating t-SNE using Tree-Based Algorithms. Journal of Machine Learning Research, 15, p.3221-3245.
van der Maaten, L.J.P. & Hinton, G.E., 2008. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research, 9, pp.2579-2605.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
#use iris data set
data(iris)
testset <- sample(1:150,20)
train <- as.matrix(iris[,1:4])
colors = rainbow(length(unique(iris$Species)))
names(colors) = unique(iris$Species)
#for matrix
ecb = function(x,y){
plot(x,t='n');
text(x,labels=iris$Species, col=colors[iris$Species])
}
kpc2 <- qtSNE(train, kernel = "rbfbase", qpar = list(sigma=1,q=0.8),
epoch_callback = ecb, perplexity=10, max_iter = 500)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.