diff --git a/_site/archive.html b/_site/archive.html index 55d976a..648594c 100644 --- a/_site/archive.html +++ b/_site/archive.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Archives - + diff --git a/_site/atom.xml b/_site/atom.xml index 4f833c0..9b6b16b 100644 --- a/_site/atom.xml +++ b/_site/atom.xml @@ -32,7 +32,9 @@

Background: optimal transport

The essential backbone of the method is the Wasserstein distance, derived from optimal transport theory. Optimal transport is a fascinating and deep subject, so I won’t enter into the details here. For an introduction to the theory and its applications, check out the excellent book from Peyré and Cuturi (2019), (available on ArXiv as well). There are also very nice posts (in French) by Gabriel Peyré on the CNRS maths blog. Many more resources (including slides for presentations) are available at https://optimaltransport.github.io. For a more complete theoretical treatment of the subject, check out Santambrogio (2015), or, if you’re feeling particularly adventurous, Villani (2009).

-

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around1. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

+

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.
+
+
. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

More formally, we start with two sets of points \(x = (x_1, x_2, \ldots, x_n)\), and \(y = (y_1, y_2, \ldots, y_n)\), along with probability distributions \(p \in \Delta^n\), \(q \in \Delta^m\) over \(x\) and \(y\) (\(\Delta^n\) is the probability simplex of dimension \(n\), i.e. the set of vectors of size \(n\) summing to 1). We can then define the Wasserstein distance as \[ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j} @@ -97,12 +99,6 @@ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j}

Yurochkin, Mikhail, Sebastian Claici, Edward Chien, Farzaneh Mirzazadeh, and Justin M Solomon. 2019. “Hierarchical Optimal Transport for Document Representation.” In Advances in Neural Information Processing Systems 32, 1599–1609. http://papers.nips.cc/paper/8438-hierarchical-optimal-transport-for-document-representation.pdf.

-
-
-
    -
  1. Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.

  2. -
