You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JacobianEstimator estimates the Jacobian and forcing inputs from a time series for a system of linear differential equations. That is, given the vector ${\bf x}(t)$, it estimates the matrix ${\bf A}$ and the forcing input vector ${\bf u}$ that is the best fit for
6
+
$$
7
+
\dot{\bf x}(t) = {\bf A} {\bf x}(t) + {\bf u}
8
+
$$
9
+
10
+
``JacobianEstimator`` should be structured in a manner similar to ``SystemDiscovery``.
11
+
12
+
## Implementation
13
+
14
+
### Constructor
15
+
16
+
def __init__(self, timecourse_df: pd.DataFrame)
17
+
``timecourse_df`` has as its index time and the column names are state variables. The constructor creates the following instance state variables:
18
+
19
+
*``self.timecourse_df`` is the argument passed
20
+
*``self.dtimecourse_df`` is the derivative of the state variable for times starting at index 0. It is calculated as ``(self.timecourse_df.values[i+1, :] - self.timecourse_df.values[i,:])/(self.timecourse_df.index[i+1] - self.timecourse_df.index[i])``. Thus, if there are $N$ values in ``self.timecourse_df``, there will be $N-1$ in the derivative.
21
+
22
+
#### Validation
23
+
24
+
The constructor raises ``TypeError`` if ``timecourse_df`` is not a ``pd.DataFrame``. It raises ``ValueError`` if ``timecourse_df`` is empty, has no columns (no state variables), has an index (time) that is not strictly monotonically increasing, or contains any ``NaN`` or infinite values.
25
+
26
+
### fit
27
+
28
+
def fit(alpha: float)
29
+
30
+
Fit estimates ${\bf A}$ and ${\bf u}$ using lasso and its tuning parameter $alpha$.
31
+
32
+
#### Guard
33
+
34
+
``predict`` raises ``RuntimeError`` if called before ``fit`` has been called.
0 commit comments