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
And whatever I do will become forever what I've done.Wislawa Szymborskadon't rehearsemore quotes

pi: exciting


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.

The art of Pi (`\pi`), Phi (`\phi`) and `e`


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

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

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

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

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

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

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

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

Like music with numbers? Here's a short list of some of my favourite songs that have numbers in their lyrics. Absolutely none of them is about bottles of beer.

music with numbers

1 — Numbers, Smoke City | This song is entirely composed of references to different numbers. The bonus? It's both in English and Portuguese. I love the way it ends—"Isn't it beautiful out here?".

Un
Un
Four
Five

Fifteen
Quinze
Seventeen
Seven

...

Tres
forty nine

Isn't it beautiful out here?
Isn't it beautiful out here?
Isn't it beautiful out here?

2 — 99 luftbaloons, Nena | The numerical classic.

Hast du etwas Zeit für mich
Dann singe ich ein Lied für dich
Von 99 Luftballons

3 — One, Aimee Mann | Beautiful mathematics of relationships using small numbers.

One is the lonliest number that you'll ever do. Two can be as bad as one, it's the lonliest number since the number one.

4 — Angels at My Door, Una | Long sequences of numbers.

58, 56, 54 angels at my door.
63, 62, 61, 60, 59, 58 angels at my gate.

5 — Tricky, Tricky, Royksopp | Number words about the fearful six from Norway.

Six afraid of seven 'cause seven, eight, nine
I'm about to lose it the second time

6 — Pt vs Ys, Yoshinori Sunahara | The first four numbers, in German, are this song's lyrics.

Eins, zwei, drei, vier.

7 — Der Kommissar, Falco | Unlike the previous song, this one starts with a German count (doesn't get to vier, though) and just gets better from there.

Two, three, four
Eins, zwei, drei
Na, es is nix dabei
Na, wenn ich euch erzähl' die G'schicht'

8 — 2wicky, Hooverphonic | The numbers likely reference the Prophet-600 and SH-101 synthesizers.

Prophet 60091.
Before we start you should know that you're not the only one who can hurt me.
SH10151.
This is the serial number of our orbital gun.
SH10151.
You better be sure before you leave me for another one.

9 — Straight to Number One, Touch and Go | Something to listen to after midnight.

Fingers, four, play, three, to number one.

10 — The Beat Experience, Pepe Deluxe | I am reminded of this song at too many academic seminars.

Here we are now, at the middle, of the fourth large part of this talk.
More and more I have the feeling that we are getting nowhere.
Slowly, as the talk goes on, we are getting nowhere.
And that is a pleasure.

It is not irritating where one is.
It is only irritating to think one would like to be somewhere else.
Here we are now, a little bit after the middle, of the fourth large part of this talk.

11 — Thousand Kisses Deep, Leonard Cohen | A list of songs that doesn't include one by Cohen is not worth reading. The sentiment of a thousand kisses is as old as lips existed. Catullus wrote to Lesbia "da mi basia mille, deinde centum, dein mille altera, dein secunda centum, deinde usque altera mille, deinde centum" [Give me a thousand kisses, then a hundred, then another thousand, then a second hundred, then yet another thousand, then a hundred.] Well, you get the idea.

And sometimes when the night is slow,
The wretched and the meek,
We gather up our hearts and go,
A Thousand Kisses Deep.

12 — Six Seven Times, Flunk | Curiously the product here is 42. This song is the answer to life.

You've got it all
Six seven times
You've got it all
Makes me feel so fine
And it's all there is

13 — 7 seconds, Youssou N'Dour | Dreamy references to a short period of time.

7 seconds away. Just as long as I stay. I'll be waiting.

14 — 100 Billion Stars, Lux | Something to relax to while you ponder insignificance.

15 — First Picture, Nikolaj Grandjean | First is the most memorable number.

I remember
The first picture
One million different shadows
Where we've been around the willows

16 — Millions of Millions, Music for a French Elevator | Very desirable. And I can't believe I transcribed the whole thing.

5.50 million dollars, 2.6775 and very desirable 8 million dollars 5.6 million and 2.4 million 3.4 million and 2.9 million 1.2 would've amounted to 4 million 1.2 million 19.4 million 6.6 million 5.275 million 1.2 million 3-and-a-half million dollars 6.453 million 8 million 5.050 million 1.4 million close to a million dollars 933.5 million 3.8 million 5 million dollars 2-and-a-half million 600 million dollars can you shut the door? 3-and-a-half million dollars 2.5 million .050 million 572,750 thousand 5.050 million 3.8 million 3 million 150 thousand 8 million 419.5 million

17 — Love Potion #9, The Searchers | I started kissing everythying in sight.

It smelled like turpentine, it looked like Indian ink
I held my nose, I closed my eyes, I took a drink.

18 — 93 Million Miles, Luan Santana feat. John Kip | A little sticky, a little sweet but it makes up for the fact that much of it is in Portuguese.

But the absence of the light is a necessary part.

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.