-
]]> diff --git a/_site/contact.html b/_site/contact.html index deaf540..a9944ba 100644 --- a/_site/contact.html +++ b/_site/contact.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Contact - + diff --git a/_site/css/tufte.css b/_site/css/tufte.css new file mode 100644 index 0000000..c2cc1f8 --- /dev/null +++ b/_site/css/tufte.css @@ -0,0 +1 @@ +@charset "UTF-8";@font-face{font-family:"et-book";src:url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot");src:url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"),url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"),url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"),url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"et-book";src:url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot");src:url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"),url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"),url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"),url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") format("svg");font-weight:normal;font-style:italic;font-display:swap}@font-face{font-family:"et-book";src:url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot");src:url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"),url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"),url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"),url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg");font-weight:bold;font-style:normal;font-display:swap}@font-face{font-family:"et-book-roman-old-style";src:url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot");src:url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"),url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"),url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"),url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg");font-weight:normal;font-style:normal;font-display:swap}html{font-size:15px}body{width:87.5%;margin-left:auto;margin-right:auto;padding-left:12.5%;font-family:et-book,Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Georgia,serif;background-color:#fffff8;color:#111;max-width:1400px;counter-reset:sidenote-counter}h1{font-weight:400;margin-top:4rem;margin-bottom:1.5rem;font-size:3.2rem;line-height:1}h2{font-style:italic;font-weight:400;margin-top:2.1rem;margin-bottom:1.4rem;font-size:2.2rem;line-height:1}h3{font-style:italic;font-weight:400;font-size:1.7rem;margin-top:2rem;margin-bottom:1.4rem;line-height:1}hr{display:block;height:1px;width:55%;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}p.subtitle{font-style:italic;margin-top:1rem;margin-bottom:1rem;font-size:1.8rem;display:block;line-height:1}.numeral{font-family:et-book-roman-old-style}.danger{color:red}article{padding:5rem 0rem}section{padding-top:1rem;padding-bottom:1rem}p,ol,ul{font-size:1.4rem;line-height:2rem}p{margin-top:1.4rem;margin-bottom:1.4rem;padding-right:0;vertical-align:baseline}div.epigraph{margin:5em 0}div.epigraph>blockquote{margin-top:3em;margin-bottom:3em}div.epigraph>blockquote,div.epigraph>blockquote>p{font-style:italic}div.epigraph>blockquote>footer{font-style:normal}div.epigraph>blockquote>footer>cite{font-style:italic}blockquote{font-size:1.4rem}blockquote p{width:55%;margin-right:40px}blockquote footer{width:55%;font-size:1.1rem;text-align:right}section>p,section>footer,section>table{width:55%}section>ol,section>ul{width:50%;-webkit-padding-start:5%}li:not(:first-child){margin-top:0.25rem}figure{padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;max-width:55%;-webkit-margin-start:0;-webkit-margin-end:0;margin:0 0 3em 0}figcaption{float:right;clear:right;margin-top:0;margin-bottom:0;font-size:1.1rem;line-height:1.6;vertical-align:baseline;position:relative;max-width:40%}figure.fullwidth figcaption{margin-right:24%}a:link,a:visited{color:inherit}.no-tufte-underline:link{background:unset;text-shadow:unset}a:link,.tufte-underline,.hover-tufte-underline:hover{text-decoration:none;background:-webkit-linear-gradient(#fffff8,#fffff8),-webkit-linear-gradient(#fffff8,#fffff8),-webkit-linear-gradient(currentColor,currentColor);background:linear-gradient(#fffff8,#fffff8),linear-gradient(#fffff8,#fffff8),linear-gradient(currentColor,currentColor);-webkit-background-size:0.05em 1px,0.05em 1px,1px 1px;-moz-background-size:0.05em 1px,0.05em 1px,1px 1px;background-size:0.05em 1px,0.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;text-shadow:0.03em 0 #fffff8,-0.03em 0 #fffff8,0 0.03em #fffff8,0 -0.03em #fffff8,0.06em 0 #fffff8,-0.06em 0 #fffff8,0.09em 0 #fffff8,-0.09em 0 #fffff8,0.12em 0 #fffff8,-0.12em 0 #fffff8,0.15em 0 #fffff8,-0.15em 0 #fffff8;background-position:0% 93%,100% 93%,0% 93%}@media screen and (-webkit-min-device-pixel-ratio:0){a:link,.tufte-underline,.hover-tufte-underline:hover{background-position-y:87%,87%,87%}}a:link::selection,a:link::-moz-selection{text-shadow:0.03em 0 #b4d5fe,-0.03em 0 #b4d5fe,0 0.03em #b4d5fe,0 -0.03em #b4d5fe,0.06em 0 #b4d5fe,-0.06em 0 #b4d5fe,0.09em 0 #b4d5fe,-0.09em 0 #b4d5fe,0.12em 0 #b4d5fe,-0.12em 0 #b4d5fe,0.15em 0 #b4d5fe,-0.15em 0 #b4d5fe;background:#b4d5fe}img{max-width:100%}.sidenote,.marginnote{float:right;clear:right;margin-right:-60%;width:50%;margin-top:0;margin-bottom:0;font-size:1.1rem;line-height:1.3;vertical-align:baseline;position:relative}.sidenote-number{counter-increment:sidenote-counter}.sidenote-number:after,.sidenote:before{font-family:et-book-roman-old-style;position:relative;vertical-align:baseline}.sidenote-number:after{content:counter(sidenote-counter);font-size:1rem;top:-0.5rem;left:0.1rem}.sidenote:before{content:counter(sidenote-counter) " ";font-size:1rem;top:-0.5rem}blockquote .sidenote,blockquote .marginnote{margin-right:-82%;min-width:59%;text-align:left}div.fullwidth,table.fullwidth{width:100%}div.table-wrapper{overflow-x:auto;font-family:"Trebuchet MS","Gill Sans","Gill Sans MT",sans-serif}.sans{font-family:"Gill Sans","Gill Sans MT",Calibri,sans-serif;letter-spacing:.03em}code,pre>code{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:1.0rem;line-height:1.42;-webkit-text-size-adjust:100%}.sans>code{font-size:1.2rem}h1>code,h2>code,h3>code{font-size:0.80em}.marginnote>code,.sidenote>code{font-size:1rem}pre>code{font-size:0.9rem;width:52.5%;margin-left:2.5%;overflow-x:auto;display:block}pre.fullwidth>code{width:90%}.fullwidth{max-width:90%;clear:both}span.newthought{font-variant:small-caps;font-size:1.2em}input.margin-toggle{display:none}label.sidenote-number{display:inline}label.margin-toggle:not(.sidenote-number){display:none}.iframe-wrapper{position:relative;padding-bottom:56.25%;padding-top:25px;height:0}.iframe-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}@media (max-width:760px){body{width:84%;padding-left:8%;padding-right:8%}hr,section>p,section>footer,section>table{width:100%}pre>code{width:97%}section>ol{width:90%}section>ul{width:90%}figure{max-width:90%}figcaption,figure.fullwidth figcaption{margin-right:0%;max-width:none}blockquote{margin-left:1.5em;margin-right:0em}blockquote p,blockquote footer{width:100%}label.margin-toggle:not(.sidenote-number){display:inline}.sidenote,.marginnote{display:none}.margin-toggle:checked+.sidenote,.margin-toggle:checked+.marginnote{display:block;float:left;left:1rem;clear:both;width:95%;margin:1rem 2.5%;vertical-align:baseline;position:relative}label{cursor:pointer}div.table-wrapper,table{width:85%}img{width:100%}} \ No newline at end of file diff --git a/_site/cv.html b/_site/cv.html index d07abc9..121ffbf 100644 --- a/_site/cv.html +++ b/_site/cv.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Curriculum Vitæ - + diff --git a/_site/images/hott_fig1.png b/_site/images/hott_fig1.png deleted file mode 100644 index 3b7799f..0000000 Binary files a/_site/images/hott_fig1.png and /dev/null differ diff --git a/_site/index.html b/_site/index.html index 5ea7fc2..8e15726 100644 --- a/_site/index.html +++ b/_site/index.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Home - + diff --git a/_site/posts/ginibre-ensemble.html b/_site/posts/ginibre-ensemble.html index 0decfb8..8635760 100644 --- a/_site/posts/ginibre-ensemble.html +++ b/_site/posts/ginibre-ensemble.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Random matrices from the Ginibre ensemble - + diff --git a/_site/posts/hierarchical-optimal-transport-for-document-classification.html b/_site/posts/hierarchical-optimal-transport-for-document-classification.html index dc1efe3..6b41f80 100644 --- a/_site/posts/hierarchical-optimal-transport-for-document-classification.html +++ b/_site/posts/hierarchical-optimal-transport-for-document-classification.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Reading notes: Hierarchical Optimal Transport for Document Representation - + @@ -51,7 +51,9 @@

