Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions inst/pages/clustering.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,13 @@ features.
#| fig-height: 2

# Get the estimates on how much each phylum contributes on each cluster
best_model <- metadata(altExp(tse, "prevalent"))$DMM$dmm[2]
drivers <- as.data.frame(best_model[[1]]@fit$Estimate)
models <- metadata(altExp(tse, "prevalent"))$DMM
n_clusters <- models[["best"]]
best_model <- models[["dmm"]][[n_clusters]]
drivers <- fitted(best_model, scale = TRUE)

# Plot by utilizing miaViz's function plotLoadings
plotLoadings(as.matrix(drivers), ncomponents = 2)
plotLoadings(drivers, ncomponents = 2)
```

As well as in hierarchical clustering, we can also visualize the clusters by
Expand Down
Loading