[mlpack-svn] [MLPACK] #298: Enhancement of linear regression library

MLPACK Trac trac at coffeetalk-1.cc.gatech.edu
Sun Aug 11 12:57:08 EDT 2013


#298: Enhancement of linear regression library
--------------------------------+-------------------------------------------
  Reporter:  sumedhghaisas      |        Owner:  rcurtin     
      Type:  enhancement        |       Status:  accepted    
  Priority:  major              |    Milestone:  mlpack 1.0.7
 Component:  mlpack             |   Resolution:              
  Keywords:  linear_regression  |     Blocking:              
Blocked By:                     |  
--------------------------------+-------------------------------------------
Changes (by rcurtin):

  * owner:  => rcurtin
  * status:  new => accepted


Comment:

 > But except that everything is fine. I have checked my answers against
 octave modules and they both giving the same results.
 > Just check test.cpp and pass csv file in that.

 So, the idea behind the test is that you've tested it by hand, and I trust
 you that it's right, but two years from now, someone might change a line
 in there and everything might break -- and they're not going to take the
 time to run the tests again.  So writing a test just makes the testing you
 were doing automatic.  That way, if someone makes a change, all they have
 to do is 'make mlpack_test' and then run the test to know that everything
 is still working right.  If you send me the Octave numbers you were
 comparing against, I can show you an example of what I mean.  There is
 already a linear regression test for standard linear regression you can
 run; if you 'make mlpack_test' you can then run 'mlpack_test -t
 LinearRegressionTest' and see if it still passes the test.

 Thanks for changing the implementation to work with column-major matrices.
 data::Load() automatically transposes data (usually, data is stored in
 row-major format, but we need it in column-major format), so your code was
 calling data::Load(), which transposes, and then transposing again.
 arma::solve() should work in place to arma::inv(), to my knowledge.  If it
 still passes your tests then there is no problem.  :)

 I'll take a look into the return type for the predictions and let you know
 what that ought to be.

-- 
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/298#comment:4>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed at Georgia Tech.


More information about the mlpack-svn mailing list