cratepy.clustering.clusteringdata.FeatureAlgorithm

class FeatureAlgorithm[source]

Bases: ABC

Feature computation algorithm interface.

get_feature_data_matrix(self, strain_formulation, problem_type, rve_dims, n_voxels_dims, rve_response)[source]

abstract: Compute data matrix associated to clustering feature.

Constructor.

List of Public Methods

get_feature_data_matrix

Compute data matrix associated to clustering feature.

Methods

abstract __init__()[source]

Constructor.

abstract get_feature_data_matrix(strain_formulation, problem_type, rve_dims, n_voxels_dims, rve_response)[source]

Compute data matrix associated to clustering feature.

Parameters:
  • strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.

  • problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2), 2D axisymmetric (3) and 3D (4).

  • rve_dims (list[float]) – RVE size in each dimension.

  • n_voxels_dims (list[int]) – Number of voxels in each dimension of the regular grid (spatial discretization of the RVE).

  • rve_response (numpy.ndarray (2d)) – RVE elastic response for one or more macroscale loadings (numpy.ndarray of shape (n_voxels, n_strain_comps)), where each macroscale loading is associated with a set of independent strain components.

Returns:

data_matrix – Clustering features data matrix (numpy.ndarray of shape (n_voxels, n_feature_dim)).

Return type:

ndarray of shape (n_voxels, n_feature_dim)