Родитель
2fb19f47ba
Коммит
dab48a460e
|
@ -31,29 +31,29 @@ def plot_predictions_with_history(
|
|||
"""Plot prediction results with historical values
|
||||
|
||||
Args:
|
||||
predictions (Dataframe): Prediction results with a time step column (e.g., week_index), a
|
||||
predictions (pd.DataFrame): Prediction results with a time step column (e.g., week_index), a
|
||||
forecasted value column (e.g., forecasted sales of each store-brand), and two columns that
|
||||
identify each individual time series (e.g., store_id and brand_id)
|
||||
history (Dataframe): A dataframe containing historical values of the prediction target, a
|
||||
history (pd.Dataframe): A dataframe containing historical values of the prediction target, a
|
||||
time step column, and two columns that specify each time series
|
||||
grain1_unique_vals (List): Unique values of the 1st column indicating the granularity of
|
||||
grain1_unique_vals (list): Unique values of the 1st column indicating the granularity of
|
||||
the time series data (e.g, store_list)
|
||||
grain2_unique_vals (List): Unique values of the 2nd column indicating the granularity of
|
||||
grain2_unique_vals (list): Unique values of the 2nd column indicating the granularity of
|
||||
the time series data (e.g., brand_list)
|
||||
time_col_name (String): Name of the time step column (e.g., week_index)
|
||||
target_col_name (String): Name of the forecast target column (e.g., unit_sales)
|
||||
grain1_name (String): Name of the 1st column indicating the time series graunularity
|
||||
grain2_name (String): Name of the 2nd column indicating the time series graunularity
|
||||
min_timestep (Integer): Minimum time steps in the plots
|
||||
num_samples (Integer): Number of samples from all the time series (each combination of
|
||||
time_col_name (str): Name of the time step column (e.g., week_index)
|
||||
target_col_name (str): Name of the forecast target column (e.g., unit_sales)
|
||||
grain1_name (str): Name of the 1st column indicating the time series graunularity
|
||||
grain2_name (str): Name of the 2nd column indicating the time series graunularity
|
||||
min_timestep (int): Minimum time steps in the plots
|
||||
num_samples (int): Number of samples from all the time series (each combination of
|
||||
grain1 column and grain2 column gives an individual time series)
|
||||
predict_at_timestep (Integer): Time step at which the forecasts are made
|
||||
line_at_predict_time (Boolean): Whether to add a vertical line indicating the time step
|
||||
predict_at_timestep (int): Time step at which the forecasts are made
|
||||
line_at_predict_time (bool): Whether to add a vertical line indicating the time step
|
||||
when the forecasts are made
|
||||
title (String): Overall title of the plots
|
||||
x_label (String): Label of the x-axis of the plots
|
||||
y_label (String): Label of the y-axis of the plots
|
||||
random_seed (Integer): Random seed used for sampling the time series
|
||||
title (str): Overall title of the plots
|
||||
x_label (str): Label of the x-axis of the plots
|
||||
y_label (str): Label of the y-axis of the plots
|
||||
random_seed (int): Random seed used for sampling the time series
|
||||
"""
|
||||
|
||||
random.seed(random_seed)
|
||||
|
|
Загрузка…
Ссылка в новой задаче