SmultiSNE | R Documentation |
This function performs S-multi-SNE, a visualization and classification algorithm for multi-view data. One of the data-views in the input list contains the labeling information with dummy variables representing the different clusters. Unlabeled samples are represented with NA in all variables of the labeling data-view.
SmultiSNE(
X,
initial_config = NULL,
k = 2,
initial_dims = 30,
perplexity = 30,
max_iter = 1000,
min_cost = 0,
epoch_callback = NULL,
whitening = FALSE,
epoch = 100,
weights = NULL,
weightUpdating = TRUE,
lambdaParameter = 1
)
X |
A list with each element representing a data-view. All data-views must have the same number of rows. |
initial_config |
Initialization matrix, specifying the initial embedding for each data-view. Should be a list of the same length as X. Default is NULL. |
k |
Number of dimensions in the lhydatent embeddings. Default is 2. |
initial_dims |
The number of dimensions of the whitened data-views, if whitening True. Default is 30. |
perplexity |
Value of perplexity parameter. Default is 30. |
max_iter |
Maximum number of iterations to run. Default is 1000. |
min_cost |
Minimum cost to halt iteration Default is 0. |
epoch_callback |
A callback function used after each epoch (an epoch here means a set number of iterations). Default is NULL. |
whitening |
If True, whitening process to reduce the dimensions of the input data-views will be applied prior to multi-SNE. Default is FALSE. |
epoch |
The number of iterations in between update messages. Default is 100. |
weights |
Initialization of the weights. A vector of the same length as X. Default is NULL. |
weightUpdating |
Boolean. If True, weights will be updated at each iteration. Default is FALSE. |
lambdaParameter |
Parameter to indicate the contribution of weight update. Default is 1. |
Y : The latent embeddings.
Weights : A matrix containing the weights used for each iteration. Rows represent the iteration and columns the data-view.
Errors : A matrix containing the errors used for each iteration. Rows represent the iteration and columns the data-view.
# Get sample data
X <- vector("list")
X$first_dataView <- rbind(matrix(rnorm(10000),nrow=500,ncol=20), matrix(rnorm(5000, mean=1,sd=2),nrow=250,ncol=20))
X$second_dataView <- rbind(matrix(rpois(20000, lambda = 1),nrow=500,40), matrix(rpois(10000, lambda=3),250,40))
X$labeling <- rbind(cbind(rep(1,500), rep(0,500)), cbind(rep(0,250), rep(1,250)))
nan_index <- sample(seq(1,750,1),250)
X$labeling[nan_index,] <- c(NA,NA)
# Run S-multi-SNE
Y <- SmultiSNE(X, max_iter = 200)
true_labels <- c(rep(2,500), rep(3,250))
missing_labels <- true_labels
missing_labels[nan_index] <- 1
par(mfrow=c(1,2))
plot(Y$Y, col = true_labels, pch=19)
plot(Y$Y, col = missing_labels, pch=19)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.