Background: optimal transport

The essential backbone of the method is the Wasserstein distance, derived from optimal transport theory. Optimal transport is a fascinating and deep subject, so I won’t enter into the details here. For an introduction to the theory and its applications, check out the excellent book from Peyré and Cuturi (2019), (available on ArXiv as well). There are also very nice posts (in French) by Gabriel Peyré on the CNRS maths blog. Many more resources (including slides for presentations) are available at https://optimaltransport.github.io. For a more complete theoretical treatment of the subject, check out Santambrogio (2015), or, if you’re feeling particularly adventurous, Villani (2009).

-

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around1. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

+

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.
+
+
. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

More formally, we start with two sets of points \(x = (x_1, x_2, \ldots, x_n)\), and \(y = (y_1, y_2, \ldots, y_n)\), along with probability distributions \(p \in \Delta^n\), \(q \in \Delta^m\) over \(x\) and \(y\) (\(\Delta^n\) is the probability simplex of dimension \(n\), i.e. the set of vectors of size \(n\) summing to 1). We can then define the Wasserstein distance as \[ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j} @@ -116,12 +118,6 @@ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j}

Yurochkin, Mikhail, Sebastian Claici, Edward Chien, Farzaneh Mirzazadeh, and Justin M Solomon. 2019. “Hierarchical Optimal Transport for Document Representation.” In Advances in Neural Information Processing Systems 32, 1599–1609. http://papers.nips.cc/paper/8438-hierarchical-optimal-transport-for-document-representation.pdf.

-
-
-
    -
  1. Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.

  2. -
