layout: false class: split-33 with-thick-border border-black <style type="text/css"> /* custom.css */ :root{ --main-color1: #2f4c7a; --main-color2: #bcbddc; --main-color3: #efedf5; --main-color4: #9DDAE5; --text-color3: black; --text-color4: black; --code-inline-color: #4e5054; --link-color: #006CAB; } .large { font-size: 150% } .largeish { font-size: 120% } .summarystyle { font-size: 150%; line-height:150%;} </style> .column[.bottom_abs.content[ <img src="images/monash-university-logo-transparent.png" width="70%"> ]] .column.bg-main1[.content.vmiddle[.center[ # Visualising physics ### High-dimensional data visualisation for physics applications <br> <br> # Ursula Laa ### School of Physics and Astronomy ### & ### Department of Econometrics and Business Statistics ]]] --- class: split-two .column[.content[ # Why visualise data? <br> .large[Example: Anscombe's quartet] .centre[ <img src="images/Anscombe.png" width="75%"> <br> from Wikipedia ] .large[All four datasets have nearly identical simple descriptive statistics (mean, variance, correlation, linear regression line)!] ]] -- .column[.content.vmiddle[ ## Visualisation in physics .large[ * analyse, understand and interpret results * guide intuition on phenomena beyond direct experience * diagnose problems * communicate results ] .large[Effective thanks to our ability to recognize patterns and identify subtle features in images] <br> .large[The greatest value of a picture is when it forces us to notice what we never expected to see. (John Tukey)] ]] --- # Need for visualisation in high dimensions <br> ## In physics we often encounter high-dimensional data: * .large[__Measurements__: experimental observations are often multivariate] * .large[__Models__: theoretical models typically have multiple free parameters] <br> -- ### Typical visualisation methods rely on some form of dimension reduction (projecting, marginalising or profiling), showing either pairs of variables (e.g. "corner plots") or a selection based on prior knowledge <br> -- ### Systematic approaches to data visualisation have been developed in statistics, but are rarely used in physics --- class: middle center bg-main1 # Systematic approaches --- class: split-two .column[.content[ # Principal component analysis (PCA) <br> .large[PCA is an orthogonal linear transformation onto a coordinate system such that the first basis direction is aligned with the maximum variance in the data, the second basis is the direction of maximum variation orthogonal to the first coordinate, and the remaining bases are sequentially computed analogously] <br> -- .large[It can be used for dimension reduction as the first few principal components (PCs) capture most of the information] ]] -- .column[.content.vmiddle[.center[ <img src="images/pca_example.png" width="75%"> ]]] --- class: split-33 with-border border-black .column[.content.vmiddle[ # Principal component analysis in astrophysics ### Example from [arXiv:0610016] .large[On "The fundamental properties of galaxies and a new galaxy classification system"] ]] .column[.content.vmiddle[.center[ .large[Mapping galaxy properties onto principal components] <img src="images/pca_example_table.pdf" width="55%"> <br> .large[The first three PCs separate galaxies by type] <img src="images/pca_example_plots.pdf" width="75%"> ]]] --- class: split-three .column[.content[ # Non-linear methods <br> .large[ * typically aim to preserve distance structure in the data, globally or locally * the most popular methods include MDS, t-SNE and UMAP * used e.g. in bioinformatics, text analysis, machine learning to visualise clustering] <br> .large[Example: MNIST dataset] .center[ <img src="images/MnistExamples.png" width="55%"> ] ]] -- .column[.content.vmiddle[.center[ <img src="images/umap_tsne_pca.png" width="65%"> <br> from [arXiv:1802.03426] ]]] -- .column[.content.vmiddle[.center[ .large[Visualising topology of collider events] <br> <img src="images/tsne_jets.pdf" width="65%"> <br> from [arXiv:1902.02346] <br> .large[Visualisation of Ising configurations] <br> <img src="images/tsne_cond_mat.pdf" width="55%"> <br> from [arXiv:1605.01735] ]]] --- class: split-two .column[.content[ # Parallel coordinates .large[Represent n-dimensional space by n parallel lines, each observation is drawn as line connecting the n vertices with the axes] .center[ <img src="images/Parallel_coordinates-sample.png" width="85%"> <br> from Wikipedia] .large[__Considerations:__ order and scaling matters, good for identifying patterns, but we can only show n-1 bivariate relations] ]] -- .column[.content.vmiddle[ ## Particle physics example .large[finding patterns in key properties predicted for allowed new physics scenarios] .center[ <img src="images/cms_pmssm.pdf" width="85%"> <br> from [CMS-SUS-15010]] ]] --- <br> ## PCA is easy to interpret (we can invert the linear projection to understand the results in terms of the original parameters) but is most useful for linear relations <br> -- ## Non-linear methods capture more structure but may distort distances, shapes and topology and interpretation is limited (we cannot invert the projection) <br> -- ## Easy to look at multiple dimensions with parallel coordinates, but we lose information --- class: middle center bg-main1 # Dynamic projections # - # Tour algorithm --- # The Grand Tour .large[__Idea__: viewing multivariate distributions from different directions by displaying smooth transitions between randomly selected linear projections, to allow extrapolating the multidimensional shape] <br> -- .large[__Example__: projections of a 3-dimensional wire-frame cube] .center[
] Example videos taken from [here](http://schloerke.com/geozoo/) --- # Increasing Dimensionality <br> .large[The tour is not limited to 3-d, for example we can look at the projections of a 4-dimensional wire frame cube] <br> .center[
] --- # Increasing Dimensionality <br> .large[Or a seven dimensional one!] <br> .center[
] --- class: middle center bg-main1 # A first view of physics data --- # Visualisation of a 6-parameter fit to B anomalies .center[ <iframe src="images/bFitanim.html" width="800" height="500" scrolling="yes" seamless="seamless" frameBorder="0"> </iframe> ] .largeish[Described in [arXiv:1811.10793]] --- class: middle center bg-main1 # Exploring grouping in high dimensions ### [arXiv:1806.09742] --- # Exploring structure in high dimensions .large[__Idea__: use tour visualisations for identification and exploration of grouping, to find outlying points and other structure in high dimensional distributions] <br> -- ## Example: PDFSense data .largeish[ __PDFSense__ [arXiv:1803.02777] aims to study the sensitivity of hadronic experiments to nucleon structure, encoded in "fit residuals" (defining a 56 dimensional parameter space) ] .largeish[__Objective__: by studying the fit residuals we learn about * grouping: show how different types of measurements constrain different directions in parameter space * relevance to the fit: the residuals encode the sensitivity of the fit to single measurements, so finding observables that are different from the main distribution (i.e. all the other measurements) means finding those which are expected to be important in future fits Visualisation is a great way of addressing these questions! ] --- # A first attempt at visualisation .large[In [arXiv:1803.02777] the authors use PCA and t-SNE for the visualisation of the dataset.] -- .center[<img src="images/pdfsense.pdf" width="85%">] -- .large[This already shows grouping and interesting structure, let's see what else we can learn when looking at it in the grand tour!] --- # Preparing the visualisation <div style="line-height:50%;"> <br> </div> ### Data preparation .large[ * First step: simple data preprocessing, i.e. centring each parameter direction, or additionally sphering each observation to have length 1 in the full parameter space * We next reduce the dimensionality from 56 to 6 first principal components (this corresponds to about 50% of overall variance in the data) * Rescale each principal component to range [0,1] to give equal optical weights to all principal directions ] ### Grouping according to type of experiment .large[ * As considered in the original PDFSense paper, there are three groups of experiments that we can distinguish in the visualisation * In addition, when considering only one of the groups, we can apply a finer grouping allowing to pinpoint e.g. where outliers occur ] --- # Reproducing the PCA view in a dynamic tour display <br> <img src="gifs/allsphere.gif" width="40%" height="40%" style="display: block; margin: auto;" /> <br> -- .large[This is sphered data, which is producing artefacts in the views and removes the relevant length information.] --- # A tour display without sphering <br> .large[A much clearer picture is found when looking at the centred (rather than sphered) data.] <br> -- <img src="gifs/allcenter.gif" width="40%" height="40%" style="display: block; margin: auto;" /> --- layout: false class: split-33 with-border border-black .column[.content.vmiddle[ # Going into details - The jets cluster <br> .large[Focusing on one group, we can for example compare in detail the distributions obtained for different experiments, visually identify outlying points] ]] .column[.content.vmiddle[.center[ <img src="gifs/jetCluster.gif" width="70%" height="70%" style="display: block; margin: auto;" /> ]]] --- <br> ## The tour gives a more comprehensive picture of the multidimensional distribution, showing a more refined view of the grouping and allowing visual detection of multivariate outliers <br> -- ## Visual analysis allows a better understanding of the method itself and can uncover unexpected features, and even possibly errors <br> -- ## As dimensionality increases (or feature size becomes small) we may want to steer the tour towards more interesting views of the data --- class: middle center bg-main1 # Projection pursuit ### [arXiv:1902.00181] --- class: split-60 .column[.content[ # Projection pursuit <br> .large[__Idea__: find interesting low-dimensional projections of high-dimensional data by optimizing an index over all possible projections] <br> .large[We can combine the idea of projection pursuit with the grand tour, this is called a guided tour and will move towards more interesting views of the data by increasing the index for each step] <br> .large[But how can we define interesting? Typical index functions aim to detect departure from known distributions (in particular normal distributions), or clustering. What about complex bivariate patterns?] ]] -- .column[.content.vmiddle[.center[ <img src="images/data-1.pdf" width="75%"> ]]] --- class: split-three .column[.content[ # Index functions considered <br> .largeish[We consider index functions developed for variable selection in large datasets] .largeish[ * __scagnostics__: scatterplot diagnostics, based on graph-theoretic measures (using convex hull, alpha hull, minimal spanning tree) * __association measures__: for example fitting a spline model and comparing the variance in the residuals * __information__: mutual information measures how much one variable tells us about another, we can use the maximum information coefficient (MIC) as an index ] ]] -- .column[.content.vmiddle[.center[ .large[Scagnostics measures] <img src="images/scagnostics.pdf" width="65%"> <br> from [Wilkinson, Anand, Grossman (2005)] ]]] -- .column[.content.vmiddle[.center[ .large[Smoothing splines] <br> <img src="images/spline.png" width="65%"> <br> example from scipy <br> .large[MIC] <br> <img src="images/mic.pdf" width="65%"> <br> from [Reshef et al. (2012)] ]]] --- class: split-two .column[.content.vmiddle[ # Criteria for good index functions <br> .largeish[ * __smoothness__: index values vary smoothly over interpolated tour paths * __squintability__: how far from the ideal view structure is visible * __flexibility__: ability to detect a range of structures * __rotation invariance__: orientation should not affect the index value * __speed__: index needs to be evaluated many times during optimisation <br> ### Rating of considered index functions .center[<img src="images/index_rating.pdf" width="85%">] ] ]] -- .column[.content[ ## Tracing index functions from nuisance to structured views .center[<img src="images/wIntermediate-1.pdf" width="75%">] ]] --- class: split-two .column[.content[ # Looking at posterior samples from LIGO describing GW170817 <br> .center[<img src="images/neutronStarSPLOM-1.pdf" width="75%"> ]]] -- .column[.content.vmiddle[ ### Optimising the spline index over all projections (with m2 removed) we can find parameter combinations with strong functional dependence <br> .center[<img src="images/nsePlotOrig-1.pdf" width="75%">] <br> ### Remove L1 and repeat .center[<img src="images/nseRemL1-1.pdf" width="75%">] ]] --- # Guided tour example .large[Considering 11-d posterior sample fitting a simulated gravitational wave signal, using the guided tour and optimising the TIC index to move towards more structured views of the distribution] .center[ <iframe src="images/BBH.html" width="800" height="500" scrolling="yes" seamless="seamless" frameBorder="0"> </iframe> ] --- class: split-two .column[.content[ # Projection pursuit on grouped data <br> .large[We can also use projection pursuit to understand how groups in a dataset differ in a multidimensional parameter space] <br> .large[For example searching for projections that separates parameter regions by quality of the fit to experimental data] <br> .large[Work in progress (by Cristian Sierra): comparing predictions from a 2HDM to EFT fits to the B anomalies, trying to separate points within 1 σ of the best fit (red) from other sample points (black)] ]] .column[.content.center.vmiddle[
]] --- <br> ### Projection pursuit and the guided tour allow us to uncover interesting views, for example looking for structure in combinations of variables in posterior distributions <br> -- ### None of the considered index functions meets all criteria, and we may want to desing new functions to solve specific problems (e.g. finding projections with minimum overlap between two groups) <br> -- ### Better optimisation methods are required especially when increasing dimensionality <br> <br> -- .center[ ## How can you use these methods to look at your data? ] --- class: middle center bg-main1 # The galahr package ### https://uschilaa.github.io/galahr/ --- # galahr demo .center[
] --- class: bg-main1 # Summary .large[▷ Dimension reduction is common when making visualisations of physics data, and is typically based on prior knowledge (or exploration)] -- .large[▷ Systematic approaches exist and should be used] -- .large[▷ The tour allows us to visualise distributions in more than two dimensions, providing new insights and better understanding] -- .large[▷ Projection pursuit may be used to extract relations between linear combinations of parameters] -- .large[▷ You can easily do this using the galahr R package!] -- .large[▷ Sometimes projections are not sufficient to show the full information, e.g. hollow vs full sphere, we should think about systematic approaches to slicing as well] --- class: bg-main1 #Thanks! .large[This work was done in collaboration with Dianne Cook and German Valencia.] .large[Special thanks to Rory Smith for providing interesting examples!] .large[These slides are made with R markdown using xaringan and the Kunoichi theme.] ****** # References: .large[ Using tours to visually investigate properties of new projection pursuit indexes with application to problems in physics, U. Laa and D. Cook, arXiv:1902.00181, in revision ] .large[Anatomy of a six-parameter fit to the b → s l<sup>+</sup> l<sup>-</sup> anomalies, B. Capdevila, U. Laa and G. Valencia, arXiv:1811.10793, Eur.Phys.J. C __79__, no.6, 462 (2019)] .large[Dynamical projections for the visualization of PDFSense data, D. Cook, U. Laa and G. Valencia, arXiv:1806.09742, Eur. Phys. J. C __78__, no. 9, 742 (2018)]