SciML / SciML/DataDrivenDiffEq.jl

SINDy basis does not print after construction

Open
#353 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
430
Forks
58
Avg merge
6h 29m
Merged PRs (30d)
28

Description

Trying to construct a basis for nonlinear time continuous system and getting a method error. Most easily reproduced by following the basis creation in the example:

using DataDrivenDiffEq
using ModelingToolkit

@parameters t
@variables u[1:2](t)
Ψ = Basis([u; u[1]^2], u, independent_variable = t)

gives me:

Model ##Basis#291 with 3 Error showing value of type Basis:
ERROR: MethodError: no method matching Basis(::Vector{Equation}, ::Vector{Term{Real, Base.ImmutableDict{DataType, Any}}}, ::Vector{Any}, ::Vector{Any}, ::Vector{Any}, ::Num, ::Vector{Any}, ::DataDrivenDiffEq.var"#f#2", ::Symbol, ::Vector{Union{}}; checks=false)
Closest candidates are:
  Basis(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/DataDrivenDiffEq/XTH8l/src/basis/type.jl:54 got unsupported keyword argument "checks"
  Basis(::Vector{Equation}, ::Vector, ::Vector, ::Vector, ::Vector, ::Num, ::Vector, ::Function, ::Symbol, ::Vector{Basis}) at ~/.julia/packages/DataDrivenDiffEq/XTH8l/src/basis/type.jl:54 got unsupported keyword argument "checks"
  Basis(::AbstractVector{Equation}, ::AbstractVector; parameters, iv, controls, implicits, observed, name, simplify, linear_independent, eval_expression, kwargs...) at ~/.julia/packages/DataDrivenDiffEq/XTH8l/src/basis/type.jl:11

I've never had this issue before but its been a while since I've tried. Julia 1.7.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the Basis construction from the linked nonlinear continuous system example under Julia 1.7.2 and inspect the Basis constructor and its method dispatch. The issue is done when the basis can be constructed and displayed without the unsupported checks keyword MethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.