[mlpack-git] [mlpack] segmentation fault with LogisticRegression API (#428)

Ryan Curtin notifications at github.com
Tue Mar 31 11:38:55 EDT 2015


Yes, I'm sorry, I actually overlooked this to begin with, even though you gave me the output that makes it perfectly clear.  You said that your input matrices were 3069x1, but they should be 1x3069.  The reason for this is that mlpack matrices are column-major: each point should be a column.  See this tutorial: http://www.mlpack.org/doxygen.php?doc=matrices.html

Adding a check for this is somewhat difficult; suppose that the user actually has a 3069-dimensional point that they want to do logistic regression on (this is an edge case, of course, but you can see that there are other cases where I can't easily tell if the user has passed in transposed data).  

But, looking at `logistic_regression_function.cpp`, there are no checks on the size of the matrix in the constructor, which strikes me as odd.  And the fact that the program is segfaulting when passed one point is also odd.  So, there are still two things to be done here (so I'll leave the ticket open):

 * add checks to the matrix sizes in the constructors in `logistic_regression_function.cpp`; call `Log::Fatal` if the dimensions don't match
 * figure out why a segfault is occurring when 1-column predictors and responses are given

I'll fix these when I have time, or, if someone gets around to it before me, that works too.

Anyway, it looks like you've figured out what you need.  Thanks for bringing these issues to our attention. :)

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/428#issuecomment-88137086
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150331/7f63a63b/attachment.html>


More information about the mlpack-git mailing list