Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
24f5dee
1
Parent(s):
4163a66
Fix union of types in docstrings
Browse files- pysr/sr.py +39 -31
pysr/sr.py
CHANGED
@@ -334,7 +334,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
334 |
(requires `annealing` to be `True`).
|
335 |
annealing : bool, default=False
|
336 |
Whether to use annealing.
|
337 |
-
early_stop_condition :
|
338 |
Stop the search early if this loss is reached. You may also
|
339 |
pass a string containing a Julia function which
|
340 |
takes a loss and complexity as input, for example:
|
@@ -496,7 +496,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
496 |
|
497 |
Attributes
|
498 |
----------
|
499 |
-
equations_ :
|
500 |
Processed DataFrame containing the results of model fitting.
|
501 |
n_features_in_ : int
|
502 |
Number of features seen during :term:`fit`.
|
@@ -1163,14 +1163,16 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1163 |
|
1164 |
Parameters
|
1165 |
----------
|
1166 |
-
X :
|
1167 |
-
Training data
|
1168 |
-
y :
|
1169 |
-
Target values
|
1170 |
-
|
|
|
1171 |
(n_resampled, n_features), default=None
|
1172 |
Resampled training data used for denoising.
|
1173 |
-
weights :
|
|
|
1174 |
Each element is how to weight the mean-square-error loss
|
1175 |
for that particular element of y.
|
1176 |
variable_names : list[str] of length n_features
|
@@ -1242,15 +1244,17 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1242 |
|
1243 |
Parameters
|
1244 |
----------
|
1245 |
-
X :
|
1246 |
-
Training data.
|
1247 |
-
y :
|
1248 |
-
Target values
|
1249 |
-
|
1250 |
-
|
1251 |
-
Resampled training data
|
1252 |
-
|
|
|
1253 |
Names of each variable in the training dataset, `X`.
|
|
|
1254 |
random_state : int, Numpy RandomState instance or None, default=None
|
1255 |
Pass an int for reproducible results across multiple function calls.
|
1256 |
See :term:`Glossary <random_state>`.
|
@@ -1317,13 +1321,15 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1317 |
|
1318 |
Parameters
|
1319 |
----------
|
1320 |
-
X :
|
1321 |
-
Training data
|
1322 |
-
y :
|
1323 |
-
Target values
|
|
|
1324 |
mutated_params : dict[str, Any]
|
1325 |
Dictionary of mutated versions of some parameters passed in __init__.
|
1326 |
-
weights :
|
|
|
1327 |
Each element is how to weight the mean-square-error loss
|
1328 |
for that particular element of y.
|
1329 |
seed : int
|
@@ -1564,15 +1570,17 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1564 |
|
1565 |
Parameters
|
1566 |
----------
|
1567 |
-
X :
|
1568 |
-
Training data.
|
1569 |
-
y :
|
1570 |
-
Target values
|
1571 |
-
|
1572 |
-
|
1573 |
-
Resampled training data
|
|
|
1574 |
will be used as the training data, rather than `X`.
|
1575 |
-
weights :
|
|
|
1576 |
Each element is how to weight the mean-square-error loss
|
1577 |
for that particular element of `y`. Alternatively,
|
1578 |
if a custom `loss` was set, it will can be used
|
@@ -1702,8 +1710,8 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1702 |
|
1703 |
Parameters
|
1704 |
----------
|
1705 |
-
X :
|
1706 |
-
Training data
|
1707 |
|
1708 |
index : int | list[int], default=None
|
1709 |
If you want to compute the output of an expression using a
|
|
|
334 |
(requires `annealing` to be `True`).
|
335 |
annealing : bool, default=False
|
336 |
Whether to use annealing.
|
337 |
+
early_stop_condition : float | str, default=None
|
338 |
Stop the search early if this loss is reached. You may also
|
339 |
pass a string containing a Julia function which
|
340 |
takes a loss and complexity as input, for example:
|
|
|
496 |
|
497 |
Attributes
|
498 |
----------
|
499 |
+
equations_ : pandas.DataFrame | list[pandas.DataFrame]
|
500 |
Processed DataFrame containing the results of model fitting.
|
501 |
n_features_in_ : int
|
502 |
Number of features seen during :term:`fit`.
|
|
|
1163 |
|
1164 |
Parameters
|
1165 |
----------
|
1166 |
+
X : ndarray | pandas.DataFrame
|
1167 |
+
Training data of shape `(n_samples, n_features)`.
|
1168 |
+
y : ndarray | pandas.DataFrame}
|
1169 |
+
Target values of shape `(n_samples,)` or `(n_samples, n_targets)`.
|
1170 |
+
Will be cast to `X`'s dtype if necessary.
|
1171 |
+
Xresampled : ndarray | pandas.DataFrame of shape
|
1172 |
(n_resampled, n_features), default=None
|
1173 |
Resampled training data used for denoising.
|
1174 |
+
weights : ndarray | pandas.DataFrame
|
1175 |
+
Weight array of the same shape as `y`.
|
1176 |
Each element is how to weight the mean-square-error loss
|
1177 |
for that particular element of y.
|
1178 |
variable_names : list[str] of length n_features
|
|
|
1244 |
|
1245 |
Parameters
|
1246 |
----------
|
1247 |
+
X : ndarray | pandas.DataFrame
|
1248 |
+
Training data of shape (n_samples, n_features).
|
1249 |
+
y : ndarray | pandas.DataFrame
|
1250 |
+
Target values of shape (n_samples,) or (n_samples, n_targets).
|
1251 |
+
Will be cast to X's dtype if necessary.
|
1252 |
+
Xresampled : ndarray | pandas.DataFrame, default=None
|
1253 |
+
Resampled training data, of shape `(n_resampled, n_features)`,
|
1254 |
+
used for denoising.
|
1255 |
+
variable_names : list[str]
|
1256 |
Names of each variable in the training dataset, `X`.
|
1257 |
+
Of length `n_features`.
|
1258 |
random_state : int, Numpy RandomState instance or None, default=None
|
1259 |
Pass an int for reproducible results across multiple function calls.
|
1260 |
See :term:`Glossary <random_state>`.
|
|
|
1321 |
|
1322 |
Parameters
|
1323 |
----------
|
1324 |
+
X : ndarray | pandas.DataFrame
|
1325 |
+
Training data of shape `(n_samples, n_features)`.
|
1326 |
+
y : ndarray | pandas.DataFrame
|
1327 |
+
Target values of shape `(n_samples,)` or `(n_samples, n_targets)`.
|
1328 |
+
Will be cast to `X`'s dtype if necessary.
|
1329 |
mutated_params : dict[str, Any]
|
1330 |
Dictionary of mutated versions of some parameters passed in __init__.
|
1331 |
+
weights : ndarray | pandas.DataFrame
|
1332 |
+
Weight array of the same shape as `y`.
|
1333 |
Each element is how to weight the mean-square-error loss
|
1334 |
for that particular element of y.
|
1335 |
seed : int
|
|
|
1570 |
|
1571 |
Parameters
|
1572 |
----------
|
1573 |
+
X : ndarray | pandas.DataFrame
|
1574 |
+
Training data of shape (n_samples, n_features).
|
1575 |
+
y : ndarray | pandas.DataFrame
|
1576 |
+
Target values of shape (n_samples,) or (n_samples, n_targets).
|
1577 |
+
Will be cast to X's dtype if necessary.
|
1578 |
+
Xresampled : ndarray | pandas.DataFrame, default=None
|
1579 |
+
Resampled training data, of shape (n_resampled, n_features),
|
1580 |
+
to generate a denoised data on. This
|
1581 |
will be used as the training data, rather than `X`.
|
1582 |
+
weights : ndarray | pandas.DataFrame, default=None
|
1583 |
+
Weight array of the same shape as `y`.
|
1584 |
Each element is how to weight the mean-square-error loss
|
1585 |
for that particular element of `y`. Alternatively,
|
1586 |
if a custom `loss` was set, it will can be used
|
|
|
1710 |
|
1711 |
Parameters
|
1712 |
----------
|
1713 |
+
X : ndarray | pandas.DataFrame
|
1714 |
+
Training data of shape `(n_samples, n_features)`.
|
1715 |
|
1716 |
index : int | list[int], default=None
|
1717 |
If you want to compute the output of an expression using a
|