-
Notifications
You must be signed in to change notification settings - Fork 90
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
[BUG]: Symbolic regression fails with a dimension mismatch #389
Comments
Are you able to reproduce it in pure SymbolicRegression.jl? I'm not familiar with the DataDrivenDiffEq.jl syntax unfortunately. Can you also show the full traceback? |
Oh, I think the issue is:
The current version of SymbolicRegression.jl is 1.5.0. The last 0. version was 0.24.5. So 0.14.5 is quite old. Can you figure out why it's not updating? |
I'm not sure why it didn't update. I ran from a fresh environment to get 1.5.0, but I still get the same error. The code spends some time running, so it may be post-processing the output from SymbolicRegression that's giving it problems, which would be a DataDrivenDiffEq issue: ERROR: BoundsError: attempt to access 0-element Vector{Any} at index [1]
Stacktrace:
[1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
@ Base ./essentials.jl:14
[2] getindex
@ ./essentials.jl:916 [inlined]
[3] (::DataDrivenSR.var"#15#23"{Vector{Float64}, Vector{Any}})(i::Int64)
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:170
[4] iterate
@ ./generator.jl:48 [inlined]
[5] _collect(c::Base.OneTo{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
@ Base ./array.jl:800
[6] collect_similar(cont::Base.OneTo{Int64}, itr::Base.Generator{Base.OneTo{…}, DataDrivenSR.var"#15#23"{…}})
@ Base ./array.jl:709
[7] map(f::Function, A::Base.OneTo{Int64})
@ Base ./abstractarray.jl:3371
[8] convert_to_basis(paretofrontier::Vector{…}, prob::DataDrivenDiffEq.InternalDataDrivenProblem{…})
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:169
[9] DataDrivenSR.SRResult(prob::DataDrivenDiffEq.InternalDataDrivenProblem{…}, hof::Vector{…}, paretos::Vector{…})
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:71
[10] (::EQSearch)(ps::DataDrivenDiffEq.InternalDataDrivenProblem{…}, X::Matrix{…}, Y::Matrix{…})
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:203
[11] (::DataDrivenSR.var"#26#27"{DataDrivenDiffEq.InternalDataDrivenProblem{…}, EQSearch})(::Tuple{Matrix{…}, Matrix{…}})
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:214
[12] iterate
@ ./generator.jl:48 [inlined]
[13] collect(itr::Base.Generator{DataLoader{…}, DataDrivenSR.var"#26#27"{…}})
@ Base ./array.jl:780
[14] map
@ ./abstractarray.jl:3399 [inlined]
[15] solve!(ps::DataDrivenDiffEq.InternalDataDrivenProblem{…})
@ DataDrivenSR ~/.julia/packages/DataDrivenSR/w4puU/src/DataDrivenSR.jl:213
[16] solve(::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous}, ::Vararg{Any}; kwargs::@Kwargs{})
@ CommonSolve ~/.julia/packages/CommonSolve/JfpfI/src/CommonSolve.jl:23
[17] top-level scope |
Yeah it looks like the entire traceback is inside that package rather than SymbolicRegression.jl. Not sure there's anything I can do from my end. Maybe try to bisect the specific SymbolicRegression.jl version where it starts failing like this? https://github.com/MilesCranmer/SymbolicRegression.jl/releases. I'm assuming there is a version where this at one point worked? |
I'm assuming that there was a working version...however, v0.14.5 is the one that gets installed due to compatibility with DataDrivenSR, so I have to fiddle a bit more to try out lower version numbers. Closing for now - it looks like DataDrivenSR needs some love. |
What happened?
Describe the bug 🐞
Symbolic regression fails on a problem where Sindy and DMD work, when linking DataDrivenDiffEq with SymbolicRegression. I've also filed the issue on DataDrivenDiffEq (SciML/DataDrivenDiffEq.jl#523), but @ChrisRackauckas seems to think it's a SymbolicRegression issue.
Expected behavior
A data-driven solution should be found.
Minimal Reproducible Example 👇
Version
[8254be44] SymbolicRegression v0.14.5
Operating System
macOS
Interface
Julia REPL
Relevant log output
Extra Info
No response
The text was updated successfully, but these errors were encountered: