Skip to content

Conversation

mwotton
Copy link

@mwotton mwotton commented May 22, 2015

I'm having a bit of trouble understanding how the least-squares regression is meant to be called, so I added a failing test with my understanding of the constraints.

@mwotton
Copy link
Author

mwotton commented May 22, 2015

I think I have the invariants right now, but I am still getting -Infinity for R-squared, which should range from 0 to 1.

@Shimuuar
Copy link
Collaborator

I didn't looked at code closely not I did try to run it. But R² = ∞ could happen if matrix becomes singular. Having more rows that columns is necessary but not sufficient condition. For example it's not possible to make regression with following points: [(0,1),(0,2),(0,3)].

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

Successfully merging this pull request may close these issues.

2 participants