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

Fails to identify y=x^2 #11

Open
jmmcd opened this issue Dec 2, 2013 · 3 comments
Open

Fails to identify y=x^2 #11

jmmcd opened this issue Dec 2, 2013 · 3 comments

Comments

@jmmcd
Copy link
Collaborator

jmmcd commented Dec 2, 2013

Added a test [5510110] with data y=x^2 for x=[0, 1, 2, 3]. FFX does pretty well, but I expected the exact relationship. In the 4-base model, there are two x^2 terms -- could this be related to the handling of second-order bases mentioned in #5 ?

Num bases,Test error (%),Model
0, 62.4453, 3.50
1, 11.4284, 0.640 + 0.817_x^2
2, 1.6635, 0.0846 + 0.972_x^2 + 0.00984_x
4, 0.7507, (0.0973 + 0.523_x^2 + 0.440_x^2) / (1.0 - 0.00214_x - 0.00168*x)

@jmmcd
Copy link
Collaborator Author

jmmcd commented Mar 30, 2014

Maybe this is not the fault of FFX. The elastic net just doesn't seem to do well modelling this type of data (no noise, simple input-output relationship). Here is a test:

http://stackoverflow.com/questions/22738879/should-elastic-net-regression-be-able-to-regress-y-x-perfectly

@jmmcd
Copy link
Collaborator Author

jmmcd commented Mar 30, 2014

The two x^2 terms seem to be coming from passing the base x into a model, which allocates it to both numerator and denominator. When it comes back, x is collected twice. It goes:

FFXModelFactory.build -> _basesToModels -> _pathwiseLearn ->  _allocateToNumerDenom

@jmmcd
Copy link
Collaborator Author

jmmcd commented Feb 18, 2018

The failure to find the exact model is expected, but the multiple occurrences of x^2 seems to be a flaw, so I'll leave this issue open but rename it.

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

No branches or pull requests

1 participant