-
diff --git a/_site/posts/ising-apl.html b/_site/posts/ising-apl.html index 289a19b..4a73d45 100644 --- a/_site/posts/ising-apl.html +++ b/_site/posts/ising-apl.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Ising model simulation in APL - + diff --git a/_site/posts/ising-model.html b/_site/posts/ising-model.html index 281cc36..fd7cc7a 100644 --- a/_site/posts/ising-model.html +++ b/_site/posts/ising-model.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Ising model simulation - + diff --git a/_site/posts/lsystems.html b/_site/posts/lsystems.html index 821c101..3a0db72 100644 --- a/_site/posts/lsystems.html +++ b/_site/posts/lsystems.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Generating and representing L-systems - + diff --git a/_site/posts/peano.html b/_site/posts/peano.html index cd56562..31ac432 100644 --- a/_site/posts/peano.html +++ b/_site/posts/peano.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Peano Axioms - + diff --git a/_site/posts/reinforcement-learning-1.html b/_site/posts/reinforcement-learning-1.html index e4dd119..86bc841 100644 --- a/_site/posts/reinforcement-learning-1.html +++ b/_site/posts/reinforcement-learning-1.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Quick Notes on Reinforcement Learning - + diff --git a/_site/posts/self-learning-chatbots-destygo.html b/_site/posts/self-learning-chatbots-destygo.html index c3d488e..38d21dc 100644 --- a/_site/posts/self-learning-chatbots-destygo.html +++ b/_site/posts/self-learning-chatbots-destygo.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Mindsay: Towards Self-Learning Chatbots - + diff --git a/_site/projects.html b/_site/projects.html index 5da04de..f50582a 100644 --- a/_site/projects.html +++ b/_site/projects.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Projects - + diff --git a/_site/projects/adsb.html b/_site/projects/adsb.html index 30eb50a..0771f10 100644 --- a/_site/projects/adsb.html +++ b/_site/projects/adsb.html @@ -6,7 +6,7 @@ Dimitri Lozeve - ADS-B data visualization - + diff --git a/_site/projects/civilisation.html b/_site/projects/civilisation.html index 6520987..569dfc1 100644 --- a/_site/projects/civilisation.html +++ b/_site/projects/civilisation.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Civilisation - + diff --git a/_site/projects/community-detection.html b/_site/projects/community-detection.html index 4bb2015..8489e54 100644 --- a/_site/projects/community-detection.html +++ b/_site/projects/community-detection.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Community Detection - + diff --git a/_site/projects/ising-model.html b/_site/projects/ising-model.html index 4edc97b..7c03564 100644 --- a/_site/projects/ising-model.html +++ b/_site/projects/ising-model.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Ising model simulation - + diff --git a/_site/projects/lsystems.html b/_site/projects/lsystems.html index be12ff6..a4c8e5e 100644 --- a/_site/projects/lsystems.html +++ b/_site/projects/lsystems.html @@ -6,7 +6,7 @@ Dimitri Lozeve - L-systems - + diff --git a/_site/projects/orbit.html b/_site/projects/orbit.html index 8fae659..c2ea4c0 100644 --- a/_site/projects/orbit.html +++ b/_site/projects/orbit.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Orbit - + diff --git a/_site/projects/satrap.html b/_site/projects/satrap.html index 13a1560..182196c 100644 --- a/_site/projects/satrap.html +++ b/_site/projects/satrap.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Satrap - + diff --git a/_site/projects/tda.html b/_site/projects/tda.html index 00df307..3879d60 100644 --- a/_site/projects/tda.html +++ b/_site/projects/tda.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Topological Data Analysis of time-dependent networks - + diff --git a/_site/projects/ww2-bombings.html b/_site/projects/ww2-bombings.html index 343a62e..35b5481 100644 --- a/_site/projects/ww2-bombings.html +++ b/_site/projects/ww2-bombings.html @@ -6,7 +6,7 @@ Dimitri Lozeve - WWII bombings visualization - + diff --git a/_site/rss.xml b/_site/rss.xml index 37669a1..e41b2ba 100644 --- a/_site/rss.xml +++ b/_site/rss.xml @@ -28,7 +28,9 @@

Background: optimal transport

The essential backbone of the method is the Wasserstein distance, derived from optimal transport theory. Optimal transport is a fascinating and deep subject, so I won’t enter into the details here. For an introduction to the theory and its applications, check out the excellent book from Peyré and Cuturi (2019), (available on ArXiv as well). There are also very nice posts (in French) by Gabriel Peyré on the CNRS maths blog. Many more resources (including slides for presentations) are available at https://optimaltransport.github.io. For a more complete theoretical treatment of the subject, check out Santambrogio (2015), or, if you’re feeling particularly adventurous, Villani (2009).

