<?xml version="1.0" encoding="UTF-8"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">cavorite.com - blog</title>
<subtitle type="html"><![CDATA[

]]></subtitle>
<id>http://cavorite.com/blog/index.atom</id>
<link rel="alternate" type="text/html" href="http://cavorite.com/blog" />
<link rel="self" type="application/atom+xml" href="http://cavorite.com/blog/index.atom" />


<author>
<name>Juan Manuel Caicedo</name>
<uri>http://cavorite.com/blog/index.atom</uri>
</author>
<rights>Copyright 2002012 Juan Manuel Caicedo</rights>
<generator uri="http://pyblosxom.sourceforge.net/" version="1.4.3 01/10/2008">
PyBlosxom http://pyblosxom.sourceforge.net/ 1.4.3 01/10/2008
</generator>

<updated>2012-01-29T17:48:00Z</updated>
<!-- icon?  logo?  -->

<entry>
<title type="html">In bulk
</title>
<category term="/2012/01" />
<id>http://cavorite.com/blog/2012/01/29/bulk</id>
<updated>2012-01-29T17:48:00Z</updated>
<published>2012-01-29T17:48:00Z</published>
<link rel="alternate" type="text/html" href="http://cavorite.com/blog/2012/01/bulk" />
<content type="html">&lt;p&gt;Here are four short notes in bulk that I were not short enough to be &lt;em&gt;tweets&lt;/em&gt;,
nor long enough to be posts on their own.&lt;/p&gt;
&lt;hr class=&quot;docutils&quot; /&gt;
&lt;p&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://fray.com/issue2/beatles.html&quot;&gt;Now They&apos;re Sixty-Four&lt;/a&gt; is a fun article about pilgrimages to Liverpool.
I feel uncomfortable about tribute bands; playing covers is OK, but copying
their appearance, haircuts and all that seems a bit excessive to me. And about
the Beatles, although I considered once doing a &lt;em&gt;pilgrimage&lt;/em&gt;, I don&apos;t think
that I&apos;ll put an effort on that idea anytime soon.&lt;/p&gt;
&lt;hr class=&quot;docutils&quot; /&gt;
&lt;p&gt;On a side note, &lt;a class=&quot;reference external&quot; href=&quot;http://fray.com&quot;&gt;Fray&lt;/a&gt; appears to be a good to read on a Sunday morning like
this. It needs to be read not on a feed reader, but on a its own website, using
something that is able to render the page with its nice layout, fonts and
illustrations.  By the way, I found about &lt;em&gt;Fray&lt;/em&gt; in Javier&apos;s &lt;a class=&quot;reference external&quot; href=&quot;http://www.finiterank.com/notas/2012/01/28/diseno/&quot;&gt;blog&lt;/a&gt;, which I
also recommend reading.  Again, not on a feed reader, but on its website, as it
should be.&lt;/p&gt;
&lt;hr class=&quot;docutils&quot; /&gt;
&lt;p&gt;I started to use &lt;a class=&quot;reference external&quot; href=&quot;https://github.com/harrah/xsbt&quot;&gt;sbt&lt;/a&gt;: a (relatively) simple build tool for Java and Scala.&lt;/p&gt;
&lt;p&gt;Having survived the pain of writing XML Ant build files (including for loops
and conditionals), skipped almost completely Maven (and its tendency to
download hundreds of jar files for compiling a couple of classes) and enjoyed
the joy of Python (where build files are essentially unnecessary), I think
&lt;em&gt;sbt&lt;/em&gt; has a sane balance between these two extremes. It is simple enough for
the most common cases, relatively easy to adapt for special cases and, at least
for me, a bit to complex to be completely understandable (e.g. the overloaded
operators of its syntax).&lt;/p&gt;
&lt;p&gt;Somehow, &lt;em&gt;sbt&lt;/em&gt; reflects what Scala is to Java: a language that is elegant, fun
to write, (sometimes) easy enough to read, but that gets too complex when you
try to do something more advanced.&lt;/p&gt;
&lt;hr class=&quot;docutils&quot; /&gt;
&lt;p&gt;Again, on a side note, I think (non-toy) software projects should own it domain
name. Or at least they should have a &lt;em&gt;home page&lt;/em&gt; that shows the main
information about it, preferably independent of the project hosting site
they&apos;re using.&lt;/p&gt;
&lt;p&gt;This applies to many more things, but in the case of software projects is
particularly important to &lt;em&gt;own&lt;/em&gt; its identity. Even just for practical reasons:
users get less confused, documentation and related files are in the same place
and other users and search engines know which links to follow. I know that
people writing software rarely have time to create home pages or to write &lt;a class=&quot;reference external&quot; href=&quot;http://www.jacobian.org/writing/great-documentation/&quot;&gt;good
documentation&lt;/a&gt;, but one should follow great examples (like &lt;a class=&quot;reference external&quot; href=&quot;https://docs.djangoproject.com/&quot;&gt;Django&lt;/a&gt; and
&lt;a class=&quot;reference external&quot; href=&quot;http://scikit-learn.org/stable/&quot;&gt;scikit-learn&lt;/a&gt;) and try to do the same.&lt;/p&gt;
</content>
</entry>

<entry>
<title type="html">Detección de género para nombres de personas (2)</title>
<category term="/2011/12" />
<id>http://cavorite.com/blog/2011/12/28/ngc-2</id>
<updated>2011-12-28T18:12:00Z</updated>
<published>2011-12-28T18:12:00Z</published>
<link rel="alternate" type="text/html" href="http://cavorite.com/blog/2011/12/ngc-2" />
<content type="html">&lt;p&gt;Aprovechando las vacaciones y que ahora tengo una mejor idea de clasificadores
automáticos, actualicé mi &lt;a class=&quot;reference external&quot; href=&quot;http://data-toolkit.cavorite.com/nlp/ngc/&quot;&gt;programa&lt;/a&gt; que indica si el nombre de una persona es de
género masculino o femenino. Cambié la forma de representar los datos, el
algoritmo de clasificación y la librería que utilizaba para implementarlo. El
nuevo clasificador comete menos errores y es más facil de modificar.&lt;/p&gt;
&lt;p&gt;Primero, la representación de los datos es muy sencilla: se basa en las últimas
letras de cada nombre. Concretamente, por cada nombre se extraen tres partes que
corresponden a la última, 4 últimas y cinco últimas letras. Por ejemplo, &lt;em&gt;Daniel&lt;/em&gt;
se representa como una secuencia de tres elementos: &amp;quot;l&amp;quot;, &amp;quot;niel&amp;quot; y &amp;quot;aniel&amp;quot;. Para
nombres compuestos (como &lt;em&gt;Manuel Darío&lt;/em&gt;) se hace lo mismo para cada nombre. Esta
fue la combinación con la cual el clasificador obtuvo mejores resultados durante
las pruebas.&lt;/p&gt;
&lt;p&gt;Segundo, reemplacé el clasificador bayesiano (&lt;em&gt;naïve bayes&lt;/em&gt;) por &lt;a class=&quot;reference external&quot; href=&quot;http://en.wikipedia.org/wiki/Logistic_regression&quot;&gt;regresión
logística&lt;/a&gt;, de nuevo, porque obtuve mejores resultados, y ahora utilizo la
implementación de &lt;a class=&quot;reference external&quot; href=&quot;http://scikit-learn.org/&quot;&gt;scikit-learn&lt;/a&gt;, mi librería favorita para mis proyectos de
&lt;em&gt;machine learning&lt;/em&gt;. En cuanto a los resultados, el nuevo clasificador pasó de
252 errores a 121 en los datos de prueba (alrededor de 14.000 nombres). En una
serie de &lt;a class=&quot;reference external&quot; href=&quot;http://cavorite.com/blog/2011/06/deteccion-genero-nombres#comment-225147871&quot;&gt;datos adicionales&lt;/a&gt;, el anterior clasificador cometía 255 errores,
mientras que la nueva versión comete 132.&lt;/p&gt;
&lt;p&gt;Creo que los resultados son bastante buenos, especialmente teniendo en cuenta
la simplicidad del modelo. Me gustaría comparar los resultados usando árboles de
decisión y AdaBoost, como me lo sugirieron en un comentario a la primera versión.
Sin embargo, primero tengo que hacer unas modificaciones para usar las
implementaciones de la librería. Espero trabajar en eso durante estos días,
aunque este proyecto no es más que un juguete poco útil, quiero utilizar más
y contribuir a &lt;em&gt;scikit-learn&lt;/em&gt;.&lt;/p&gt;
</content>
</entry>
</feed>

