verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
< radens> mlpack::data::Split takes a matrix, a test ratio, and a tuple. http://mlpack.org/docs/mlpack-git/doxygen/namespacemlpack_1_1data.html#a80fb8838c66ff6351af3bbb33ee6ebe1
< radens> 1. If my test ratio is 0.7, which is the bigger element of the 2 tuple, the first element or the second?
< radens> 2. The split happens row-wise, and not column-wise, right?
< radens> I hope
wiking has quit [Read error: Connection reset by peer]
wiking has joined #mlpack
Stellar_Mind has joined #mlpack
Stellar_Mind has quit [Ping timeout: 246 seconds]
Stellar_Mind has joined #mlpack
Stellar_Mind has quit [Quit: Nettalk6 - www.ntalk.de]
mentekid has joined #mlpack
govg has joined #mlpack
govg has quit [Ping timeout: 250 seconds]
govg has joined #mlpack
someguy has joined #mlpack
someguy has quit [Client Quit]
< radens> rcurtin: Hey, I have a question about a type error with mlpack
< radens> Here is the error:
< radens> Here is the line of code throwing a fit: auto dstump = mlpack::decision_stump::DecisionStump<arma::Mat<int>>(data, labels, 2);
< radens> (data is an arda::Mat<int> and labels is an arma::Mat<size_t>)
< rcurtin> radens: it looks like DecisionStump isn't properly written so that it can handle any matrix type
< rcurtin> the problem appears to be in SetupSplitDimension... hang on
< rcurtin> also, to clarify something you mentioned last night, if the test ratio is 0.7, then 70% of the data will be in the test set
< radens> Thanks
< rcurtin> and also the split will happen column-wise---each point in mlpack is a column, not a row; see http://mlpack.org/docs/mlpack-2.1.0/doxygen.php?doc=matrices.html for some more info
< rcurtin> basically, if you load a CSV with data::Load() or something like this, it's automatically transposed, so your rows in the CSV become columns in the arma::mat
< radens> Yeah, at first I thought that was going to be a problem, but then I realize that data::Load rotates the input of CSVs by default
< rcurtin> so the short solution to your current problem is to use arma::mat not arma::Mat<int>; the slightly longer solution is to wait a minute for me to get a patch together :)
< radens> Thanks!
< rcurtin> this should be a relatively simple fix, basically there is just code that assumes arma::mat when it should instead be using a template type
< rcurtin> radens: fixed in 9774978, pull from master and that should compile
rcurtin has joined #mlpack
rcurtin has joined #mlpack
< rcurtin> that was weird, irssi decided it was done accepting input
travis-ci has joined #mlpack
< travis-ci> mlpack/mlpack#1630 (master - 9774978 : Ryan Curtin): The build passed.
travis-ci has left #mlpack []
govg has quit [Ping timeout: 260 seconds]
govg has joined #mlpack
< radens> rcurtin: how can I deserialize an adaboost model?
< radens> Doing this doesn't seem to work: archive >> adaboost;
< rcurtin> radens: ah, here is a bit of trickiness... :)
< rcurtin> first the quick answer:
< radens> Are there examples somewhere? In the tests it does it with a name value pair.
< rcurtin> you can use data::Load() and data::Save() to serialize models, i.e.
< rcurtin> actually, we can do something simpler than that
< rcurtin> archive >> mlpack::data::CreateNVP(adaboost, "adaboost_model");
< rcurtin> in typical boost::serialization code, you would use BOOST_SERIALIZATION_NVP() not data::CreateNVP()
< rcurtin> but because mlpack style guidelines are that member functions start with capital letters, mlpack implements Serialize() functions not serialize() functions
< rcurtin> and then CreateNVP() is a complex template metaprogramming shim that makes it all work :)
< rcurtin> either way, you could also use data::Load() and data::Save(), which autodetect the type based on the extension, so something like
< radens> Let me try with data::{Load,Save} then
< rcurtin> data::Load("filename.xml", "adaboost_model", adaboost)
< rcurtin> data::Save({ the same parameters })
< rcurtin> those should work too
< radens> brilliant, thanks
rcurtin has joined #mlpack