Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
6143e3c
1
Parent(s):
0b34329
Fix documentation of loss functions
Browse files- pysr/sr.py +7 -21
pysr/sr.py
CHANGED
@@ -126,27 +126,13 @@ def pysr(X=None, y=None, weights=None,
|
|
126 |
loss written as a function. Examples of custom written losses
|
127 |
include: `myloss(x, y) = abs(x-y)` for non-weighted, or
|
128 |
`myloss(x, y, w) = w*abs(x-y)` for weighted.
|
129 |
-
Among the included losses, these are:
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
- `L1EpsilonInsLoss(ϵ)`,
|
137 |
-
- `L2EpsilonInsLoss(ϵ)`,
|
138 |
-
- `PeriodicLoss(c)`,
|
139 |
-
- `QuantileLoss(τ)`,
|
140 |
-
Classification:
|
141 |
-
- `ZeroOneLoss()`,
|
142 |
-
- `PerceptronLoss()`,
|
143 |
-
- `L1HingeLoss()`,
|
144 |
-
- `SmoothedL1HingeLoss(γ)`,
|
145 |
-
- `ModifiedHuberLoss()`,
|
146 |
-
- `L2MarginLoss()`,
|
147 |
-
- `ExpLoss()`,
|
148 |
-
- `SigmoidLoss()`,
|
149 |
-
- `DWDMarginLoss(q)`.
|
150 |
:param populations: int, Number of populations running; by default=procs.
|
151 |
:param niterations: int, Number of iterations of the algorithm to run. The best
|
152 |
equations are printed, and migrate between populations, at the
|
|
|
126 |
loss written as a function. Examples of custom written losses
|
127 |
include: `myloss(x, y) = abs(x-y)` for non-weighted, or
|
128 |
`myloss(x, y, w) = w*abs(x-y)` for weighted.
|
129 |
+
Among the included losses, these are as follows. Regression:
|
130 |
+
`LPDistLoss{P}()`, `L1DistLoss()`, `L2DistLoss()` (mean square),
|
131 |
+
`LogitDistLoss()`, `HuberLoss(d)`, `L1EpsilonInsLoss(ϵ)`,
|
132 |
+
`L2EpsilonInsLoss(ϵ)`, `PeriodicLoss(c)`, `QuantileLoss(τ)`.
|
133 |
+
Classification: `ZeroOneLoss()`, `PerceptronLoss()`, `L1HingeLoss()`,
|
134 |
+
`SmoothedL1HingeLoss(γ)`, `ModifiedHuberLoss()`, `L2MarginLoss()`,
|
135 |
+
`ExpLoss()`, `SigmoidLoss()`, `DWDMarginLoss(q)`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
:param populations: int, Number of populations running; by default=procs.
|
137 |
:param niterations: int, Number of iterations of the algorithm to run. The best
|
138 |
equations are printed, and migrate between populations, at the
|