Jump to content

File:Uwot.png: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

19 December 2025

  • curprev 13:3313:33, 19 December 2025 Brb talk contribs 1,471 bytes +1,471 <syntaxhighlight lang='r'> # Prepare data library(uwot) library(ggplot2) library(dplyr) # training and test sets (as given) iris_train <- iris[c(1:10, 51:60), ] iris_test <- iris[100:110, ] # numeric feature matrices x_train <- as.matrix(iris_train[, 1:4]) x_test <- as.matrix(iris_test[, 1:4]) # Fit UMAP on training data (keep model) set.seed(123) umap_model <- umap( x_train, n_neighbors = 5, min_dist = 0.1, n_components = 2, ret_model = TRUE ) # training embedding train_embe...