hookeai.model_architectures.materials.stress_features.add_stress_features¶
- add_stress_features(dataset, stress_feature_label)[source]¶
Add new stress-based feature history in time series data set.
The computation of a new stress-based feature requires that ‘stress_path’ is available as an existing feature of the time series data set.
The new stress-based feature history is stored as a torch.Tensor(2d) of shape (sequence_length, n_features), where n_features is the corresponding dimensionality.
- Parameters:
dataset (torch.utils.data.Dataset) – Time series data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).
stress_feature_label ({'vol_stress', 'dev_stress'}) –
Stress-based feature:
’vol_stress’ : Volumetric (or hydrostatic) stress.
’dev_stress’ : Deviatoric component of stress tensor.
- Returns:
dataset – Time series data set. Each sample is stored as a dictionary where each feature (key, str) data is a torch.Tensor(2d) of shape (sequence_length, n_features).
- Return type:
torch.utils.data.Dataset