Uses t-SNE on feature profiles (each feature viewed across samples) to project features to 2D positions. Discretizes to a grid. Resolves grid collisions by nearest-free-cell search.
Must be FIT on training data only to avoid leakage.
Requires Rtsne package.
Value
A list with:
positions: p x 2 integer matrix of (row, col) per featuregrid_size: the grid dimension
Examples
if (FALSE) { # \dontrun{
if (requireNamespace("Rtsne", quietly = TRUE)) {
X_train <- matrix(rnorm(70), nrow = 10, ncol = 7)
layout <- fit_deepinsight(X_train, grid_size = 7, seed = 1)
}
} # }