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
Trance opera—Spente le Stellebe dramaticmore quotes

3.14: fun


EMBO Practical Course: Bioinformatics and Genome Analysis, 5–17 June 2017.


visualization + design

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The 2017 Pi Day art imagines the digits of Pi as a star catalogue with constellations of extinct animals and plants. The work is featured in the article Pi in the Sky at the Scientific American SA Visual blog.

`\pi` Day 2015 Art Posters


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

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

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

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

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

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

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

Pi Day 2015 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.

Not a circle in sight in the 2015 `\pi` day art. Try to figure out how up to 612,330 digits are encoded before reading about the method. `\pi`'s transcendental friends `\phi` and `e` are there too—golden and natural. Get it?

This year's `\pi` day is particularly special. The digits of time specify a precise time if the date is encoded in North American day-month-year convention: 3-14-15 9:26:53.

The art has been featured in Ana Swanson's Wonkblog article at the Washington Post—10 Stunning Images Show The Beauty Hidden in `\pi`.

The colors of each division are assigned with a random scheme but the same random seed is used for each poster.


Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
3,628 digits of `\pi` in a 6 level treemap. Variable line thickness. Bauhaus prime colors. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
3,628 digits of `\pi` in a 6 level treemap. Uniform line thickness. Bauhaus prime colors. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
20,244 digits of `\pi` in a 7 level treemap. Uniform line thickness. Bauhaus prime colors. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
111,469 digits of `\pi` in an 8 level treemap. Uniform line thickness, slightly thinner than for the 7-level map. Bauhaus prime colors. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
612,330 digits of `\pi` in an 9 level treemap. Bauhaus prime colors. (zoom)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
3,628 digits of `\pi` in a 6 level treemap. Uniform line thickness. Brewer palette sequential greys. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
20,244 digits of `\pi` in a 7 level treemap. Uniform line thickness. Brewer palette sequential greys. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
1, 5, 20, 118, 666 and 3,628 digits of `\pi` in 6 treemap of levels 1–6. Uniform line thickness. Bauhaus prime colors in Piet Mondrian style. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
2,258 digits of `\phi`, 3,855 digits of `e` and 3,628 digits of `\pi` in 6 level treemaps. Uniform line thickness. Bauhaus prime colors in Piet Mondrian style. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
2,258 digits of `\phi`, 3,855 digits of `e` and 3,628 digits of `\pi` in 6 level treemaps. Uniform line thickness. Brewer palette sequential greys. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
1, 3, 12 and 71 digits of `\phi`; 1, 4, 23 and 119 digits of `e`; 1, 5, 20 and 71 digits of `\pi` in 4 level treemaps. Uniform line thickness. Bauhaus prime colors in Piet Mondrian style. (zoom, BUY ARTWORK)

Pi Day 2015 Art Posters
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
1, 3, 12 and 71 digits of `\phi`; 1, 4, 23 and 119 digits of `e`; 1, 5, 20 and 71 digits of `\pi` in 4 level treemaps. Uniform line thickness. Brewer palette sequential greys. (zoom, BUY ARTWORK)
VIEW ALL

news + thoughts

Machine learning: a primer

Tue 05-12-2017
Machine learning extracts patterns from data without explicit instructions.

In this primer, we focus on essential ML principles— a modeling strategy to let the data speak for themselves, to the extent possible.

The benefits of ML arise from its use of a large number of tuning parameters or weights, which control the algorithm’s complexity and are estimated from the data using numerical optimization. Often ML algorithms are motivated by heuristics such as models of interacting neurons or natural evolution—even if the underlying mechanism of the biological system being studied is substantially different. The utility of ML algorithms is typically assessed empirically by how well extracted patterns generalize to new observations.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Machine learning: a primer. (read)

We present a data scenario in which we fit to a model with 5 predictors using polynomials and show what to expect from ML when noise and sample size vary. We also demonstrate the consequences of excluding an important predictor or including a spurious one.

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: a primer. Nature Methods 14:1119–1120.",

