Hi all, I've just (happily!) discovered mlpack so please excuse any newbie 
questions. I had a quick look in the docs but couldn't find what i am looking 
for. NB I'm a C programmer trying to get by with C++ but really starting off 
with the CLI to see how things work and to do initial data exploration, with 
the C++ coding to follow.

Specifically, I am looking at the linear regression and have CLI working fine 
for my input matrix (X,Y), where X has ~20 cols and there are ~4000 rows) and 
can obtain a model and also predict new Y' for new X'. This data enables me to 
use gnuplot to draw a graph such as below. However, what I am looking for is an 
"r squared" value to quantify how good the fit is. I have seen there is a 
member function "computeError" but how would I access this from the command 
line?



NB I'm not sure why I get a warning with this invocation - it seems to follow 
the documentation and it does actually produce "newPredicts.csv" with the Y' 
values:
mkb@hec003-ssd ~/EEC/mlpack-examples$ mlpack_linear_regression -v 
--training_file newTrain.csv --test_file newTest.csv  -o newPredicts.csv

[WARN ] '--output_predictions_file (-o)' ignored because '--test_file (-T)' is 
specified!

[INFO ] Loading 'newTrain.csv' as CSV data.  Size is 48 x 3322.

[INFO ] Loading 'newTest.csv' as CSV data.  Size is 47 x 833.

[INFO ] Saving CSV data to 'newPredicts.csv'.



gnuplot
f(x)=x
plot "<paste newActual.csv newPredicts.csv", f(x) w l



[cid:[email protected]]

"Before acting on this email or opening any attachments you should read the 
Manchester Metropolitan University email disclaimer available on its website 
http://www.mmu.ac.uk/emaildisclaimer "
_______________________________________________
mlpack mailing list
[email protected]
http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack

Reply via email to