hookeai.model_architectures.procedures.convergence_plots.build_prediction_data_arrays¶
- build_prediction_data_arrays(predictions_dir, prediction_type, prediction_labels, samples_ids='all')[source]¶
Build samples predictions data arrays with predictions and ground-truth.
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:
predictions_dir (str) – Directory where samples predictions results files are stored.
prediction_type ({'stress_comps', 'acc_p_strain', 'p_strain_comps'}) –
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 IDs whose prediction results are collated in each prediction data array.
- Returns:
prediction_data_arrays – Prediction components data arrays. Each data array collates data from all specified samples and is stored as a numpy.ndarray(2d) of shape (n_points, 2), where data_array[:, 0] stores the ground-truth and data_array[:, 1] stores the predictions.
- Return type:
list[numpy.ndarray(2d)]