diff --git a/ocf_ml_metrics/evaluation/evaluation.py b/ocf_ml_metrics/evaluation/evaluation.py index 3d7b456..de09685 100644 --- a/ocf_ml_metrics/evaluation/evaluation.py +++ b/ocf_ml_metrics/evaluation/evaluation.py @@ -13,7 +13,7 @@ def evaluation( results_df: pd.DataFrame, model_name: str, sun_threshold_degrees_for_night: float = -5.0, - error_thresholds: Union[float, int, list] = [1000, 2000], + error_thresholds: Union[float, int, list] = None, outturn_unit: str = "mw", **kwargs, ) -> dict: @@ -45,6 +45,8 @@ def evaluation( """ # make sure datetimes columns datetimes and floor target time t to nearest 5-minutes + if error_thresholds is None: + error_thresholds = [1000, 2000] results_df["t0_datetime_utc"] = pd.to_datetime(results_df["t0_datetime_utc"]) results_df["target_datetime_utc"] = pd.to_datetime(results_df["target_datetime_utc"]) results_df["target_datetime_utc"] = results_df["target_datetime_utc"].dt.floor("5T") @@ -164,7 +166,7 @@ def evaluation_per_id( results_df: pd.DataFrame, model_name: str, sun_threshold_degrees_for_night: float = -5.0, - error_thresholds: Union[float, int, list] = [1000, 2000], + error_thresholds: Union[float, int, list] = None, outturn_unit: str = "mw", **kwargs, ) -> dict: @@ -196,6 +198,8 @@ def evaluation_per_id( """ # make sure datetimes columns datetimes and floor target time t to nearest 5-minutes + if error_thresholds is None: + error_thresholds = [1000, 2000] results_df["t0_datetime_utc"] = pd.to_datetime(results_df["t0_datetime_utc"]) results_df["target_datetime_utc"] = pd.to_datetime(results_df["target_datetime_utc"]) results_df["target_datetime_utc"] = results_df["target_datetime_utc"].dt.floor("5T")