بنقرة واحدة
umap
R umap package for UMAP. Use for Uniform Manifold Approximation and Projection visualization.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
R umap package for UMAP. Use for Uniform Manifold Approximation and Projection visualization.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
R language data analysis and visualization skill. Use when user asks to (1) run R scripts or code, (2) install/update R packages, (3) perform data analysis with R, (4) create visualizations with ggplot2/plotly, (5) statistical analysis, (6) data manipulation with tidyverse/dplyr/data.table. Triggers on keywords like "R语言", "R脚本", "ggplot", "tidyverse", "数据分析", "可视化".
R DALEX package for model explanations. Use for explaining complex machine learning models.
R iml package for interpretable ML. Use for model-agnostic interpretability methods.
R lime package for local explanations. Use for explaining individual predictions with local interpretable models.
R packages for ML interpretability. Use for explaining and interpreting machine learning models.
R vip package for variable importance. Use for computing and visualizing variable importance scores.
| name | umap |
| description | R umap package for UMAP. Use for Uniform Manifold Approximation and Projection visualization. |
Uniform Manifold Approximation and Projection.
library(umap)
# Run UMAP
um <- umap(data)
# Results
um$layout # 2D coordinates
# Plot
plot(um$layout, col = labels, pch = 19)
# Custom configuration
config <- umap.defaults
config$n_neighbors <- 15
config$min_dist <- 0.1
config$metric <- "euclidean"
config$n_epochs <- 200
um <- umap(data, config = config)
um <- umap(data,
n_neighbors = 15, # Local neighborhood size
n_components = 2, # Output dimensions
metric = "euclidean",
n_epochs = 200,
min_dist = 0.1, # Minimum distance in embedding
spread = 1,
random_state = 42
)
# R implementation (default)
um <- umap(data, method = "naive")
# Python implementation (requires reticulate)
um <- umap(data, method = "umap-learn")
# Fit UMAP
um <- umap(train_data)
# Transform new data
new_coords <- predict(um, new_data)
# Compute distances
d <- as.matrix(dist(data))
# UMAP from distances
um <- umap(d, input = "dist")
# With labels
um <- umap(data, labels = labels)
library(ggplot2)
umap_df <- data.frame(
x = um$layout[, 1],
y = um$layout[, 2],
label = labels
)
ggplot(umap_df, aes(x, y, color = label)) +
geom_point(alpha = 0.7) +
theme_minimal() +
labs(title = "UMAP Projection")
# n_neighbors: larger = more global structure
# min_dist: smaller = tighter clusters
# Try different parameters
params <- expand.grid(
n_neighbors = c(5, 15, 50),
min_dist = c(0.01, 0.1, 0.5)
)