epftoolbox.models.evaluate_lear_in_test_dataset¶
-
epftoolbox.models.
evaluate_lear_in_test_dataset
(path_datasets_folder='./datasets', path_recalibration_folder='./experimental_files', dataset='PJM', years_test=2, calibration_window=1092, begin_test_date=None, end_test_date=None)[source]¶ Function for easy evaluation of the LEAR model in a test dataset using daily recalibration.
The test dataset is defined by a market name and the test dates dates. The function generates the test and training datasets, and evaluates a LEAR model considering daily recalibration.
An example on how to use this function is provided here.
Parameters: - path_datasets_folder (str, optional) – path where the datasets are stored or, if they do not exist yet, the path where the datasets are to be stored.
- path_recalibration_folder (str, optional) – path to save the files of the experiment dataset.
- dataset (str, optional) – Name of the dataset/market under study. If it is one one of the standard markets,
i.e.
"PJM"
,"NP"
,"BE"
,"FR"
, or"DE"
, the dataset is automatically downloaded. If the name is different, a dataset with a csv format should be place in thepath_datasets_folder
. - years_test (int, optional) – Number of years (a year is 364 days) in the test dataset. It is only used if
the arguments
begin_test_date
andend_test_date
are not provided. - calibration_window (int, optional) – Number of days used in the training dataset for recalibration.
- begin_test_date (datetime/str, optional) – Optional parameter to select the test dataset. Used in combination with the argument
end_test_date
. If either of them is not provided, the test dataset is built using theyears_test
argument.begin_test_date
should either be a string with the following format"%d/%m/%Y %H:%M"
, or a datetime object. - end_test_date (datetime/str, optional) – Optional parameter to select the test dataset. Used in combination with the argument
begin_test_date
. If either of them is not provided, the test dataset is built using theyears_test
argument.end_test_date
should either be a string with the following format"%d/%m/%Y %H:%M"
, or a datetime object.
Returns: A dataframe with all the predictions in the test dataset. The dataframe is also written to path_recalibration_folder.
Return type: pandas.DataFrame