Skip to content
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

Lots of printlines from Math.java when running Lasso #10

Closed
Xyclade opened this issue Feb 19, 2015 · 9 comments
Closed

Lots of printlines from Math.java when running Lasso #10

Xyclade opened this issue Feb 19, 2015 · 9 comments
Labels

Comments

@Xyclade
Copy link
Contributor

Xyclade commented Feb 19, 2015

In the Math.java on lines 4596 to 4601 there are 2 prints. When running a Lasso regression this causes a lot of output on the console, making it hard to read console output from my own code. Could these be turned off or, made optional if they are really important? 😄

@haifengl
Copy link
Owner

Sure, you can remove them. At least the first one. But I am little worried about this case. This function ( iterative biconjugate gradient method) usually should converge pretty fast and thus not much print out. Please check if your LASSO model works well for test data. Thanks!

@Xyclade
Copy link
Contributor Author

Xyclade commented Feb 19, 2015

The Lasso model is not working well for the test data, but that is the actual goal this time. I'm writing an example of how it can go wrong, thank you for the heads up though! 👍

@haifengl
Copy link
Owner

Interesting. It doesn't work well because LASSO is not a good fit for the problem? Or the parameter settings (e.g. regularization factor)?

@Xyclade
Copy link
Contributor Author

Xyclade commented Feb 19, 2015

It's because there is too few datapoints and no actual statistical relation within the data.

As John Tukey once said:

The data may not contain the answer. The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.

This is the case in my example, to make people aware that Machine Learning cannot perform miracles on every single dataset.

@haifengl
Copy link
Owner

Is your data size less than the dimensionality?

@Xyclade
Copy link
Contributor Author

Xyclade commented Feb 19, 2015

yes, its 100 datapoints (with rank 1 to 100) with 27000 + features, this can never go well :) But since it's an example for my blog rather than an actual dataset that I want to use for predictions, I still worked it out to show what goes wrong when you do these kind of things.

In the end result the trained LASSO model should predict a rank value for a new datapoint, but it predicts worse than just predicting the average (50). This makes it a perfect example for what can go wrong if you have no clue what you are doing 👍

@haifengl
Copy link
Owner

That is the true reason. It is known as small sample size problem. I have a paper (http://lectures.molgen.mpg.de/networkanalysis13/LDA_cancer_classif.pdf) to deal with it.

@Xyclade
Copy link
Contributor Author

Xyclade commented Feb 19, 2015

Cool tnx! I'll read that and see if I can incorporate it if that's ok with you?

@haifengl
Copy link
Owner

Try FLD in SMILE for your case. I don't remember if I implemented this algorithm there. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants