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 she looks like the moon. So close and yet, so far.Future Islandsaim highmore quotes

pi: exciting


In Silico Flurries: Computing a world of snow. Scientific American. 23 December 2017


visualization + design

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The 2018 Pi Day art celebrates the 30th anniversary of `\pi` day and connects friends stitching road maps from around the world. Pack a sandwich and let's go!

`\pi` Day 2018 Art Posters - Stitched city road maps from around the world


Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2018 `\pi` day shrinks the world and celebrates road trips by stitching streets from around the world together. In this version, we look at the boonies, burbs and boutique of `\pi` by drawing progressively denser patches of streets. Let's go places.

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2017 `\pi` day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` approximation day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2016 `\pi` day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2015 `\pi` day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` approx day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2014 `\pi` day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
2013 `\pi` day

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / 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.

And if you've got to sleep a moment on the road
I will steer for you
And if you want to work the street alone
I'll disappear for you
—Leonard Cohen (I'm Your Man)

This year's is the 30th anniversary of `\pi` day. The theme of the art is bridging the world and making friends. So myself I again team up with my long-time friend and collaborator Jake Lever. I worled with Jake on the snowflake catalogue, where we build a world of flakes.

And so, this year we also build a world. We start with all the roads in the world and stitch them together in brand new ways. And if you walk more than 1 km in this world, you'll likely to be transported somewhere completely different.

This year's `\pi` day song is Trance Groove: Paris. Why? Because it's worth to go to new places—real or imagined.

Last year, I made a new world in the sky with my 2017 `\pi` day sky charts. This year, it's time for something a little closer to the ground. Using street maps of various cities, we rearrange the streets and join neighbourhoods from around the world using the digits of `\pi` as a recipe.

A walk from to Istanbul to San Francisco is only 5 minutes? Well, no. But what if it could be.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A great 10 km run loop between Istanbul, Copenhagen, San Francisco and Dublin. Stop off for halva, smørrebrød, espresso and a Guinness on the way. (zoom)

Read how it was done or simply enjoy the art.

City strips

City strips are horizontal arrangements of patches of roads sampled from a city. The order of the patches is determined by the digits of `\pi`, which are used to select regions of specific density of roads.


Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
On the road with 10 digits of `\pi`. City strips for Moscow, Mumbai, Nairobi, New Delhi, Nice, Prague, Rome, Stockholm, Vancouver and Warsaw. (BUY ARTWORK)

These strips chart 10 patches—the patch for the digit "1" has a few roads and the patch for "9" is the most dense.

Boonies, burbs and boutiques

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Close-up of progressively denser patches of roads from city strips: the boonies, the burbs and the boutiques.

This series of patches is extracted from the city strips above. Three patches for the consecutive digits 159 are shown and demonstrate how very quickly we can progress from nowhere to somewhere.


Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
The boonies, burbs and boutiques of `\pi`. Progressively denser patches of streets from various cities smoothly progress from nowhere to somewhere. (BUY ARTWORK)

World patches

This arrangement of roads builds on city strips. Here, 36 digits of `\pi` are arranged on a 6 × 6 grid. Roads patches are sampled from 10 different cities—each digit is assigned a different city.

In the map below the digit-to-city assignments are: 0:Amsterdam, 1:Doha, 2:Marrakesh, 3:Mumbai, 4:Nairobi, 5:Rome, 6:San Francisco, 7:Seoul, 8:Shanghai and 9:Vancouver.


Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
On the road with 36 digits of `\pi`. A world patch using Amsterdam, Doha, Marrakesh, Mumbai, Nairobi, Rome, San Francisco, Seoul, Shanghai and Vancouver (BUY ARTWORK)

City mix

City mixes are world patches that only use two cities. Below we assign the even digits to Melbourne and the odd digits to Nice.


Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
On the road with 36 digits of `\pi`. A world patch using Melbourne and Nice. (BUY ARTWORK)

Pi Day 2018 Art Posters  - Stitched city road maps from around the world
 / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca buy artwork
On the road with 36 digits of `\pi`. A world patch using Melbourne and Nice. (BUY ARTWORK)

VIEW ALL

news + thoughts

Statistics vs Machine Learning

Tue 03-04-2018
We conclude our series on Machine Learning with a comparison of two approaches: classical statistical inference and machine learning. The boundary between them is subject to debate, but important generalizations can be made.

Inference creates a mathematical model of the datageneration process to formalize understanding or test a hypothesis about how the system behaves. Prediction aims at forecasting unobserved outcomes or future behavior. Typically we want to do both and know how biological processes work and what will happen next. Inference and ML are complementary in pointing us to biologically meaningful conclusions.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Statistics vs machine learning. (read)

Statistics asks us to choose a model that incorporates our knowledge of the system, and ML requires us to choose a predictive algorithm by relying on its empirical capabilities. Justification for an inference model typically rests on whether we feel it adequately captures the essence of the system. The choice of pattern-learning algorithms often depends on measures of past performance in similar scenarios.

Bzdok, D., Krzywinski, M. & Altman, N. (2018) Points of Significance: Statistics vs machine learning. Nature Methods 15:233–234.

Background reading

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

Bzdok, D., Krzywinski, M. & Altman, N. (2017) Points of Significance: Machine learning: supervised methods. Nature Methods 15:5–6.

...more about the Points of Significance column

Happy 2018 `\pi` Day—Boonies, burbs and boutiques of `\pi`

Wed 14-03-2018

Celebrate `\pi` Day (March 14th) and go to brand new places. Together with Jake Lever, this year we shrink the world and play with road maps.

Streets are seamlessly streets from across the world. Finally, a halva shop on the same block!

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
A great 10 km run loop between Istanbul, Copenhagen, San Francisco and Dublin. Stop off for halva, smørrebrød, espresso and a Guinness on the way. (details)

Intriguing and personal patterns of urban development for each city appear in the Boonies, Burbs and Boutiques series.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
In the Boonies, Burbs and Boutiques of `\pi` we draw progressively denser patches using the digit sequence 159 to inform density. (details)

No color—just lines. Lines from Marrakesh, Prague, Istanbul, Nice and other destinations for the mind and the heart.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Roads from cities rearranged according to the digits of `\pi`. (details)

The art is featured in the Pi City on the Scientific American SA Visual blog.

Check out art from previous years: 2013 `\pi` Day and 2014 `\pi` Day, 2015 `\pi` Day, 2016 `\pi` Day and 2017 `\pi` Day.

Machine learning: supervised methods (SVM & kNN)

Thu 18-01-2018
Supervised learning algorithms extract general principles from observed examples guided by a specific prediction objective.

We examine two very common supervised machine learning methods: linear support vector machines (SVM) and k-nearest neighbors (kNN).

SVM is often less computationally demanding than kNN and is easier to interpret, but it can identify only a limited set of patterns. On the other hand, kNN can find very complex patterns, but its output is more challenging to interpret.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Machine learning: supervised methods (SVM & kNN). (read)

We illustrate SVM using a data set in which points fall into two categories, which are separated in SVM by a straight line "margin". SVM can be tuned using a parameter that influences the width and location of the margin, permitting points to fall within the margin or on the wrong side of the margin. We then show how kNN relaxes explicit boundary definitions, such as the straight line in SVM, and how kNN too can be tuned to create more robust classification.

Bzdok, D., Krzywinski, M. & Altman, N. (2018) Points of Significance: Machine learning: a primer. Nature Methods 15:5–6.

Background reading

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

Human Versus Machine

Tue 16-01-2018
Balancing subjective design with objective optimization.

In a Nature graphics blog article, I present my process behind designing the stark black-and-white Nature 10 cover.

Nature 10, 18 December 2017

Machine learning: a primer

Thu 18-01-2018
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 16-01-2018
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)

The work is described as a wintertime tale in In Silico Flurries: Computing a world of snow and co-authored with Jake Lever in the Scientific American SA Blog.

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