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 bug in solution.jl #521

Closed
wants to merge 1 commit into from

Conversation

girochat
Copy link

Proposed solution for bug in solution.jl (Fixes #514). The solution handles the case where the basis of the problem is empty which would throw the DimensionMismatch error.

Proposed solution for bug in solution.jl (Fixes SciML#514). The solution handles the case where the basis of the problem is empty which would throw the DimensionMismatch error.
if size(b(prob)) == size(get_implicit_data(prob))
rss = sum(abs2, get_implicit_data(prob) .- b(prob))
else
rss = sum(abs2, get_implicit_data(prob))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this the residual?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into the DimensionMismatch error while using DataDrivenSparse.jl. It seemed to occur when the basis is empty. I assumed that this would be analog to computing the residual to a vector of zeros. When there is no model to approximate the data, the residual can be seen as the data itself.

@girochat girochat closed this Nov 23, 2024
@girochat girochat deleted the girochat-bugfix-514 branch November 23, 2024 14:52
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.

DimensionMismatch error - Symbolic Regression failing for sparse hyperparameters
2 participants