This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(dplyr) | |
library(ggbeeswarm) | |
cities <- c( | |
"Portland", "New York City", "Chicago", "Detroit", | |
"New Haven", "Boston", "Philadelphia", "St. Louis" | |
) | |
slice_data <- tibble( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(NMF) | |
# random non-negative matrix | |
v <- rmatrix(20, 10) | |
# fit an NMF model | |
x <- nmf(v, 5) | |
# decomposition components | |
x@fit@W | |
x@fit@H |