title: Multiclass classification of text in R
body: <p>I have build a random forest for multiclass text classification. The model returned an accuracy of 75 %. There are 6 labels, however out of the 6 classes, only 3 are classified and rest are not classified. I would really appreciate if anyone could let me know what went wrong.</p>
  
  <p>Below are the steps i followed.</p>
  
  <p>DATA PREPARATION</p>
  
  <ul>
  <li><p>Creat a word vector for description.</p></li>
  <li><p>Build a corpus using the word    vector.</p></li>
  <li><p>Pre-processing tasks such as removing number, whitespaces,<br>
  stopwords and conversion to lower case.  </p></li>
  <li>Build a document term matrix    (dtm).</li>
  <li><p>Remove sparse words from the above dtm.</p></li>
  <li><p>The above step leads    to a count frequency matrix showing the
  frequency of each word in its    coressponding column.</p></li>
  <li><p>Tranform count frequency matrix to a binary       instance matrix,
  which shows occurences of a word in a document as       either 0 or
  1, 1 for being present and 0 for absent.</p></li>
  <li>Append the    label    column from the original  dataset with
  the transformed   dtm. The    label column has 6 labels.</li>
  </ul>
  
  <p>MODEL BUILDING</p>
  
  <ul>
  <li>Randomly sample the dtm and split it into a traning set and testing
  set. </li>
  <li>Build a base model of random forest with 7-fold cross    validation.</li>
  <li><p>Check for accuracy of the model on the training set and    testing
  set.</p>
  
  <p>I am sharing the link to the results ( if it is allowed here).</p>
  
  <p><a href="http://rpubs.com/shanmukha_karthik/346007" rel="nofollow noreferrer">http://rpubs.com/shanmukha_karthik/346007</a></p></li>
  </ul>