-

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around1. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

+

For this paper, only a superficial understanding of how the Wasserstein distance works is necessary. Optimal transport is an optimisation technique to lift a distance between points in a given metric space, to a distance between probability distributions over this metric space. The historical example is to move piles of dirt around: you know the distance between any two points, and you have piles of dirt lying around Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.
+
+
. Now, if you want to move these piles to another configuration (fewer piles, say, or a different repartition of dirt a few metres away), you need to find the most efficient way to move them. The total cost you obtain will define a distance between the two configurations of dirt, and is usually called the earth mover’s distance, which is just an instance of the general Wasserstein metric.

More formally, we start with two sets of points \(x = (x_1, x_2, \ldots, x_n)\), and \(y = (y_1, y_2, \ldots, y_n)\), along with probability distributions \(p \in \Delta^n\), \(q \in \Delta^m\) over \(x\) and \(y\) (\(\Delta^n\) is the probability simplex of dimension \(n\), i.e. the set of vectors of size \(n\) summing to 1). We can then define the Wasserstein distance as \[ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j} @@ -93,12 +95,6 @@ W_1(p, q) = \min_{P \in \mathbb{R}_+^{n\times m}} \sum_{i,j} C_{i,j} P_{i,j}

Yurochkin, Mikhail, Sebastian Claici, Edward Chien, Farzaneh Mirzazadeh, and Justin M Solomon. 2019. “Hierarchical Optimal Transport for Document Representation.” In Advances in Neural Information Processing Systems 32, 1599–1609. http://papers.nips.cc/paper/8438-hierarchical-optimal-transport-for-document-representation.pdf.

-
-
-
    -
  1. Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front line.

  2. -
