title: Scikit SVM: create training dataset
body: <p>I'm using this site <a href="http://scikit-learn.org/stable/datasets/" rel="nofollow">http://scikit-learn.org/stable/datasets/</a> (subtitle 5.5) to create my custom dataset for performing SVM with scikit. Summary of my day: I basically have no idea what I'm doing. </p>
  
  <p>For my thesis I want to predict stock return direction, i.e. the output of SVM should be 1 (UP) or -1 (DOWN). At the moment I'm trying to figure out SVM with a random sample (because I do get how the tutorials work).</p>
  
  <p>As on the mentioned website it says that each line takes the form  <code>&lt;label&gt; &lt;feature-id&gt;:&lt;feature-value&gt; &lt;feature-id&gt;:&lt;feature-value&gt;</code>, I thought that the training set I provide should take the same formatting. Hence I created following training sample in Notepad++:</p>
  
  <pre><code>&lt;1&gt; &lt;1&gt;:&lt;0&gt;, &lt;1&gt;:&lt;19260800&gt;, &lt;1&gt;:&lt;77.83&gt;
  &lt;1&gt; &lt;2&gt;:&lt;-1&gt;, &lt;2&gt;:&lt;20110000&gt;, &lt;2&gt;:&lt;75.78&gt;
  &lt;-1&gt; &lt;3&gt;:&lt;1&gt;, &lt;3&gt;:&lt;53306400&gt;, &lt;3&gt;:&lt;76.24&gt;
  &lt;1&gt; &lt;4&gt;:&lt;0&gt;, &lt;4&gt;:&lt;61293500&gt;, &lt;4&gt;:&lt;78.00&gt;
  &lt;-1&gt; &lt;5&gt;:&lt;-1&gt;, &lt;5&gt;:&lt;42649500&gt;, &lt;5&gt;:&lt;75.91&gt;
  </code></pre>
  
  <p>For example, the second line:</p>
  
  <p>&lt;1> means that stock went up since the day before, &lt;2> is the  of the data of the second line, &lt;-1> is a negative Twitter sentiment for that day for the specific firm, &lt;20110000> is the stock volume for that day, &lt;75.78> is the adjusted closing price of that day.</p>
  
  <p>I hope you understand what I'm trying to say. And I hope even more somebody can help me out.</p>
  
  <p>Thanks in advance!</p>