[mlpack-svn] [MLPACK] #278: Naive Bayes Classifier executable faild with a separately labels file

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Fri May 3 17:02:22 EDT 2013


#278: Naive Bayes Classifier executable faild with a separately labels file
---------------------+------------------------------------------------------
 Reporter:  marcus   |        Owner:     
     Type:  defect   |       Status:  new
 Priority:  trivial  |    Milestone:     
Component:  mlpack   |     Keywords:     
 Blocking:           |   Blocked By:     
---------------------+------------------------------------------------------
 Simple Naive Bayes Classifier executable faild with a separately labels
 file. The function data::Load transposed the matrix already at load time.
 This produces the error: Mat::insert_rows(): given object has an
 incompatible number of columns.

 {{{
 if (labels.n_rows == 1)
       trainingData.insert_rows(trainingData.n_rows, trans(labels)); // is
 already transposed
  else if (labels.n_cols == 1)
       trainingData.insert_rows(trainingData.n_rows, labels); // here we
 have to transpose the matrix
 }}}

 Command: nbc -t data.csv -l labels.csv -T data.csv

 Simple data-set and patch is added.

-- 
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/278>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.


More information about the mlpack-svn mailing list