hookeai.model_architectures.procedures.convergence_plots.build_time_series_predictions_data¶
- build_time_series_predictions_data(dataset_file_path, predictions_dir, prediction_type, prediction_labels, samples_ids='all', is_uncertainty_quantification=False)[source]¶
Build times series prediction and ground-truth data arrays.
Specific output features indexes cannot be automatically inferred and must be set according with the particular output features of the model for suitable extraction.
- Parameters:
dataset_file_path (str) – Time series testing data set file path.
predictions_dir (str) – Directory where samples predictions results files are stored.
prediction_type ({'stress_comps', 'acc_p_strain'}) –
Type of prediction data arrays:
’stress_comps’ : Stress components paths
’acc_p_strain’ : Accumulated plastic strain
’p_strain_comps’ : Plastic strain components paths
prediction_labels (tuple[str]) – Labels of prediction data arrays.
samples_ids ({'all', list[int]}, default='all') – Samples for which the data arrays with the time series prediction and ground-truth are built.
is_uncertainty_quantification (bool, default=False) – If True, then build the prediction data arrays for each sample accounting for one or more model samples. Each model sample prediction directory is inferred from the provided prediction directory (assumed existing in base model directory). Uncertainty quantification data accounting for different model samples predictions is required.
- Returns:
prediction_data_arrays – Prediction components data arrays for each sample. Each prediction component is stored as a dictionary, where the data array (item, np.ndarray(2d)) of each sample (key, str) is stored as a numpy.ndarray(2d) of shape (sequence_length, 2 + n_predictions), where data_array[:, 0] stores the time series discrete time, data_array[:, 1] stores the time series ground-truth and data_array[:, 2:] stores the time series predictions.
- Return type: