title: Text labeling with machine learning
body: <p>I want to label a bunch of bank transactions according to a set of predefined classes (example below, its a map in <code>clojure</code>). I tried a naive bayes approach but sometimes it totally gives me the wrong label.</p>
  
  <p>According to my research, I should use a supervised ML algorithm, something like a linear SVM tuned for multiclass classification. Problem is I don't know anything about ML really. Second problem is that most clojure libs are outdated.</p>
  
  <pre><code>{:label "5339134-17-CPR-FARMODISSEIA LD", :value -13271 :class :health}
  {:label "PAG.SERV. 10297 779747511", :value -2889 :class :utilities}
  {:label "5339134-14-CPR-GREEN PEPER", :value -1785 :class :restaurants}
  {:label "5339134-03-LEV-Av Alm Kings", :value -4000 :class :atm}
  {:label "5339134-02-LEV-Big Field, 1", :value -7000 :class :atm}
  {:label "IMPOSTO DE SELO", :value -17 :class :banking}
  </code></pre>
  
  <p>So most of the similar transactions have like 90% similar text (see eg: <code>:atm</code>), I believe this should be an easy problem.</p>
  
  <p>My questions:</p>
  
  <ul>
  <li>what algorithms can I use?</li>
  <li>how should I prepare the data? I believe I only have two features, tx label and tx value. Some tutorials I see have a bunch of vectors, but I don't know if/how to convert the string data to the proper ML format.</li>
  </ul>
  
  <p>Any sample in either clj or java will be greatly appreciated.</p>