Skip to content

Add Pokémon dimensionality reduction explorer#19

Open
jbkunst wants to merge 11 commits into
masterfrom
pokemon-dimensionality-reduction
Open

Add Pokémon dimensionality reduction explorer#19
jbkunst wants to merge 11 commits into
masterfrom
pokemon-dimensionality-reduction

Conversation

@jbkunst

@jbkunst jbkunst commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What

  • adds a Pokémon-themed Shiny app focused on one large Highcharter scatter
  • lets users switch between PCA, t-SNE, and UMAP
  • exposes t-SNE perplexity/iterations and UMAP neighbors/minimum distance
  • uses Pokémon sprites as chart markers and a rich HTML tooltip with official artwork, types, generation, size, battle stats, capture rate, happiness, growth, habitat, hatch counter, and special status
  • includes Pokémon-inspired dashboard styling based on the spirit of the old flexdashboard example

Data preparation

  • prepare_data.R downloads maintained PokeAPI CSV tables and builds the joined Pokémon dataset
  • includes battle stats, height, weight, base experience, capture rate, base happiness, hatch counter, gender rate, baby/legendary/mythical flags, growth rate, body color, body shape, habitat, types, and egg groups
  • no arbitrary rarity score is invented: capture rate plus legendary/mythical flags remain explicit source variables

Mixed-data preprocessing

  • continuous features are median-imputed and standardized
  • binary flags stay as 0/1; rare flags are deliberately not z-scored
  • PokeAPI gender_rate = -1 is handled as a separate genderless flag plus a bounded female-ratio feature
  • nominal variables are one-hot encoded as 0/1 indicators
  • semantic blocks are normalized by 1 / sqrt(number of columns) so a dummy-heavy block does not dominate Euclidean distance merely because it creates more columns
  • block weights are explicit and default to 1 so sensitivity can be reviewed later
  • PCA centers the final matrix but does not rescale it again; t-SNE and UMAP consume the same prepared Euclidean feature space

Runtime

  • marked Runtime: server, consistent with the existing dimensionality-reduction app and its Rtsne/uwot dependencies
  • embeddings are intentionally computed at runtime so parameters remain interactive

Validation

  • reviewed statically against the current repository conventions
  • not executed locally in this environment because an R runtime is not available here
  • no generated gallery/docs files are included
  • no empty commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant