Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - contact me Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca on Twitter Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Lumondo Photography Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Pi Art Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Hilbertonians - Creatures on the Hilbert Curve
syncopation & accordionCafe de Flore (Doctor Rockit)like France, but no dog poopmore quotes

UCD Computational and Molecular Biology Symposium, Dublin, Ireland. 1-2 Dec 2016.


visualization + design

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The 2016 Pi Day art imagines the digits of Pi as physical masses collapsing under gravity and is featured in the articles The Gravity of Pi and The Boundless Beauty of Pi at the Scientific American SA Visual blog.

`\pi` Day 2016 Art Posters


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` approximation day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2015 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` approx day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2013 `\pi` day

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Circular `\pi` art

On March 14th celebrate Pi Day. Hug `\pi`—find a way to do it.

For those who favour `\tau=2\pi` will have to postpone celebrations until July 26th. That's what you get for thinking that `\pi` is wrong.

If you're not into details, you may opt to party on July 22nd, which is `\pi` approximation day (`\pi` ≈ 22/7). It's 20% more accurate that the official Pi day!

Finally, if you believe that `\pi = 3`, you should read why `\pi` is not equal to 3.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
All art posters are available for purchase.
I take custom requests.

This year's `\pi` day art collection celebrates not only the digit but also one of the fundamental forces in nature: gravity.

In February of 2016, for the first time, gravitational waves were detected at the Laser Interferometer Gravitational-Wave Observatory (LIGO).

The signal in the detector was sonified—a process by which any data can be encoded into sound to provide hints at patterns and structure that we might otherwise miss—and we finally heard what two black holes sound like. A buzz and chirp.

The art is featured in the Gravity of Pi article on the Scientific American SA Visual blog.

this year's theme music

All the art was processed while listening to Roses by Coeur de Pirate, a brilliant female French-Canadian songwriter, who sounds like a mix of Patricia Kaas and Lhasa. The lyrics Oublie-moi (Forget me) are fitting with this year's theme of gravity.

Mais laisse-moi tomber, laisse-nous tomber
Laisse la nuit trembler en moi
Laisse-moi tomber, laisse nous tomber
Cette fois

But let me fall, let us fall
Let the night tremble in me
Let me fall, let us fall
This time

The Einstein-`\pi` connection

The number `\pi` appears in the fundamental equation of general relativity, which relates gravity (left side) to energy and momentum (right side).

`R_{\mu \nu} - \tfrac{1}{2} Rg_{\mu\nu} = 8 \pi G T_{\mu \nu}`

The reason why `\pi` appears has to do with the need to include the surface area of the sphere, `4 \pi r^2` in the mathematics. This is very nicely described in Sean Carrol's article Einstein and `\pi`.

The gravity of `\pi`

Let's make the digits of `\pi` into masses, throw them into space, and watch gravity make them collide and orbit each other. Read about the details of the simulation and look at the posters.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
The first 14 digits of `\pi` generate various orbits as the digits are assigned mass and subject to gravity. (BUY ARTWORK)

As the number of digits is increased, more elaborate patterns arise. Here is one simulation using 100 digits.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
Things can get a little crazy with mor digits. Here, 153 digits are used. (BUY ARTWORK)

How about 1000 digits? In this simulation the masses are similar and they all collide within the circle.


Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
The first 1000 digits of `\pi` collapse into a single mass. (BUY ARTWORK)

Pi Day 2016 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
The first 3 digits of `\pi` collapse into a single mass. 49 times. (BUY ARTWORK)

VIEW ALL

news + thoughts

Classifier Evaluation

Fri 05-08-2016

It is important to understand both what a classification metric expresses and what it hides.

We examine various metrics use to assess the performance of a classifier. We show that a single metric is insufficient to capture performance—for any metric, a variety of scenarios yield the same value.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Classifier Evaluation (read)

We also discuss ROC and AUC curves and how their interpretation changes based on class balance.

Altman, N. & Krzywinski, M. (2016) Points of Significance: Classifier evaluation. Nature Methods 13:603-604.

...more about the Points of Significance column

Happy 2016 `\pi` Approximation, roughly speaking

Sun 24-07-2016

Today is the day and it's hardly an approximation. In fact, `22/7` is 20% more accurate of a representation of `\pi` than `3.14`!

Time to celebrate, graphically. This year I do so with perfect packing of circles that embody the approximation.

