+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/_includes/footer.html b/_includes/footer.html
index 617634423..9d439f4ee 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -1,7 +1,7 @@
diff --git a/_includes/mathjax.html b/_includes/mathjax.html
new file mode 100644
index 000000000..5b24b91a2
--- /dev/null
+++ b/_includes/mathjax.html
@@ -0,0 +1,17 @@
+{% if page.mathjax %}
+
+
+{% endif %}
\ No newline at end of file
diff --git a/_layouts/post.html b/_layouts/post.html
index 97794215b..9057ea270 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -1,6 +1,9 @@
---
layout: default
---
+
+{% include mathjax.html %}
+
@@ -10,6 +13,9 @@
{{ page.title }}
{{ content }}
+
+ {% include disqus.html %}
+
diff --git a/_machine_learning/2019-07-16-pac-introduction.markdown b/_machine_learning/2019-07-16-pac-introduction.markdown
new file mode 100644
index 000000000..bc2ed9131
--- /dev/null
+++ b/_machine_learning/2019-07-16-pac-introduction.markdown
@@ -0,0 +1,38 @@
+---
+layout: post
+title: 01. Introducción al modelo de aprendizaje PAC
+date: 2019-07-16 12:58:00
+mathjax: true
+comments: true
+---
+
+
+### Problemas
+Ejercicio 3 del capítulo 2 de *Understanding machine learning*
+
+
+### Trabajo numérico
+Vamos a hacer experimentos numéricos para ilustrar el contenido de los resultados en torno a que las clases de hipótesis finitas son PAC aprendibles.
+
+Consideremos el problema que hemos estado discutiendo en clase. Tenemos un dominio $\mathcal{X}$ dado por el cuadrado $[0,2]\times[0,2]$ y un conjunto de categorías dado por $\mathcal{Y} = \\{ 0,1 \\}$. Supongamos que la distribución definida sobre el dominio es una distribución homogénea y la función de clasificación $f$ es $f(x) = 1$ si $x\in\mathcal{X}_1$ y $f(x)=0$ si $x\in\mathcal{X}_0$, donde $\mathcal{X}_1 = [1-1/\sqrt{2}, 1+1/\sqrt{2}]\times[1-1/\sqrt{2},1+1/\sqrt{2}]$ y $\mathcal{X}_0 = \mathcal{X}-\mathcal{X}_1$.
+
+Consideremos ahora una clase de hipótesis finita que satisfaga realizabilidad. Una clase de estas consiste en rectángulos alineados a los lados de $\mathcal{X}$. Para que la clase de hipótesis sea finita, discretizamos los lados del rectángulo en unidades de 0.01 y desplazamos la esquina inferior izquierda de los rectángulos de la esquina inferior izquierda de $\mathcal{X}$ en unidades de 0.01 en cada dirección.
+
+1. Especifica una parametrización del espacio de hipótesis.
+2. ¿Cuál es el tamaño del espacio de hipótesis?
+3. Calcula la probabilidad de extraer un ejemplo en cada una de las clases.
+
+Formemos ahora conjuntos de entrenamiento *independiente e idénticamente distribuidos*, con una distribución, como dijimos, homogénea en $\mathcal{X}$ para un solo punto.
+
+{:start="4"}
+4. En **python**, define un conjunto de métodos que realicen las siguientes tareas: a) formen conjuntos de entrenamiento $S$ con $m$ elementos, b)implementen una hipótesis $h:\mathcal{X}\rightarrow\{0,1\}$ para cada $h$ en $\mathcal{X}$, c) calculen errores empíricos y de generalización y d) seleccionen al rectángulo $\text{ERM}_{\mathcal{H}}$.
+
+5. Simplifiquemos la clase de hipótesis finitas a rectángulos con lados paralelos a los lados de $\mathcal{X}$, *centrados* en $\mathcal{X}$. ¿Cuál es el tamaño de $\mathcal{H}$? Forma un conjunto de entrenamiento con $m$ elementos, para $m = \text{e}^0, \text{e}^{1/2},\text{e}^1, \ldots,m_{\mathcal{H}}$, donde $m_{\mathcal{H}}$ es la complejidad de $S$ para un parámetro de confianza y un error de 0.01. Grafica los puntos de cada conjunto de entrenamiento. Grafica los errores de generalización $L_{(D,f)}$ y empírico $L_S$ para cada hipótesis en $\mathcal{H}$. Obtén algún rectángulo $h_S$ que minimice $L_S$ y grafícalo en $\mathcal{X}$.
+
+6. Para cada valor de $m$, forma 1000 conjuntos de entrenamiento, selecciona $h_S$ en cada caso y haz un histograma del error $L_{(D,f)}$.
+
+7. Si seleccionas un valor $\epsilon$ del error de generalización $L_{(D,f)}$, ¿cuántos puntos del histograma tienen error de generalización menor a $\epsilon$?
+
+8. ¿Qué dice en este caso el resultado de que las clases de hipótesis finitas son PAC aprendibles con complejidad de muestra $\text{log}(\|\mathcal{H}\|/\delta)/\epsilon$?
+
+9. Haz cualquier otra cosa que te resulte interesante.
diff --git a/_machine_learning/2019-08-13-pac-linear-predictors.markdown b/_machine_learning/2019-08-13-pac-linear-predictors.markdown
new file mode 100644
index 000000000..d5b8acd79
--- /dev/null
+++ b/_machine_learning/2019-08-13-pac-linear-predictors.markdown
@@ -0,0 +1,26 @@
+---
+layout: post
+title: 02. Modelo PAC generalizado y predictores lineales
+date: 2019-08-13 12:58:00
+mathjax: true
+comments: true
+---
+
+
+### Problemas
+Problemas 4, 7 del capítulo 3, problema 1 del capítulo 4, problema 3 del capítulo 9.
+
+
+### Trabajo numérico
+
+Vamos a implementar en **python** el algoritmo del perceptrón. Recordamos que, dado un conjunto de entrenamiento $S_m = \\{(\mathbf{x}_1, y_1), \ldots, (\mathbf{x}_m, y_m) \\}$, con cada $\mathbf{x}_i\in\mathbb{R}^d$ y cada $y_i\in\\{+1,-1\\}$, formamos una secuencia de predictores $\mathbf{w}^{(t)}$ de la siguiente manera. Elegimos $\mathbf{w}^{(1)}$ como el vector $(0,\ldots,0)\in\mathbb{R}^{(d+1)}$, con el que formamos el predictor dado por el signo de $h\_{\mathbf{w}}(\mathbf{\tilde{x}}) = \langle\mathbf{w}, \mathbf{\tilde{x}}\rangle$, con $\mathbf{\tilde{x}} = (1, \mathbf{x})$. Si todos los elementos en $S_m$ son correctamente clasificados, entonces hemos terminado. Si existe algún dato $(\mathbf{x}_i, y_i)$ mal clasificado, entonces definimos $\mathbf{w}^{(2)} = \mathbf{w}^{(1)} + y_i\mathbf{\tilde{x}}_i$. Si este predictor clasifica bien a todos los elementos en el conjunto de entrenamiento, hemos terminado. Si no, entonces definimos otro predictor. En general, definimos $\mathbf{w}^{(t+1)} = \mathbf{w}^{(t)} + y_i\mathbf{\tilde{x}}_i$, donde $(\mathbf{x}_i, y_i)$ es un dato en el que el predictor $\mathbf{w}^{(t)}$ se equivoca. En clase demostramos que el número de iteraciones necesarias para encontrar el predictor correcto en el esquema de realizabilidad está acotado.
+
+1. Implementa este algoritmo en **python**.
+
+2. Consideremos ahora clasificación binaria en $\mathbb{R}^2$, bajo el supuesto de realizabilidad en la clase de predictores lineales. Supongamos que el predictor verdadero está dado por $\mathbf{w} = (-1,1,1)$. Grafica la frontera entre ambas clases de acuerdo a este clasificador.
+
+3. Supón que la distribución sobre $\mathbb{R}^2$ es homogénea. ¿Cómo generas puntos aleatorios en $\mathbb{R}^2? $Para cada $m=1,\ldots,1000$, forma 100 conjuntos de entrenamiento $S_m$ y grafica el promedio de $R = \max_i \\{\|\|\mathbf{\tilde{x}}_i\|\|\\} $. Es decir, ¿cómo escala $R$ con el tamaño de la muestra?
+
+4. Para cada $m=1,\ldots, 1000$, ejecuta el algoritmo de perceptrón y grafica el número de pasos necesarios que le toma al algoritmo encontrar un vector $\mathbf{w}^*$ como función de $m$.
+
+5. Para m = 100, grafica en $\mathbb{R}^2$ la secuencia de actualizaciones $\mathbf{w}^{(t)}$ de predictores hasta que clasifican correctamente a los datos de entrenamiento.
\ No newline at end of file
diff --git a/_machine_learning/2019-10-29-nfl-vc-dimension.markdown b/_machine_learning/2019-10-29-nfl-vc-dimension.markdown
new file mode 100644
index 000000000..f95ce9b3a
--- /dev/null
+++ b/_machine_learning/2019-10-29-nfl-vc-dimension.markdown
@@ -0,0 +1,22 @@
+---
+layout: post
+title: 03. Teorema NFL y dimensión VC
+date: 2019-10-29 12:58:00
+mathjax: true
+comments: true
+---
+
+
+### Problemas
+Problemas 1, 2 del capítulo 5, problemas 5, 7, 9 del capítulo 6.
+
+
+### Para su blog
+
+Escriban un artículo sobre la dimensión VC de una clase de hipótesis, que contenga las siguientes ideas:
+
+- concepto de *shattering* de un subconjunto por una clase de hipótesis,
+- definición de dimensión VC de una clase de hipótesis,
+- relevancia para la aprendibilidad de una clase de hipótesis.
+
+Su artículo deberá ser formal, pero no demasiado formal. Busquen motivar las ideas anteriores con ejemplos ilustrativos.
\ No newline at end of file
diff --git a/_poetry/2015-05-05-emperor.markdown b/_poetry/2015-05-05-emperor.markdown
deleted file mode 100644
index 9d5c76754..000000000
--- a/_poetry/2015-05-05-emperor.markdown
+++ /dev/null
@@ -1,25 +0,0 @@
----
-layout: post
-title: The Emperor of Ice Cream
-date: 2015-07-06 07:59:00
----
-
-Call the roller of big cigars,
-The muscular one, and bid him whip
-In kitchen cups concupiscent curds.
-Let the wenches dawdle in such dress
-As they are used to wear, and let the boys
-Bring flowers in last month's newspapers.
-Let be be finale of seem.
-The only emperor is the emperor of ice-cream.
-
-Take from the dresser of deal.
-Lacking the three glass knobs, that sheet
-On which she embroidered fantails once
-And spread it so as to cover her face.
-If her horny feet protrude, they come
-To show how cold she is, and dumb.
-Let the lamp affix its beam.
-The only emperor is the emperor of ice-cream.
-
-### Wallace Stevens
\ No newline at end of file
diff --git a/_poetry/2015-07-06-soliloquy.markdown b/_poetry/2015-07-06-soliloquy.markdown
deleted file mode 100644
index 9d7a88eb6..000000000
--- a/_poetry/2015-07-06-soliloquy.markdown
+++ /dev/null
@@ -1,48 +0,0 @@
----
-layout: post
-title: Soliloquy Of The Solipsist
-date: 2015-07-06 07:59:00
----
-I?
-I walk alone;
-The midnight street
-Spins itself from under my feet;
-When my eyes shut
-These dreaming houses all snuff out;
-Through a whim of mine
-Over gables the moon's celestial onion
-Hangs high.
-
-I
-Make houses shrink
-And trees diminish
-By going far; my look's leash
-Dangles the puppet-people
-Who, unaware how they dwindle,
-Laugh, kiss, get drunk,
-Nor guess that if I choose to blink
-They die.
-
-I
-When in good humor,
-Give grass its green
-Blazon sky blue, and endow the sun
-With gold;
-Yet, in my wintriest moods, I hold
-Absolute power
-To boycott any color and forbid any flower
-To be.
-
-I
-Know you appear
-Vivid at my side,
-Denying you sprang out of my head,
-Claiming you feel
-Love fiery enough to prove flesh real,
-Though it's quite clear
-All you beauty, all your wit, is a gift, my dear,
-From me.
-
-
-
-### Sylvia Plath
\ No newline at end of file
diff --git a/_poetry/2015-08-06-fantasy.markdown b/_poetry/2015-08-06-fantasy.markdown
deleted file mode 100644
index b478aec83..000000000
--- a/_poetry/2015-08-06-fantasy.markdown
+++ /dev/null
@@ -1,29 +0,0 @@
----
-layout: post
-title: In That Other Fantasy Where We Live Forever
-date: 2015-08-06 07:59:00
----
-we were never caught
-
-we partied the southwest, smoked it from L.A. to El Dorado
-worked odd jobs between delusions of escape
-drunk on the admonitions of parents, parsons & professors
-driving faster than the road or law allowed.
-our high-pitched laughter was young, heartless & disrespected
-authority. we could be heard for miles in the night
-
-the Grand Canyon of a new manhood.
-womanhood discovered
-like the first sighting of Mount Wilson
-
-we rebelled against the southwestern wind
-
-we got so naturally ripped, we sprouted wings,
-crashed parties on the moon, and howled at the earth
-
-we lived off love. It was all we had to eat
-
-when you split you took all the wisdom
-and left me the worry
-
-### Wanda Coleman
\ No newline at end of file
diff --git a/_portfolio/1_project.markdown b/_portfolio/1_project.markdown
deleted file mode 100644
index d5c8c9ed0..000000000
--- a/_portfolio/1_project.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-layout: post
-title: Project
-description: a project with a background image
-img: /img/12.jpg
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: /img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_portfolio/2_project.markdown b/_portfolio/2_project.markdown
deleted file mode 100644
index 30cdc5712..000000000
--- a/_portfolio/2_project.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-layout: post
-title: Project
-description: a project with a background image
-img: /img/2.jpg
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: /img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_portfolio/3_project.markdown b/_portfolio/3_project.markdown
deleted file mode 100644
index 3a567cd9a..000000000
--- a/_portfolio/3_project.markdown
+++ /dev/null
@@ -1,56 +0,0 @@
----
-layout: post
-title: Project
-description: a project that redirects to another website
-img:
-redirect: https://unsplash.com
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: /img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_portfolio/4_project.markdown b/_portfolio/4_project.markdown
deleted file mode 100644
index 6f908e3ef..000000000
--- a/_portfolio/4_project.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-layout: post
-title: Project
-description: another without an image
-img:
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: /img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_portfolio/5_project.markdown b/_portfolio/5_project.markdown
deleted file mode 100644
index 982b8a6ca..000000000
--- a/_portfolio/5_project.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-layout: post
-title: Project
-description: a project with a background image
-img: /img/1.jpg
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: /img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_portfolio/6_project.markdown b/_portfolio/6_project.markdown
deleted file mode 100644
index 7071bde8f..000000000
--- a/_portfolio/6_project.markdown
+++ /dev/null
@@ -1,55 +0,0 @@
----
-layout: post
-title: Project
-description: a project with no image
-img:
----
-
-Every project has a beautiful feature shocase page. It's easy to include images, in a flexible 3-column grid format. Make your photos 1/3, 2/3, or full width.
-
-To give your project a background in the portfolio page, just add the img tag to the front matter like so:
-
- ---
- layout: post
- title: Project
- description: a project with a background image
- img: {{ site.baseurl }}/img/12.jpg
- ---
-
-
-
-
-
-
-
-
- Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles.
-
-
-
-
-
- This image can also have a caption. It's like magic.
-
-
-You can also put regular text between your rows of images. Say you wanted to write a little bit about your project before you posted the rest of the images. You describe how you toiled, sweated, *bled* for your project, and then.... you reveal it's glory in the next row of images.
-
-
-
-
-
-
-
- You can also have artistically styled 2/3 + 1/3 images, like these.
-
-
-
-
-
-
-The code is simple. Just add a col class to your image, and another class specifying the width: one, two, or three columns wide. Here's the code for the last row of images above:
-
-
-
-
-
diff --git a/_posts/2015-03-15-title.markdown b/_posts/2015-03-15-title.markdown
deleted file mode 100644
index 4cc51ea00..000000000
--- a/_posts/2015-03-15-title.markdown
+++ /dev/null
@@ -1,28 +0,0 @@
----
-layout: post
-title: a post with formatting and links
-date: 2015-03-15 16:40:16
-description: march & april, looking forward to summer
----
-Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy.
-
-#### Hipster list
-
-
brunch
-
fixie
-
raybans
-
messenger bag
-
-
-Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut Tumblr taxidermy, raw denim Kickstarter sartorial dreamcatcher. Quinoa chambray slow-carb salvia readymade, bicycle rights 90's yr typewriter selfies letterpress cardigan vegan.
-
-
-
-Pug heirloom High Life vinyl swag, single-origin coffee four dollar toast taxidermy reprehenderit fap distillery master cleanse locavore. Est anim sapiente leggings Brooklyn ea. Thundercats locavore excepteur veniam eiusmod. Raw denim Truffaut Schlitz, migas sapiente Portland VHS twee Bushwick Marfa typewriter retro id keytar.
-
-
- We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another.
- —Anais Nin
-
-
-Fap aliqua qui, scenester pug Echo Park polaroid irony shabby chic ex cardigan church-key Odd Future accusamus. Blog stumptown sartorial squid, gastropub duis aesthetic Truffaut vero. Pinterest tilde twee, odio mumblecore jean shorts lumbersexual.
\ No newline at end of file
diff --git a/_posts/2015-05-15-title.markdown b/_posts/2015-05-15-title.markdown
deleted file mode 100644
index 5f718f36f..000000000
--- a/_posts/2015-05-15-title.markdown
+++ /dev/null
@@ -1,30 +0,0 @@
----
-layout: post
-title: a post with images
-date: 2015-05-15 21:01:00
-description: this is what included images could look like
----
-Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Fingerstache four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch.
-
-
-
-
-
-
-
-
- A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all.
-
-
-
-
-
-
-Slow-carb four dollar toast Helvetica pop-up. Kale chips next level literally trust fund Pitchfork. Jean shorts Pinterest beard, farm-to-table irony craft beer swag tofu 8-bit Banksy. Quinoa forage fanny pack, pug hashtag Echo Park heirloom Schlitz tote bag artisan Neutra mumblecore 90's shabby chic raw denim.
-
-
-
-
-
-
-
diff --git a/_posts/2015-07-15-title.markdown b/_posts/2015-07-15-title.markdown
deleted file mode 100644
index 0ddbcb80a..000000000
--- a/_posts/2015-07-15-title.markdown
+++ /dev/null
@@ -1,33 +0,0 @@
----
-layout: post
-title: a post with code
-date: 2015-07-15 15:09:00
-description: an example of a blog post with some code
----
-This theme implements a built-in Jekyll feature, the use of Pygments, for sytanx highlighting. It supports more than 100 languages. This example is in C++. All you have to do is wrap your code in a liquid tag:
-{% raw %}
-{% highlight c++ %} code code code {% endhighlight %}{% endraw %}
-
-Produces something like this:
-
-{% highlight c++ %}
-
-int main(int argc, char const *argv[])
-{
- string myString;
-
- cout << "input a string: ";
- getline(cin, myString);
- int length = myString.length();
-
- char charArray = new char * [length];
-
- charArray = myString;
- for(int i = 0; i < length; ++i){
- cout << charArray[i] << " ";
- }
-
- return 0;
-}
-
-{% endhighlight %}
diff --git a/_sass/_base.scss b/_sass/_base.scss
index e4844b95d..814f43c09 100644
--- a/_sass/_base.scss
+++ b/_sass/_base.scss
@@ -64,6 +64,7 @@ p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: $vertical-spacing-unit / 2;
+ text-align: justify;
}
.alignright {
@@ -153,8 +154,8 @@ blockquote {
color: $text-color;
border-left: 10px solid $grey-color-light;
padding-left: $horizontal-spacing-unit / 2;
- font-size: 18px;
- font-style: italic;
+ font-size: 16px;
+ /* font-style: italic; */
> :last-child {
margin-bottom: 0;
diff --git a/_tech/2019-07-10-setup-jekyll-blog-math-comments.markdown b/_tech/2019-07-10-setup-jekyll-blog-math-comments.markdown
new file mode 100644
index 000000000..6ea56fd93
--- /dev/null
+++ b/_tech/2019-07-10-setup-jekyll-blog-math-comments.markdown
@@ -0,0 +1,310 @@
+---
+layout: post
+title: Cómo montar un blog de Jekyll con matemáticas y comentarios
+date: 2019-07-10 10:49:00
+mathjax: true
+comments: true
+description: Describimos como montar un blog en Github Pages donde podamos publicar artículos matemáticos y tener comentarios
+---
+
+En esta entrada inicial vamos a montar un blog donde podamos publicar nuestros hallazgos matemáticos o simplemente cualquier cosa que queramos compartir. Para que satisfaga nuestras necesidades, vamos a implementar la posibilidad de escribir símbolos matemáticos con el menor sufrimiento posible, por un lado, y vamos a habilitar la escritura de comentarios por parte de otras personas. La manera en que vamos a implementar esto es relativamente estándar en la comunidad de programadores. Más formalmente, vamos a generar un blog usando **Jekyll** y lo vamos a publicar en **Github Pages**. A continuación explicamos todo esto. Como referencia, el código de mi blog se encuentra en [github.com/paloderosa/paloderosa.github.io](https://github.com/paloderosa/paloderosa.github.io).
+
+### 1. Cuenta de Github
+El primer paso en nuestra tarea es crear una cuenta en [github.com](https://github.com). Github es un sitio donde se pueden alojar repositorios de **git**. git es una herramiento para gestionar versiones de código. Además de crear una cuenta en Github, es necesario también que [descarguen git](https://git-scm.com/downloads). Para saber más del flujo de trabajo con git, te recomiendo mucho [esta guía](https://guides.github.com/introduction/git-handbook/).
+
+Una nueva funcionalidad de Github es que permite alojar páginas web personales o de organización o páginas web asociadas a repositorios o proyectos específicos. Nosotros vamos a crear una página personal. Como mi nombre de usuario es **paloderosa**, mi página alojada en Github Pages es [paloderosa.github.io](https://paloderosa.github.io). Esto no se produce automáticamente, sino que es resultado de un proceso. Cuando completemos este proceso, si el nombre de usuario en la cuenta que han creado es **usuario**, entonces su página quedará alojada en **usuario.github.io**.
+
+
+### 2. Elegir una tema de Jekyll
+Como dijimos que queremos montar un blog con el menor sufrimiento posible, vamos a usar temas prediseñados que personas han hecho y puesto de manera abierta en internet. Si no quisiéramos elegir un tema, tendríamos entonces que correr con todo el diseño y escritura de una página web. El término para buscar en **google** es [Jekyll themes](https://www.google.com/search?q=jekyll+themes&oq=jekyll+themes). Algunos lugares donde pueden buscar son:
+
+- [jekyllthemes.io](https://jekyllthemes.io/)
+- [jekyllthemes.org](http://jekyllthemes.org/)
+- [www.wowthemes.net/jekyll-themes-templates/](https://www.wowthemes.net/jekyll-themes-templates/)
+
+Nosotros hemos elegido un tema muy minimalista, [-folio](http://bogoli.github.io/-folio/), como punto de partida de nuestro blog. Lo que haremos será tomar ese tema, borrar las entradas de ejemplo y añadir las nuestras.
+
+En mi caso, el código del tema se encuentra en [https://github.com/bogoli/-folio](https://github.com/bogoli/-folio). En la parte superior de esta página, damos *click* en **fork**.
+
+
+
+Esto genera una copia de este repositorio dentro de nuestra propia cuenta, es decir, ahora uno de *nuestros* repositorios es una copia del repositorio que contiene el tema. Después de haber dado *click* en *fork*, github nos redirige a la página de la copia del repositorio en nuestra cuenta. El repositorio en nuestra cuenta tiene el nombre del repositorio original. Es necesario que cambiemos el nombre el repositorio. Para esto, damos *click* en *Settings* y en el campo para renombrar al repositorio escribimos **usuario.github.io**, donde **usuario** es el usuario que elegimos.
+
+
+
+Si visitamos la página **https://usuario.github.io**, podemos ver ahora la versión inicial de nuestro blog.
+
+
+
+¿Cómo modificamos ahora el código para publicar el contenido que queremos? Necesitar tener una copia en nuestra computadora que podamos modificar y después volver a poner en el repositorio de Github. Para descargar el repositorio a nuestra computadora, abrimos nuestra terminal. Elegimos una carpeta donde queramos albergar el repositorio y nos movemos en la terminal a esa carpeta,
+
+{% highlight bash %}
+cd /ruta-a-carpeta/
+{% endhighlight %}
+
+Descargamos una copia local del repositorio y nos movemos al repositorio con
+
+{% highlight bash %}
+git clone https://github.com/usuario/usuario.github.io.git
+cd usuario.github.io
+{% endhighlight %}
+
+Esto, además, inicia un repositorio local. Para ver en cualquier momento el estado de nuestro repositorio, escribimos
+{% highlight bash %}
+git status
+{% endhighlight %}
+
+
+### 3. Habilitar símbolos matemáticos
+Existen distintas maneras de habilitar la escritura de símbolos matemáticos en una página web, cada una con distinto nivel de dificultad y con distintos resultados. Para una página generada con Jekyll, la recomendación es usar una librería de **javascript** llamada **mathjax**.
+
+Para habilitar **mathjax** en nuestro blog, hacemos lo siguiente. En los archivos del repositorio, existe una carpeta llamada _includes. Dentro de esta carpeta, creamos un archivo llamado mathjax.html con el siguiente contenido:
+
+{% highlight javascript %}
+{% raw %}
+{% if page.mathjax %}
+{% endraw %}
+
+
+{% raw %}
+{% endif %}
+{% endraw %}
+{% endhighlight %}
+
+Guardamos este archivo. Ahora tenemos que incluir esta sección de código en las páginas donde queremos poder escribir matemáticas. Normalmente, nos interesa poder escribir matemáticas en cualquiera de nuestras entradas. En otra carpeta de nuestro repositorio, en _layout, existe un archivo llamado post.html. El inicio del archivo es de la siguiente forma:
+{% highlight markdown %}
+---
+layout: default
+---
+.
+.
+.
+{% endhighlight %}
+
+Incluimos el archivo actual en este inicio:
+{% highlight markdown %}
+---
+layout: default
+---
+{% raw %}
+{% include mathjax.html %}
+{% endraw %}
+.
+.
+.
+{% endhighlight %}
+
+Observemos ahora el encabezado de alguna entrada de ejemplo del tema que descargamos. El encabezado de este artículo, por ejemplo, es el siguiente.
+
+{% highlight markdown %}
+---
+layout: post
+title: Cómo montar un blog de Jekyll con matemáticas y comentarios
+date: 2019-07-10 10:49:00
+description: Describimos como montar un blog en Github Pages donde podamos publicar artículos matemáticos y tener comentarios
+---
+{% endhighlight %}
+
+La primera línea con layout: post indica que el formato de la entrada es el que esté definido en el archivo post.html que acabamos de ver. En este momento, no está habilitada la inclusión de símbolos matemáticos. Para habilitar esta inclusión, tenemos que incluir mathjax: true al encabezado, de modo que resulte en:
+{% highlight markdown %}
+---
+layout: post
+title: Cómo montar un blog de Jekyll con matemáticas y comentarios
+date: 2019-07-10 10:49:00
+description: Describimos como montar un blog en Github Pages donde podamos publicar artículos matemáticos y tener comentarios
+mathjax: true
+---
+{% endhighlight %}
+
+En este momento, ya podemos incluir símbolos matemáticos. Por ejemplo, el texto
+
+>En clase, iniciamos la definición del esquema de aprendizaje PAC (Probably Approximately Correct). Bajo ciertas simplificaciones, dado un parámetro de confianza $\delta$ y un error $\epsilon$, encontramos el número mínimo de datos de entrenamiento en $S$ tal que el error de generalización $L_{(D,f)}(h_S)$ para el predictor $h_S$ resultado de ERM$_H$ satisface $$L_{(D,f)}(h_S)<\epsilon$$ con probabilidad $1-\delta$.
+
+resulta de escribir
+
+{% highlight TeX %}
+En clase, iniciamos la definición del esquema de aprendizaje PAC
+(Probably Approximately Correct). Bajo ciertas simplificaciones,
+dado un parámetro de confianza $\delta$ y un error $\epsilon$,
+encontramos el número mínimo de datos de entrenamiento en $S$
+tal que el error de generalización $L_{(D,f)}(h_S)$ para el
+predictor $h_S$ resultado de ERM$_H$ satisface $L_{(D,f)}(h_S)<\epsilon$
+con probabilidad $1-\delta$.
+{% endhighlight %}
+
+que es muy parecido a LaTeX. Puedes habilitar **mathjax** en algún post del tema original, modificando el encabezado, y agregar alguna ecuación.
+
+
+### 4. Ejecutar los cambios en la página
+Ahora que hemos realizado varias modificaciones, queremos poder observar esas modificaciones en nuestro blog. Todas las modificaciones fueron realizadas en la copia local de nuestro blog, de manera que cuando veamos usuario.github.io obviamente no se mostrará ningún cambio. Ubicando la terminal en nuestro repositorio, escribimos
+{% highlight bash %}
+git status
+{% endhighlight %}
+que mostrará todos los archivos que creamos o modificamos. Escribimos
+{% highlight bash %}
+git add .
+git commit -m "Primera modificación al blog"
+git push origin master
+{% endhighlight %}
+
+Si modificaste alguna entrada de ejemplo o agregaste alguna ecuación, debieras poder observar los resultados en **usuario.github.io**. Cada vez que hagas una modificación, tienes que repetir estos pasos.
+
+
+### 5. Habilitar comentarios
+Como queremos poder criticar nuestro trabajo, necesitamos habilitar comentarios. Igualmente aquí existen muchas opciones, cada una con distinto nivel de sufrimiento. Lo más sencillo y estándar es habilitar el sistema de comentarios de [disqus](https://disqus.com/).
+
+Lo primero que se requiere es abrir una cuenta de [disqus](https://disqus.com/profile/signup/). Después de crear una cuenta, tenemos que registrar nuestra página en **disqus** en [https://disqus.com/admin/create/](https://disqus.com/admin/create/). Una vez que elijamos un nombre de página, **disqus** generará un nombre corto para la página, **usuario-github-io** en este caso. Seleccionamos una categoría y creamos el sitio.
+
+
+
+Ahora, en el archivo _config.yml de nuestro repositorio local, debemos agregar las líneas
+{% highlight yml %}
+comments:
+ provider: "disqus"
+ disqus:
+ shortname: "usuario-github-io"
+{% endhighlight %}
+
+En shortname sustituimos el nombre que haya generado **disqus**.
+
+Ahora, en la carpeta _includes, creamos un archivo llamado disqus.html con el siguiente contenido:
+
+{% highlight javascript %}
+{% raw %}
+{% if page.comments %}
+{% endraw %}
+
+
+
+
+{% raw %}
+{% endif %}
+{% endraw %}
+{% endhighlight %}
+
+Abrimos el archivo post.html que se encuentra en la carpeta _layouts e incluimos la sección de comentarios en el lugar apropiado, al final del *tag* article, de la siguiente forma:
+
+{% highlight html %}
+
+ .
+ .
+ .
+ {% raw %}{% include disqus.html %} {% endraw %}
+
+{% endhighlight %}
+
+Para habilitar ahora comentarios en una entrada del blog, miramos de nuevo al encabezado de alguna de las entradas. El encabezado hasta el momento para esta entrada es
+
+{% highlight markdown %}
+---
+layout: post
+title: Cómo montar un blog de Jekyll con matemáticas y comentarios
+date: 2019-07-10 10:49:00
+mathjax: true
+description: Describimos como montar un blog en Github Pages donde podamos publicar artículos matemáticos y tener comentarios
+---
+{% endhighlight %}
+
+Si agregamos comments: true, de modo que el encabezado queda como
+
+{% highlight markdown %}
+---
+layout: post
+title: Cómo montar un blog de Jekyll con matemáticas y comentarios
+date: 2019-07-10 10:49:00
+description: Describimos como montar un blog en Github Pages donde podamos publicar artículos matemáticos y tener comentarios
+mathjax: true
+comments: true
+---
+{% endhighlight %}
+
+debe de cargar al final de la página. Para ver los resultados, hacemos de nuevo
+{% highlight bash %}
+git add .
+git commit -m "Comentarios de disqus habilitados"
+git push origin master
+{% endhighlight %}
+
+
+### 6. Generar el blog localmente
+Como habrás visto, es un poco tedioso el proceso de agregar o modificar contenido a nuestro blog, hacer todo el proceso en git y ver los resultados en la página. Sólo hasta que completamos todo este procedimiento podemos saber si el resultado coincide con lo que pretendíamos.
+
+Cuando alojamos nuestra página en el repositorio remoto de Github, Github procesa el contenido y genera los archivos de la página. Lo que nosotros escribimos localmente no coincide con el código de lo que termina publicado en el blog; esto último es el resultado de la compilación de nuestro código.
+
+Nosotros podemos hacer la compilación localmente y ver en tiempo real las modificaciones que hagamos, en lugar de hacer todo el proceso anterior. A continuación nos guiamos por las instrucciones que [Github nos indica](https://help.github.com/en/articles/setting-up-your-github-pages-site-locally-with-jekyll). Sin embargo, algunos de los pasos que ahí se indican ya los hemos realizado, así que sólo es necesario realizar los pasos que se indican en los Requisitos, Paso 2 y Paso 4.
+
+Lo primero es abrir la terminal y verificar que tenemos un programa que se llama **ruby**. Escribimos
+{% highlight bash %}
+ruby --version
+{% endhighlight %}
+Si aparece algo, ya lo tenemos. En macOS y Linux, **ruby** suele estar instalado como parte del sistema operativo. En Windows esto no es así. Entonces hay que instalar **ruby** [aquí](https://www.ruby-lang.org/en/downloads/). Debemos de tener la versión 2.1.0 o más reciente.
+
+Una vez que tengamos **ruby**, instalamos **bundler** con
+{% highlight bash %}
+gem install bundler
+{% endhighlight %}
+
+Ahora, buscamos en el repositorio local el archivo Gemfile. Si no existe, creamos un archivo llamado Gemfile (sin extensión) con el siguiente contenido:
+{% highlight bash %}
+source 'https://rubygems.org'
+gem 'github-pages', group: :jekyll_plugins
+{% endhighlight %}
+ Si el archivo Gemfile ya existe, sólo agregamos las líneas anteriores al contenido del archivo.
+
+Instalamos ahora Jekyll. Ubicamos la terminal en el repositorio local y escribimos
+{% highlight bash %}
+bundle install
+{% endhighlight %}
+Esto instala Jekyll y lee el contenido de Gemfile para decidir qué dependencias adicionales instalar.
+
+Finalmente, escribimos en la terminal
+{% highlight bash %}
+bundle exec jekyll serve
+{% endhighlight %}
+y abrimos la dirección [http://127.0.0.1:4000/](http://127.0.0.1:4000/), donde podemos ver el resultado de nuestro código. Cuando hagamos una modificación, recargamos la página y debiéramos ver las modificaciones. El generador de Jekyll se mantendrá corriendo en la terminal hasta que lo interrumpamos con Ctrl+C.
+
+Cuando tengamos una versión de nuestro blog que queramos publicar a la página, repetimos el proceso
+{% highlight bash %}
+git add .
+git commit -m "Comentarios de disqus habilitados"
+git push origin master
+{% endhighlight %}
+
+### 7. Siguientes pasos
+Casi todo de lo que mencionamos probablemente sea nuevo para todos. A continuación menciono algunas referencias o ideas para empezar a generar nuestras propias entradas y experimentar con la estructura del blog.
+
+1. Prueba a modificar la estructura del archivo _config.yml. Aquí puedes modificar la estructura del blog, añadir o quitar secciones, personalizar datos del blog.
+
+2. Revisar la [documentación de Jekyll](https://jekyllrb.com/docs/).
+
+3. El contenido del blog se escribe en un lenguaje llamado **markdown**, que es una simplificación de **html**. Puedes consultar [esta guía rápida](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) de **markdown**.
\ No newline at end of file
diff --git a/about.md b/about.md
index a0fe05888..9dd47d651 100644
--- a/about.md
+++ b/about.md
@@ -4,26 +4,29 @@ title: about
permalink: /about/
---
-
+
-Write your biography here. Tell the world about yourself. Link to your favorite subreddit. You can put a picture in, too. The code is already in, just name your picture "prof_pic.jpg" and put it in the img folder.
-Link to your social media connections, too. This theme is set up to use Font Awesome icons, like the ones below. Add your facebook, twitter, linkedin, or just disable all of them.
+Pedro creció en la Ciudad de México. Su casa tenía un pequeño jardín con girasoles, pero prefirió la calle.
+Como nunca tuvo sentido común ni intuición práctica, estudió física teórica y le fue bien.
+Como tampoco tenía mucho miedo, recorrió las noches de la Ciudad de México durante años, de 11 a 2.
+Sus amigos lo llamaron situacionista y citaron a Vaneigem, el no les entendió. Ahora vive encerrado en una jaula.
+
-
-
+
+
-
+
- You can even add a little note about which of these is the best way to reach you.
+
\ No newline at end of file
diff --git a/poetry.md b/poetry.md
deleted file mode 100644
index 81ea0d4f5..000000000
--- a/poetry.md
+++ /dev/null
@@ -1,15 +0,0 @@
----
-layout: page
-permalink: /poetry/
-title: poetry
-description: Showcase your writing, short stories, or poems. Replace this text with your description.
----
-
-
\ No newline at end of file
diff --git a/tech.md b/tech.md
new file mode 100644
index 000000000..4eb1344ee
--- /dev/null
+++ b/tech.md
@@ -0,0 +1,15 @@
+---
+layout: page
+permalink: /tech/
+title: tech
+description: Building things with code
+---
+
+