-
]]> diff --git a/_site/skills.html b/_site/skills.html index 2bb74b8..0b45a39 100644 --- a/_site/skills.html +++ b/_site/skills.html @@ -6,7 +6,7 @@ Dimitri Lozeve - Skills in Statistics, Data Science and Machine Learning - + diff --git a/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot new file mode 100755 index 0000000..3610c74 Binary files /dev/null and b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot differ diff --git a/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg new file mode 100755 index 0000000..254f4cc --- /dev/null +++ b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf new file mode 100755 index 0000000..9798360 Binary files /dev/null and b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf differ diff --git a/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff new file mode 100755 index 0000000..c6685a1 Binary files /dev/null and b/css/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff differ diff --git a/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot new file mode 100755 index 0000000..88a6c74 Binary files /dev/null and b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot differ diff --git a/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg new file mode 100755 index 0000000..881a6bd --- /dev/null +++ b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf new file mode 100755 index 0000000..9da91de Binary files /dev/null and b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf differ diff --git a/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff new file mode 100755 index 0000000..b0e5b68 Binary files /dev/null and b/css/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff differ diff --git a/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot new file mode 100755 index 0000000..22fff5b Binary files /dev/null and b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot differ diff --git a/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg new file mode 100755 index 0000000..c5013b3 --- /dev/null +++ b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf new file mode 100755 index 0000000..daceffb Binary files /dev/null and b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf differ diff --git a/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff new file mode 100755 index 0000000..440ae04 Binary files /dev/null and b/css/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff differ diff --git a/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot new file mode 100755 index 0000000..4ef9973 Binary files /dev/null and b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot differ diff --git a/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg new file mode 100755 index 0000000..24cf3ef --- /dev/null +++ b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf new file mode 100755 index 0000000..5ae5198 Binary files /dev/null and b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf differ diff --git a/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff new file mode 100755 index 0000000..10eb336 Binary files /dev/null and b/css/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff differ diff --git a/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot new file mode 100755 index 0000000..bcc6f9d Binary files /dev/null and b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.eot differ diff --git a/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg new file mode 100755 index 0000000..a6c168a --- /dev/null +++ b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf new file mode 100755 index 0000000..725af42 Binary files /dev/null and b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.ttf differ diff --git a/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff new file mode 100755 index 0000000..5753ca4 Binary files /dev/null and b/css/et-book/et-book-semi-bold-old-style-figures/et-book-semi-bold-old-style-figures.woff differ diff --git a/css/tufte.css b/css/tufte.css new file mode 100644 index 0000000..2ad645b --- /dev/null +++ b/css/tufte.css @@ -0,0 +1,469 @@ +@charset "UTF-8"; + +/* Import ET Book styles + adapted from https://github.com/edwardtufte/et-book/blob/gh-pages/et-book.css */ + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot"); + src: url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), url("et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg"); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot"); + src: url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"), url("et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") format("svg"); + font-weight: normal; + font-style: italic; + font-display: swap; +} + +@font-face { + font-family: "et-book"; + src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot"); + src: url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), url("et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg"); + font-weight: bold; + font-style: normal; + font-display: swap; +} + +@font-face { + font-family: "et-book-roman-old-style"; + src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot"); + src: url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), url("et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg"); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +/* Tufte CSS styles */ +html { + font-size: 15px; +} + +body { + width: 87.5%; + margin-left: auto; + margin-right: auto; + padding-left: 12.5%; + font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif; + background-color: #fffff8; + color: #111; + max-width: 1400px; + counter-reset: sidenote-counter; +} + +h1 { + font-weight: 400; + margin-top: 4rem; + margin-bottom: 1.5rem; + font-size: 3.2rem; + line-height: 1; +} + +h2 { + font-style: italic; + font-weight: 400; + margin-top: 2.1rem; + margin-bottom: 1.4rem; + font-size: 2.2rem; + line-height: 1; +} + +h3 { + font-style: italic; + font-weight: 400; + font-size: 1.7rem; + margin-top: 2rem; + margin-bottom: 1.4rem; + line-height: 1; +} + +hr { + display: block; + height: 1px; + width: 55%; + border: 0; + border-top: 1px solid #ccc; + margin: 1em 0; + padding: 0; +} + +p.subtitle { + font-style: italic; + margin-top: 1rem; + margin-bottom: 1rem; + font-size: 1.8rem; + display: block; + line-height: 1; +} + +.numeral { + font-family: et-book-roman-old-style; +} + +.danger { + color: red; +} + +article { + padding: 5rem 0rem; +} + +section { + padding-top: 1rem; + padding-bottom: 1rem; +} + +p, +ol, +ul { + font-size: 1.4rem; + line-height: 2rem; +} + +p { + margin-top: 1.4rem; + margin-bottom: 1.4rem; + padding-right: 0; + vertical-align: baseline; +} + +/* Chapter Epigraphs */ +div.epigraph { + margin: 5em 0; +} + +div.epigraph > blockquote { + margin-top: 3em; + margin-bottom: 3em; +} + +div.epigraph > blockquote, +div.epigraph > blockquote > p { + font-style: italic; +} + +div.epigraph > blockquote > footer { + font-style: normal; +} + +div.epigraph > blockquote > footer > cite { + font-style: italic; +} +/* end chapter epigraphs styles */ + +blockquote { + font-size: 1.4rem; +} + +blockquote p { + width: 55%; + margin-right: 40px; +} + +blockquote footer { + width: 55%; + font-size: 1.1rem; + text-align: right; +} + +section > p, +section > footer, +section > table { + width: 55%; +} + +/* 50 + 5 == 55, to be the same width as paragraph */ +section > ol, +section > ul { + width: 50%; + -webkit-padding-start: 5%; +} + +li:not(:first-child) { + margin-top: 0.25rem; +} + +figure { + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + max-width: 55%; + -webkit-margin-start: 0; + -webkit-margin-end: 0; + margin: 0 0 3em 0; +} + +figcaption { + float: right; + clear: right; + margin-top: 0; + margin-bottom: 0; + font-size: 1.1rem; + line-height: 1.6; + vertical-align: baseline; + position: relative; + max-width: 40%; +} + +figure.fullwidth figcaption { + margin-right: 24%; +} + +/* Links: replicate underline that clears descenders */ +a:link, +a:visited { + color: inherit; +} + +.no-tufte-underline:link { + background: unset; + text-shadow: unset; +} + +a:link, .tufte-underline, .hover-tufte-underline:hover { + text-decoration: none; + background: -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(#fffff8, #fffff8), -webkit-linear-gradient(currentColor, currentColor); + background: linear-gradient(#fffff8, #fffff8), linear-gradient(#fffff8, #fffff8), linear-gradient(currentColor, currentColor); + -webkit-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + -moz-background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-size: 0.05em 1px, 0.05em 1px, 1px 1px; + background-repeat: no-repeat, no-repeat, repeat-x; + text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8, 0 0.03em #fffff8, 0 -0.03em #fffff8, 0.06em 0 #fffff8, -0.06em 0 #fffff8, 0.09em 0 #fffff8, -0.09em 0 #fffff8, 0.12em 0 #fffff8, -0.12em 0 #fffff8, 0.15em 0 #fffff8, -0.15em 0 #fffff8; + background-position: 0% 93%, 100% 93%, 0% 93%; +} + +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a:link, .tufte-underline, .hover-tufte-underline:hover { + background-position-y: 87%, 87%, 87%; + } +} + +a:link::selection, +a:link::-moz-selection { + text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe, 0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe, -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe, -0.15em 0 #b4d5fe; + background: #b4d5fe; +} + +/* Sidenotes, margin notes, figures, captions */ +img { + max-width: 100%; +} + +.sidenote, +.marginnote { + float: right; + clear: right; + margin-right: -60%; + width: 50%; + margin-top: 0; + margin-bottom: 0; + font-size: 1.1rem; + line-height: 1.3; + vertical-align: baseline; + position: relative; +} + +.sidenote-number { + counter-increment: sidenote-counter; +} + +.sidenote-number:after, +.sidenote:before { + font-family: et-book-roman-old-style; + position: relative; + vertical-align: baseline; +} + +.sidenote-number:after { + content: counter(sidenote-counter); + font-size: 1rem; + top: -0.5rem; + left: 0.1rem; +} + +.sidenote:before { + content: counter(sidenote-counter) " "; + font-size: 1rem; + top: -0.5rem; +} + +blockquote .sidenote, +blockquote .marginnote { + margin-right: -82%; + min-width: 59%; + text-align: left; +} + +div.fullwidth, +table.fullwidth { + width: 100%; +} + +div.table-wrapper { + overflow-x: auto; + font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif; +} + +.sans { + font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif; + letter-spacing: .03em; +} + +code, pre > code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1.0rem; + line-height: 1.42; + -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS. See https://github.com/edwardtufte/tufte-css/issues/81#issuecomment-261953409 */ +} + +.sans > code { + font-size: 1.2rem; +} + +h1 > code, +h2 > code, +h3 > code { + font-size: 0.80em; +} + +.marginnote > code, +.sidenote > code { + font-size: 1rem; +} + +pre > code { + font-size: 0.9rem; + width: 52.5%; + margin-left: 2.5%; + overflow-x: auto; + display: block; +} + +pre.fullwidth > code { + width: 90%; +} + +.fullwidth { + max-width: 90%; + clear:both; +} + +span.newthought { + font-variant: small-caps; + font-size: 1.2em; +} + +input.margin-toggle { + display: none; +} + +label.sidenote-number { + display: inline; +} + +label.margin-toggle:not(.sidenote-number) { + display: none; +} + +.iframe-wrapper { + position: relative; + padding-bottom: 56.25%; /* 16:9 */ + padding-top: 25px; + height: 0; +} + +.iframe-wrapper iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +@media (max-width: 760px) { + body { + width: 84%; + padding-left: 8%; + padding-right: 8%; + } + + hr, + section > p, + section > footer, + section > table { + width: 100%; + } + + pre > code { + width: 97%; + } + + section > ol { + width: 90%; + } + + section > ul { + width: 90%; + } + + figure { + max-width: 90%; + } + + figcaption, + figure.fullwidth figcaption { + margin-right: 0%; + max-width: none; + } + + blockquote { + margin-left: 1.5em; + margin-right: 0em; + } + + blockquote p, + blockquote footer { + width: 100%; + } + + label.margin-toggle:not(.sidenote-number) { + display: inline; + } + + .sidenote, + .marginnote { + display: none; + } + + .margin-toggle:checked + .sidenote, + .margin-toggle:checked + .marginnote { + display: block; + float: left; + left: 1rem; + clear: both; + width: 95%; + margin: 1rem 2.5%; + vertical-align: baseline; + position: relative; + } + + label { + cursor: pointer; + } + + div.table-wrapper, + table { + width: 85%; + } + + img { + width: 100%; + } +} diff --git a/newblog.cabal b/newblog.cabal index 9981f7e..a3aceb2 100644 --- a/newblog.cabal +++ b/newblog.cabal @@ -9,6 +9,7 @@ executable site , containers , pandoc , pandoc-citeproc + , pandoc-sidenote , hakyll ghc-options: -threaded default-language: Haskell2010 diff --git a/posts/hierarchical-optimal-transport-for-document-classification.org b/posts/hierarchical-optimal-transport-for-document-classification.org index 5fc4e55..1d39f19 100644 --- a/posts/hierarchical-optimal-transport-for-document-classification.org +++ b/posts/hierarchical-optimal-transport-for-document-classification.org @@ -63,7 +63,7 @@ the two configurations of dirt, and is usually called the [[https://en.wikipedia mover's distance]], which is just an instance of the general Wasserstein metric. -[fn:historical_ot] Optimal transport originated with Monge, and then +[fn:historical_ot] {-} Optimal transport originated with Monge, and then Kantorovich, both of whom had very clear military applications in mind (either in Revolutionary France, or during WWII). A lot of historical examples move cannon balls, or other military equipment, along a front diff --git a/site.hs b/site.hs index 77b596a..263a62a 100644 --- a/site.hs +++ b/site.hs @@ -8,6 +8,7 @@ import Text.CSL.Pandoc (processCites) import Text.Pandoc import Text.Pandoc.Options import Text.Pandoc.Highlighting +import Text.Pandoc.SideNote import Hakyll import Hakyll.Core.Compiler.Internal (compilerProvider, compilerAsk) @@ -169,7 +170,7 @@ customPandocCompiler = csl <- load $ fromFilePath "csl/chicago-author-date.csl" bib <- load $ fromFilePath "bib/bibliography.bib" writePandocWith writerOptions <$> - (getResourceBody >>= myReadPandocBiblio readerOptions csl bib) + (getResourceBody >>= myReadPandocBiblio readerOptions csl bib >>= traverse (return . usingSideNotes)) type FeedRenderer = FeedConfiguration -> Context String diff --git a/stack.yaml b/stack.yaml index 6ad76a0..ae10b64 100644 --- a/stack.yaml +++ b/stack.yaml @@ -37,7 +37,9 @@ packages: # Dependency packages to be pulled from upstream that are not in the resolver # using the same syntax as the packages field. # (e.g., acme-missiles-0.3) -# extra-deps: [] +extra-deps: + - pandoc-sidenote-0.19.0.0@sha256:f5a5fdab1900da7b26ca673d14302b0a27b56024ca811babcacab79ba9614e90,1196 + - monad-gen-0.3.0.1@sha256:a2569465cfbd468d3350ef25de56b3362580e77537224313aab1210f40804a3b,821 # Override default flag values for local packages and extra-deps # flags: {} diff --git a/stack.yaml.lock b/stack.yaml.lock index 296b4d0..261e0cb 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -3,7 +3,21 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: [] +packages: +- completed: + hackage: pandoc-sidenote-0.19.0.0@sha256:f5a5fdab1900da7b26ca673d14302b0a27b56024ca811babcacab79ba9614e90,1196 + pantry-tree: + size: 273 + sha256: 0d23026f86da13ca57aaa0041bfe719cf7acbeddbadbbe1bb8e265316dcfce49 + original: + hackage: pandoc-sidenote-0.19.0.0@sha256:f5a5fdab1900da7b26ca673d14302b0a27b56024ca811babcacab79ba9614e90,1196 +- completed: + hackage: monad-gen-0.3.0.1@sha256:a2569465cfbd468d3350ef25de56b3362580e77537224313aab1210f40804a3b,821 + pantry-tree: + size: 288 + sha256: a825dc8dcc3ee27dbbc1b71f6853703790ed320249b8f8510bb36d726664e795 + original: + hackage: monad-gen-0.3.0.1@sha256:a2569465cfbd468d3350ef25de56b3362580e77537224313aab1210f40804a3b,821 snapshots: - completed: size: 506303 diff --git a/templates/default.html b/templates/default.html index 33f3717..8c7439f 100644 --- a/templates/default.html +++ b/templates/default.html @@ -6,7 +6,7 @@ Dimitri Lozeve - $title$ - +