By warping the circle by 8% along one axis, we can create a shape whose ratio of circumference to diameter, taken as twice the average radius, is 22/7.

If you prefer something more accurate, check out art from previous `\pi` days: 2013 `\pi` Day and 2014 `\pi` Day, 2015 `\pi` Day, and 2016 `\pi` Day.

Logistic Regression

Wed 13-07-2016

Regression can be used on categorical responses to estimate probabilities and to classify.

The next column in our series on regression deals with how to classify categorical data.

We show how linear regression can be used for classification and demonstrate that it can be unreliable in the presence of outliers. Using a logistic regression, which fits a linear model to the log odds ratio, improves robustness.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Logistic regression? (read)

Logistic regression is solved numerically and in most cases, the maximum-likelihood estimates are unique and optimal. However, when the classes are perfectly separable, the numerical approach fails because there is an infinite number of solutions.

Altman, N. & Krzywinski, M. (2016) Points of Significance: Logistic regression. Nature Methods 13:541-542.

Background reading

Altman, N. & Krzywinski, M. (2016) Points of Significance: Regression diagnostics? Nature Methods 13:385-386.

Altman, N. & Krzywinski, M. (2015) Points of Significance: Multiple Linear Regression Nature Methods 12:1103-1104.

Altman, N. & Krzywinski, M. (2015) Points of significance: Simple Linear Regression Nature Methods 12:999-1000.

...more about the Points of Significance column

Visualizing Clonal Evolution in Cancer

Thu 02-06-2016

Genomic instability is one of the defining characteristics of cancer and within a tumor, which is an ever-evolving population of cells, there are many genomes. Mutations accumulate and propagate to create subpopulations and these groups of cells, called clones, may respond differently to treatment.

It is now possible to sequence individual cells within a tumor to create a profile of genomes. This profile changes with time, both in the kinds of mutation that are found and in their proportion in the overall population.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Ways to present temporal and phylogenetic evolution of clones in cancer. M Krzywinski (2016) Molecular Cell 62:652-656. (read)

Clone evolution diagrams visualize these data. These diagrams can be qualitative, showing only trends, or quantitative, showing temporal and population changes to scale. In this Molecular Cell forum article I provide guidelines for drawing these diagrams, focusing with how to use color and navigational elements, such as grids, to clarify the relationships between clones.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
How to draw clone evolution diagrams better. M Krzywinski (2016) Molecular Cell xxx:xxx-xxx. (read)

I'd like to thank Maia Smith and Cydney Nielsen for assistance in preparing some of the figures in the paper.

Krzywinski, M. (2016) Visualizing Clonal Evolution in Cancer. Mol Cell 62:652-656.

Binning High-Resolution Data

Wed 01-06-2016

Limitations in print resolution and visual acuity impose limits on data density and detail.

Your printer can print at 1,200 or 2,400 dots per inch. At reading distance, your reader can resolve about 200–300 lines per inch. This large gap—how finely we can print and how well we can see—can create problems when we don't take visual acuity into account.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of View column: Binning high-resolution data. (read)

The column provides some guidelines—particularly relevant when showing whole-genome data, where the scale of elements of interest such as genes is below the visual acuity limit—for binning data so that they are represented by elements that can be comfortably discerned.

Krzywinski, M. (2016) Points of view: Binning high-resolution data. Nature Methods 13:463.

...more about the Points of View column

Regression diagnostics

Wed 11-05-2016

Residual plots can be used to validate assumptions about the regression model.

Continuing with our series on regression, we look at how you can identify issues in your regression model.

The difference between the observed value and the model's predicted value is the residual, `r = y_i - \hat{y}_i`, a very useful quantity to identify the effects of outliers and trends in the data that might suggest your model is inadequate.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Regression diagnostics? (read)

We also discuss normal probability plots (or Q-Q plots) and show how these can be used to check that the residuals are normally distributed, which is one of the assumptions of regression (constant variance being another).

Background reading

Altman, N. & Krzywinski, M. (2016) Points of Significance: Analyzing outliers: Influential or nuisance? Nature Methods 13:281-282.

Altman, N. & Krzywinski, M. (2015) Points of Significance: Multiple Linear Regression Nature Methods 12:1103-1104.

Altman, N. & Krzywinski, M. (2015) Points of significance: Simple Linear Regression Nature Methods 12:999-1000.

...more about the Points of Significance column