Skip to content

How to use CustomLibrary to achieve that each variable has an associated library? #592

Open
@BK201-kkk

Description

@BK201-kkk

I try to create a separate library for each variable through CustomLibrary. This means that my input data consists of n different variables, with shape (time_steps, num_variables). For each ode xi_dot that I want to regress, there is a separate library. My idea is to build library_functions = [
[x0_library], # x0 function library
[x1_library], # x1 function library
[x2_library], # x2 function library
[x3_library], # x3 function library
[x4_library], # x4 function library
[x5_library], # x5 function library
[x6_library], # x6 function library
[x7_library], # x7 function library
]
lib = ps.CustomLibrary(library_functions=library_functions)
AttributeError: 'list' object has no attribute 'code'
But this doesn't seem to work, please let me know if I'm missing something, thank you very much for your answer!

My idea is based on the description on the pysindy website:
library_functions (list of mathematical functions) – Functions to include in the library. Default is to use same functions for all variables. Can also be used so that each variable has an associated library, in this case library_functions is shape (n_input_features, num_library_functions)
, but it doesn't seem to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    docNeeds an edit to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions