hookeai.model_architectures.materials.strain_features.add_strain_features

add_strain_features(dataset, strain_feature_label)[source]

Add new strain-based feature history in time series data set.

The computation of a new strain-based feature requires that ‘strain_path’ is available as an existing feature of the time series data set.

The new strain-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).

  • strain_feature_label ({'i1_strain', 'i2_strain'}) –

    Strain-based feature:

    ’i1_strain’ : First (principal) invariant of strain tensor.

    ’i2_strain’ : Second (principal) invariant of strain 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