-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Introduced better LV parameters
- Loading branch information
Showing
2 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from functools import partial | ||
from typing import Callable | ||
|
||
import matplotlib.pyplot as plt | ||
|
@@ -14,9 +15,9 @@ | |
from .utils import ( | ||
FullSINDyTrialData, | ||
SINDyTrialData, | ||
_make_model, | ||
coeff_metrics, | ||
integration_metrics, | ||
make_model, | ||
simulate_test_data, | ||
unionize_coeff_matrices, | ||
) | ||
|
@@ -59,7 +60,7 @@ def forcing(t, x): | |
|
||
|
||
p_duff = [0.2, 0.05, 1] | ||
p_lotka = [1, 10] | ||
p_lotka = [5, 1] | ||
p_ross = [0.2, 0.2, 5.7] | ||
p_hopf = [-0.05, 1, 1] | ||
|
||
|
@@ -73,7 +74,7 @@ def forcing(t, x): | |
], | ||
}, | ||
"lv": { | ||
"rhsfunc": ps.utils.odes.lotka, | ||
"rhsfunc": partial(ps.utils.odes.lotka, p=p_lotka), | ||
"input_features": ["x", "y"], | ||
"coeff_true": [ | ||
{"x": p_lotka[0], "x y": -p_lotka[1]}, | ||
|
@@ -181,7 +182,7 @@ def run( | |
nonnegative=nonnegative, | ||
**sim_params, | ||
) | ||
model = _make_model(input_features, dt, diff_params, feat_params, opt_params) | ||
model = make_model(input_features, dt, diff_params, feat_params, opt_params) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Jacob-Stevens-Haas
Owner
|
||
|
||
model.fit(x_train) | ||
coeff_true, coefficients, feature_names = unionize_coeff_matrices(model, coeff_true) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey @Jacob-Stevens-Haas , I noticed experiments not running because of naming error for
make_model
function since it was_make_model
. This commit also makes that small change in odes and pdes.