diff --git a/pysindy/optimizers/stlsq.py b/pysindy/optimizers/stlsq.py index 6c268b240..8002bf408 100644 --- a/pysindy/optimizers/stlsq.py +++ b/pysindy/optimizers/stlsq.py @@ -14,7 +14,15 @@ class STLSQ(BaseOptimizer): Attempts to minimize the objective function :math:`\\|y - Xw\\|^2_2 + \\alpha \\|w\\|^2_2` by iteratively performing least squares and masking out - elements of the weight that are below a given threshold. + elements of the weight array w that are below a given threshold. + + See the following reference for more details: + + Brunton, Steven L., Joshua L. Proctor, and J. Nathan Kutz. + "Discovering governing equations from data by sparse + identification of nonlinear dynamical systems." + Proceedings of the national academy of sciences + 113.15 (2016): 3932-3937. Parameters ---------- diff --git a/pysindy/pysindy.py b/pysindy/pysindy.py index d2d31666b..752acedbe 100644 --- a/pysindy/pysindy.py +++ b/pysindy/pysindy.py @@ -387,6 +387,7 @@ def print(self, lhs=None, precision=3): ---------- lhs: list of strings, optional (default None) List of variables to print on the left-hand sides of the learned equations. + By defualt :code:`self.input_features` are used. precision: int, optional (default 3) Precision to be used when printing out model coefficients. @@ -411,7 +412,7 @@ def score( **metric_kws ): """ - Returns a score for the time derivative prediction. + Returns a score for the time derivative prediction produced by the model. Parameters ---------- @@ -442,9 +443,12 @@ def score( If True, x contains multiple trajectories and must be a list of data from each trajectory. If False, x is a single trajectory. - metric: metric function, optional + metric: callable, optional Metric function with which to score the prediction. Default is the - coefficient of determination R^2. + R^2 coefficient of determination. + See `Scikit-learn \ + `_ + for more options. metric_kws: dict, optional Optional keyword arguments to pass to the metric function.