From b46a1ab1b2b83685931d7673db87d8f339186901 Mon Sep 17 00:00:00 2001 From: DJ Passey Date: Wed, 15 Jan 2025 18:31:36 -0500 Subject: [PATCH] Changed sindy to accept types for better optuna optimizing --- interfere/_methods/sindy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/interfere/_methods/sindy.py b/interfere/_methods/sindy.py index 46fd8b5..891a61c 100644 --- a/interfere/_methods/sindy.py +++ b/interfere/_methods/sindy.py @@ -1,5 +1,5 @@ from copy import copy -from typing import Dict, List, Optional +from typing import Optional from warnings import warn import numpy as np @@ -41,7 +41,10 @@ def __init__(self, max_sim_value = 10000, **kwargs ): - + # Optionally accept types for feature library. + if isinstance(feature_library, type): + feature_library = feature_library() + # Differentiation method and feature library must be copied so that # their internal state doesn't carry over across different fits. if differentiation_method is not None: