New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix report (and possible solution) #14

Closed
rivolli opened this Issue Sep 3, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@rivolli

rivolli commented Sep 3, 2015

Hello, I use this package and for some sparce datasets I had an error on call the mldr function.
For example: Yahoo datasets http://sourceforge.net/projects/mulan/files/datasets/yahoo.rar

I debug this error and I report this and I propose a simple solution.
The function parse_sparse_data split the data using:
unlist(strsplit(item, " "))

However in some datasets there are a space after the comma, and the result of this code is little different as expected, then my suggest of solution is use a trim, like this:
unlist(strsplit(gsub("^\s+|\s+$", "", item), " "))

In my test this work well.
Thanks

@fdavidcl

This comment has been minimized.

Show comment
Hide comment
@fdavidcl

fdavidcl Sep 3, 2015

Collaborator

Thank you for bringing this to our attention. The solution you provided is indeed working fine.

If you need this functionality immediately, please use devtools::install_github("fcharte/mldr") to install this new version. We will try to get it up on CRAN as soon as possible.

Thanks again!

Collaborator

fdavidcl commented Sep 3, 2015

Thank you for bringing this to our attention. The solution you provided is indeed working fine.

If you need this functionality immediately, please use devtools::install_github("fcharte/mldr") to install this new version. We will try to get it up on CRAN as soon as possible.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment