-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant metrics mapping (#1167)
* Remove redundant metrics mapping * Convert str to MetricsEnum * Refactor MetricsObjective * Remove ApiMetrics * Fix test prediction intervals * Fix tests * PEP 8 * Fix paths * Move to init * зуз8 * Add MASE metric (#1166) MASE metric for time series forecasting task was implemented https://en.wikipedia.org/wiki/Mean_absolute_scaled_error TimeSeriesForecastingMetricsEnum was created * Review fixes * Remove redundant metrics mapping * Convert str to MetricsEnum * Refactor MetricsObjective * Remove ApiMetrics * Fix test prediction intervals * Fix tests * PEP 8 * Fix paths * Move to init * зуз8 * Review fixes * Convert str to MetricsEnum * Refactor MetricsObjective --------- Co-authored-by: Valerii Pokrovskii <[email protected]>
- Loading branch information
Showing
17 changed files
with
99 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pathlib | ||
import platform | ||
|
||
plt = platform.system() | ||
if plt == 'Linux': | ||
pathlib.WindowsPath = pathlib.PosixPath |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
test/unit/pipelines/prediction_intervals/data/generate_ts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This script generates train ts, test ts for testing prediction intervals | ||
|
||
import numpy as np | ||
|
||
|
||
def synthetic_series(start, end): | ||
|
||
trend = np.array([5 * np.sin(x / 20) + 0.1 * x - 2 * np.sqrt(x) for x in range(start, end)]) | ||
noise = np.random.normal(loc=0, scale=1, size=end - start) | ||
|
||
return trend + noise | ||
|
||
|
||
ts_train = synthetic_series(0, 200) | ||
ts_test = synthetic_series(200, 220) | ||
np.savetxt("train_ts.csv", ts_train, delimiter=",") | ||
np.savetxt("test_ts.csv", ts_test, delimiter=",") |
Binary file added
BIN
+228 KB
test/unit/pipelines/prediction_intervals/data/pred_ints_model_test.pickle
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 10 additions & 9 deletions
19
test/unit/pipelines/prediction_intervals/test_prediction_intervals.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.