...more about the Points of Significance column

Snowflake simulation

Tue 14-11-2017
Symmetric, beautiful and unique.

Just in time for the season, I've simulated a snow-pile of snowflakes based on the Gravner-Griffeath model.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A few of the beautiful snowflakes generated by the Gravner-Griffeath model. (explore)

Gravner, J. & Griffeath, D. (2007) Modeling Snow Crystal Growth II: A mesoscopic lattice map with plausible dynamics.

Genes that make us sick

Thu 02-11-2017
Where disease hides in the genome.

My illustration of the location of genes in the human genome that are implicated in disease appears in The Objects that Power the Global Economy, a book by Quartz.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The location of genes implicated in disease in the human genome, shown here as a spiral. (more...)

Ensemble methods: Bagging and random forests

Mon 16-10-2017
Many heads are better than one.

We introduce two common ensemble methods: bagging and random forests. Both of these methods repeat a statistical analysis on a bootstrap sample to improve the accuracy of the predictor. Our column shows these methods as applied to Classification and Regression Trees.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Ensemble methods: Bagging and random forests. (read)

For example, we can sample the space of values more finely when using bagging with regression trees because each sample has potentially different boundaries at which the tree splits.

Random forests generate a large number of trees by not only generating bootstrap samples but also randomly choosing which predictor variables are considered at each split in the tree.

Krzywinski, M. & Altman, N. (2017) Points of Significance: Ensemble methods: bagging and random forests. Nature Methods 14:933–934.

Background reading

Krzywinski, M. & Altman, N. (2017) Points of Significance: Classification and regression trees. Nature Methods 14:757–758.

...more about the Points of Significance column

Classification and regression trees

Mon 16-10-2017
Decision trees are a powerful but simple prediction method.

Decision trees classify data by splitting it along the predictor axes into partitions with homogeneous values of the dependent variable. Unlike logistic or linear regression, CART does not develop a prediction equation. Instead, data are predicted by a series of binary decisions based on the boundaries of the splits. Decision trees are very effective and the resulting rules are readily interpreted.

Trees can be built using different metrics that measure how well the splits divide up the data classes: Gini index, entropy or misclassification error.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Classification and decision trees. (read)

When the predictor variable is quantitative and not categorical, regression trees are used. Here, the data are still split but now the predictor variable is estimated by the average within the split boundaries. Tree growth can be controlled using the complexity parameter, a measure of the relative improvement of each new split.

Individual trees can be very sensitive to minor changes in the data and even better prediction can be achieved by exploiting this variability. Using ensemble methods, we can grow multiple trees from the same data.

Krzywinski, M. & Altman, N. (2017) Points of Significance: Classification and regression trees. Nature Methods 14:757–758.

Background reading

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

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

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

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Model Selection and Overfitting. Nature Methods 13:703-704.

Lever, J., Krzywinski, M. & Altman, N. (2016) Points of Significance: Regularization. Nature Methods 13:803-804.

...more about the Points of Significance column

Personal Oncogenomics Program 5 Year Anniversary Art

Wed 26-07-2017

The artwork was created in collaboration with my colleagues at the Genome Sciences Center to celebrate the 5 year anniversary of the Personalized Oncogenomics Program (POG).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
5 Years of Personalized Oncogenomics Program at Canada's Michael Smith Genome Sciences Centre. The poster shows 545 cancer cases. (left) Cases ordered chronologically by case number. (right) Cases grouped by diagnosis (tissue type) and then by similarity within group.

The Personal Oncogenomics Program (POG) is a collaborative research study including many BC Cancer Agency oncologists, pathologists and other clinicians along with Canada's Michael Smith Genome Sciences Centre with support from BC Cancer Foundation.

The aim of the program is to sequence, analyze and compare the genome of each patient's cancer—the entire DNA and RNA inside tumor cells— in order to understand what is enabling it to identify less toxic and more effective treatment options.