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

solve linear system rather than explicitly computing inverse #286

Merged

Conversation

davegolland
Copy link
Contributor

It is reported that the AalenAdditiveFitter is extremely slow for large matricies. Digging in, it seems like the solution to the ridge regression was explicitly computing the inverse, which is often unnecessary in practice. This PR should reduce the runtime from O(n^3) to O(n^2) by not computing the inverse and instead solving the system of equations directly.

@CamDavidsonPilon
Copy link
Owner

🎉 I love this PR! Great optimization, @davegolland

Merging now.

@CamDavidsonPilon CamDavidsonPilon merged commit 37206c1 into CamDavidsonPilon:master Apr 24, 2017
@davegolland
Copy link
Contributor Author

Awesome, thanks for merging! What is the release cadence? I'm wondering when I can start relying on this patch.

@CamDavidsonPilon
Copy link
Owner

Mm, a new release won't come out for a few months I suspect. You could directly use master or your branch in your requirement.txt files: http://stackoverflow.com/questions/16584552/how-to-state-in-requirements-txt-a-direct-github-source

@davegolland davegolland deleted the solve-not-inverse branch April 24, 2017 16:07
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.

None yet

2 participants