Skip to content

Commit

Permalink
Add references to docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
briandesilva committed Sep 26, 2020
1 parent 486564d commit 6ece429
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 9 additions & 1 deletion pysindy/optimizers/stlsq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down
10 changes: 7 additions & 3 deletions pysindy/pysindy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
----------
Expand Down Expand Up @@ -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 \
<https://scikit-learn.org/stable/modules/model_evaluation.html>`_
for more options.
metric_kws: dict, optional
Optional keyword arguments to pass to the metric function.
Expand Down

0 comments on commit 6ece429

Please sign in to comment.