mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 21:18:04 +00:00
filters update
This commit is contained in:
@@ -34,3 +34,4 @@ Error metrics and loss functions for model/strategy evaluation. All error indica
|
||||
| [TUKEY](tukey/Tukey.md) | Tukey Biweight Loss | Hard-rejects outliers beyond threshold. Redescending. |
|
||||
| [WMAPE](wmape/Wmape.md) | Weighted MAPE | Volume-weighted percentage error. For heterogeneous data. |
|
||||
| [WRMSE](wrmse/Wrmse.md) | Weighted RMSE | Weighted root mean squared error. Custom observation weighting. |
|
||||
| STDERR | Standard Error | StdDev / √n. Measures sampling variability. |
|
||||
|
||||
@@ -10,7 +10,7 @@ stable_logcosh(float x) =>
|
||||
float LOG2 = 0.6931471805599453
|
||||
float absX = math.abs(x)
|
||||
// For large values, use asymptotic approximation to avoid overflow
|
||||
absX > 20.0 ? absX - LOG2 : math.log(math.cosh(x))
|
||||
absX > 20.0 ? absX - LOG2 : math.log((math.exp(x) + math.exp(-x)) / 2.0)
|
||||
|
||||
//@function Calculates Log-Cosh Loss
|
||||
//@param actual Series of actual values
|
||||
|
||||
Reference in New Issue
Block a user