VelocerApri l'app

Velocer › Flashcard › University of Wisconsin–Madison › STAT 436: Statistical Data Visualization · UW-Madison

STAT 436: Statistical Data Visualization · UW-Madison

For STAT 436 exam review. · di nullpointer_7 · 90 carte

University of Wisconsin–Madison

Studia questo mazzo Incorpora

  1. Which R package implements the Grammar of Graphics?ggplot2.
  2. What data structure and decomposition approach is used for time series visualization?The tsibble data structure, along with time series decompositions.
  3. What two types of geospatial data are covered, and what projection concept is central?Vector and raster geospatial data, with Coordinate Reference System (CRS) projections.
  4. Which unsupervised learning methods are covered for high-dimensional data?K-means, hierarchical clustering, superheatmaps, PCA, UMAP, and LDA/Grade-of-Membership topic models.
  5. What is a Partial Dependence Profile used for?It is an interpretable ML tool for understanding how model predictions depend on features, used in model interpretation and diagnostics.
  6. What does 'expressiveness' and 'effectiveness' refer to in visualization?They are perceptual principles guiding which visual channels and marks best encode data accurately and meaningfully.
  7. What is a superheatmap used for?Visualizing high-dimensional data, often in the context of unsupervised learning and clustering.
  8. What are the three data types that must be classified before encoding a variable?Nominal (unordered categorical labels), ordinal (ordered categorical ranks), and quantitative (numeric where arithmetic differences/ratios are meaningful).
  9. What is the Grammar of Graphics in ggplot2?A statistical graphic maps data columns to visual properties (aes aesthetics/channels) of geometric objects (geom marks) under a coordinate system (coord) and scale transformation (scale).
  10. State Tamara Munzner's Expressiveness Principle.The visual encoding should express all of, and only, the relationships present in the data—no false ordering or misleading proportions.
  11. Give an example of violating the Expressiveness Principle.Encoding nominal data with a continuous sequential color gradient (implies false ordering), or truncating a bar chart axis so bar areas no longer reflect data ratios.
  12. What is the Effectiveness Principle's hierarchy of perceptual channels for quantitative comparison (most to least accurate)?Position along a common scale > position on identical non-aligned scales > length > angle/slope > area > volume/curvature > color saturation/luminance.
  13. What are Wickham's three rules for tidy data?Each variable forms a column, each observation forms a row, and each value forms a single cell.
  14. Why does tidy data matter for ggplot2?Because aes() maps columns to visual channels, so wide-format tables with values as column headers must be reshaped (e.g., via pivot_longer()) before mapping to axes or legends.
  15. When would you use pivot_wider()?To spread key-value pairs into columns, such as when computing cross-category differences or correlation matrices.
  16. What is the difference between facet_wrap() and facet_grid()?facet_wrap(~var) wraps a 1D ribbon of panels for one variable into a 2D grid; facet_grid(row_var ~ col_var) forms a strict 2D matrix where each cell shows data matching that row/column combination.
  17. What does geom_density_ridges() do and why is it useful?It stacks kernel density estimates or histograms vertically across many levels of a grouping variable, enabling compact distribution comparisons without severe overplotting.
  18. How do compound figures (patchwork) differ from faceting?Faceting shows the same plot specification across different data subsets, while compound figures combine different plot types or variables into a unified layout.
  19. What patchwork operators create side-by-side and stacked layouts?p1 + p2 places plots side-by-side horizontally; p1 / p2 stacks them vertically. plot_layout(guides = "collect") shares legends.
  20. What are the two main components of a Shiny application?The user interface (ui), a declarative layout with input widgets and output placeholders, and the server function, which transforms inputs into outputs via reactive expressions.
  21. Describe the structure of Shiny's reactive graph.A directed graph connecting reactive sources (input$* or reactiveVal()), reactive conductors (reactive({...}) caching intermediate computations), and reactive endpoints/observers (render*() or observe()).
  22. What happens in Shiny when an input changes?Shiny invalidates downstream conductors and endpoints and lazily re-evaluates only the affected subgraph.
  23. How do you correctly read and update a reactiveVal()?Reading requires calling it as a function, counter(), and updating requires counter(counter() + 1).
  24. What prevents an observe() from triggering an infinite loop when updating a reactiveVal?Wrapping the update in observeEvent(input$increment, ...) or using isolate() so the observer doesn't depend on the value it changes.
  25. What does passing click = "plot_click" or brush = "plot_brush" into plotOutput() enable in a Shiny app?It lets the server respond to click or brush events, filtering or highlighting rows via nearPoints(df, input\(plot_click) or brushedPoints(df, input\)plot_brush).
  26. How is linked brushing typically implemented across multiple Shiny plots?By storing selected observation IDs (or a boolean selection vector) in a reactiveVal(), so brushing one plot dynamically highlights or filters the same observations in other views.
  27. What is crosstalk::SharedData$new(df) used for?It enables browser-based JavaScript linked brushing and filtering across plotly, leaflet, and DT widgets in static HTML outputs (RMarkdown/Quarto) without a live R server.
  28. In Heer & Robertson's taxonomy, what is a View Transformation?Moving the camera (panning, zooming, 3D rotation) on a fixed visual encoding.
  29. In Heer & Robertson's taxonomy, what is Filtering?Smoothly entering/exiting data marks based on predicates, often implemented with D3's enter()–update–exit() pattern by animating opacity or r.
  30. In Heer & Robertson's taxonomy, what is a Substrate Transformation?Rescaling axes or applying transforms such as log scales to the coordinate system.
  31. In Heer & Robertson's taxonomy, what is Ordering?Sorting rows or columns of a heatmap or bar chart, animating SVG x/y or transform="translate(...)" attributes.
  32. In Heer & Robertson's taxonomy, what is a Timestep transition?Sliding or morphing a visualization across temporal snapshots.
  33. In Heer & Robertson's taxonomy, what is a Visualization Change?Morphing the visual encoding of the same data, e.g., stacked bars to grouped bars to a pie chart.
  34. In Heer & Robertson's taxonomy, what is a Data Schema Change?Adding or removing dimensions, e.g., transforming a 1D strip plot into a 2D scatterplot.
  35. What D3 pattern is commonly used to animate filtering transitions?The enter()–update–exit() pattern, animating properties like opacity or r as marks enter and exit.
  36. What two types of variables identify a tsibble?An explicit index variable (the time timestamp) and key variables that uniquely identify multiple series.
  37. What does STL decomposition break a time series into?Trend, seasonality, and remainder components: Y_t = T_t + S_t + R_t.
  38. What do seasonal plots (gg_season) and subseries plots (gg_subseries) help reveal?Seasonal peaks and phase shifts by wrapping time modulo the seasonal period and stacking years by color or facet.
  39. What pattern in an ACF plot indicates periodicity?An oscillating autocorrelation function.
  40. What pattern in an ACF plot indicates non-stationarity or trend?A slowly decaying positive autocorrelation.
  41. How can you avoid spaghetti-plot clutter when visualizing hundreds of time series?Use horizon plots, sparklines, or feature-based embeddings (STL/ACF summary statistics projected via PCA).
  42. What geometry types does sf store for vector data?Points, linestrings, polygons, and their MULTI* counterparts, held in a special geometry list-column.
  43. What kind of data does raster data (terra/stars) represent?Spatially gridded continuous measurements such as satellite imagery, elevation, or temperature, stored as regular pixel arrays.
  44. What is a Coordinate Reference System (CRS)?A system mapping 3D spherical/ellipsoidal coordinates onto a 2D planar projection; verify with st_crs() and align with st_transform() before spatial operations.
  45. What trade-off distinguishes equal-area from conformal projections?Equal-area projections preserve area while conformal projections preserve shape/angles.
  46. What two tables make up a tbl_graph?A node table (vertices and attributes) and an edge table (from, to, and edge weights/attributes).
  47. What are force-directed layouts (Fruchterman–Reingold, Kamada–Kawai) best used for?Node–link diagrams where connected nodes are positioned close together, good for path-tracing on sparse graphs (|V| < 1000).
  48. What is the main weakness of node–link diagrams on dense graphs?"Hairball" edge crossings that obscure structure.
  49. How do adjacency matrix views avoid edge-crossing occlusion?Rows and columns represent nodes and cell (i, j) encodes edge weight via color/fill, eliminating crossings and scaling to dense networks.
  50. Why should adjacency matrix rows/columns be seriated?Ordering by community or hierarchical clustering reveals block structure such as cliques and bipartite subgraphs.
  51. What do treemaps and circle packing encode?Hierarchical parent–child relationships via nested spatial containment, with quantitative attributes encoded by area.
  52. How does K-means clustering partition observations?By alternating between assigning points to the nearest centroid and updating each centroid to its cluster mean, minimizing within-cluster sum of squares.
  53. What does a dendrogram represent in hierarchical clustering?A multiscale nested tree built bottom-up by merging clusters according to a linkage criterion (single, complete, average, or Ward's).
  54. What do silhouette values near +1, near 0, and negative indicate?Near +1: tight, well-separated clusters; near 0: boundary points; negative: potential misassignment.
  55. How is cluster stability assessed?By bootstrapping or perturbing the dataset and checking whether cluster memberships remain consistent across resamples.
  56. What does PCA compute and via what decomposition?It linearly projects centered/scaled data onto orthogonal directions maximizing variance, computed via SVD X = U D V^T.
  57. What does a loadings plot show in PCA?How original features contribute to each principal component, shown as bar charts or biplot arrows.
  58. What does a scree plot display and what is it used for?The variance explained by each component (d_j² / Σ d_ℓ²), used to select the intrinsic linear dimension.
  59. How does UMAP construct its embedding?It builds a fuzzy local k-nearest-neighbor simplicial graph in high dimensions and optimizes a low-dimensional layout via cross-entropy minimization.
  60. How does the n_neighbors hyperparameter affect UMAP?Small values emphasize fine-grained local structure (possibly fragmenting global clusters); large values preserve broader global topology.
  61. What does an ICE (Individual Conditional Expectation) curve plot for observation i?It plots x_S ↦ f̂(x_S, x_{i,C}), holding all other features fixed at observation i's actual values.
  62. What do crossing ICE curves reveal?Feature interactions—the effect of the feature of interest depends on the values of other features.
  63. How is a Partial Dependence Profile (PDP) computed from ICE curves?It is the point-wise average of all n ICE curves: PDP_S(x_S) = (1/n) Σ f̂(x_S, x_{i,C}).
  64. What is the purpose of prior predictive checks in the Bayesian workflow?Simulating parameters and fake data from the prior before conditioning on data, to verify that priors generate scientifically plausible measurements.
  65. What do posterior predictive checks detect?Model misspecification such as unmodeled zero-inflation, skewness, or heteroscedasticity, by comparing simulated data from posterior draws against observed y.
  66. What do LOO residuals and Pareto-k diagnostics identify?Influential or poorly fit individual observations in a Bayesian model.
  67. What is the compositional feature hierarchy learned by CNN layers?Early layers learn local edge/color detectors, intermediate layers learn textures/parts, and deep layers learn object-level semantic concepts.
  68. What is activation maximization in deep learning feature visualization?Synthesizing an input image x* by gradient ascent to maximize a neuron/channel activation (with regularization for smoothness), revealing what pattern maximally excites it.
  69. What is the difference between dataset-driven inspection and optimization-driven feature visualization?Dataset-driven inspection passes real images through the network (activation heatmaps, PCA/UMAP embeddings); optimization-driven visualization synthesizes inputs via activation maximization.
  70. In LDA, what do the topic membership vector γ_i and topic distribution β_k represent?γ_i is sample i's probability vector over K topics (Dirichlet-distributed, summing to 1); β_k is topic k's probability distribution over vocabulary terms/genes (also Dirichlet, summing to 1).
  71. What do discriminative log-ratio scores log2(β_kv / β_k'v) highlight in topic models?Terms uniquely characterizing topic k relative to topic k'.
  72. What are the two main ways to visualize fitted topic models with tidytext?Structure plots (stacked bars or hierarchical clustering on memberships γ_i) for sample memberships, and faceted bar charts or log-ratio scores for topic profiles β_k.
  73. What is a key pitfall when interpreting UMAP/t-SNE plots?Distances between well-separated clusters and cluster densities are non-linearly warped and must not be over-interpreted quantitatively.
  74. What data types do LDA / grade-of-membership models handle?Discrete count data, such as word counts across documents, or microbial taxa / RNA-seq gene expression counts across biological samples.
  75. What must you do before using ggplot2 aes() with wide-format data?Convert it to long format with pivot_longer() first; wide-format data breaks aes() mapping.
  76. What is wrong with encoding a nominal variable using a continuous color gradient?Nominal variables should use discrete palettes, not continuous gradients, since the gradient implies ordering and magnitude that don't exist.
  77. In a Shiny reactive graph, what is the typical flow of dependencies?input → reactive → render*: inputs feed reactive expressions, which feed render functions that produce outputs.
  78. Why should you never mutate input$* values in Shiny?Inputs are managed by the browser/client; mutating them directly breaks reactivity. Use reactiveVal or update* functions instead.
  79. What causes an infinite loop when updating a reactiveVal in Shiny?Calling the reactiveVal update inside an unguarded observe(); guard it with isolate() or a condition to prevent re-triggering.
  80. Which R packages are used for time series decomposition and seasonal plots?tsibble, feasts, and fable; feasts provides gg_season, gg_subseries, STL decomposition, and ACF/CCF lag plots.
  81. Which ggplot2 geom functions handle vector and raster geospatial data?geom_sf() for vector polygons/points/lines and geom_spatraster() for gridded rasters.
  82. What are two common pitfalls in geospatial choropleth maps?Mismatched CRS projections (check st_crs) and unnormalized raw counts; normalize by population or area.
  83. When should you use a seriated adjacency matrix instead of a node-link diagram?For dense graphs, where node-link diagrams become hairballs; use node-link for sparse path queries.
  84. Why should you plot individual ICE curves alongside a PDP?PDPs hide heterogeneous effects when features interact; ICE curves reveal individual-level variation the average masks.
  85. Does scale_color_manual() work without mapping color inside aes()?No; the variable must first be mapped inside aes(color = ...). Calling scale_color_manual() without that mapping is invalid.
  86. In a facet_wrap(~ color) plot of the diamonds data, does each facet show all 53,940 rows?No; each facet shows only its subset of rows, partitioning the data across facets.
  87. How do you sort facets of clarity by median price?Reorder the faceting factor itself, e.g. mutate(clarity = reorder(clarity, price)), not the x aesthetic.
  88. How does patchwork combine p1 + p2 + p3 by default?Horizontally, placing the plots side by side.
  89. In ggridges geom_density_ridges(aes(x, y)), what do ridge heights encode?The conditional density of x within each level of y, not the value of y itself.
  90. What does aes() do in ggplot2?It maps dataset columns to properties (aesthetics) of graphical marks.

Velocer è gratis: ripetizione dilazionata e le tue carte da qualsiasi documento.

PDF to flashcards · Lecture to flashcards · Practice exam · Syllabus study plan · Anki import

Altri mazzi di University of Wisconsin–Madison