Intro Thoughts

Status Quo

library(tidyverse)

Experiment

mammoth_3d_url <- "https://raw.githubusercontent.com/PAIR-code/understanding-umap/refs/heads/master/raw_data/mammoth_3d.json"

library(ggdims)



mammoth_df <- jsonlite::fromJSON(mammoth_3d_url) |>
  as.data.frame() 
'
colors_random <- colors() |> 
        sample(
          nrow(mammoth_df), 
          replace = T
          )

mammoth_df |>  
  ggplot() + 
  aes(V1, V2) + 
  geom_point(
    alpha = .5,
    color = colors_random #<< 
  )' |>
  ggram::ggram(code = _, widths = c(1,2), "First two dimensions of the the 3D Smithsonian mammoth data 🦣", subtitle = "A fun dataset for dimred intros!",
               caption = "Point colors randomly sampled from R colors(): 'returns the built-in color names'")
## Warning: Removed 10 rows containing missing values or values outside the scale range
## (`geom_hline()`).

mammoth_df |> 
  ggplot() + 
  aes(dims = dims(V1:V3)) + 
  geom_umap()
## Warning: Using `as.character()` on a quosure is deprecated as of rlang 0.3.0. Please use
## `as_label()` or `as_name()` instead.
## This warning is displayed once every 8 hours.
## Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
## `.name_repair` is omitted as of tibble 2.0.0.
## ℹ Using compatibility `.name_repair`.
## ℹ The deprecated feature was likely used in the ggdims package.
##   Please report the issue to the authors.
## This warning is displayed once per session.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## New names:
## • `V3` -> `V3...3`
## • `V3` -> `V3...7`

mammoth_df |> 
  ggplot() + 
  aes(dims = dims(V1:V3)) + 
  geom_tsne()

mammoth_df |> 
  ggplot() + 
  aes(dims = dims(V1:V3)) + 
  geom_pca()

Closing remarks, Other Relevant Work, Caveats