Feature Combiner

Combine features from multiple featurizers into a single feature array.

class openadmet.models.features.combine.FeatureConcatenator(*, featurizers: list[openadmet.models.features.feature_base.FeaturizerBase])[source]

Bases: FeaturizerBase

Concatenate features from multiple featurizers into a single feature array.

Variables:

featurizers (list of FeaturizerBase) – List of featurizer instances to concatenate.

static concatenate(feats: list[ArrayLike], indices: list[numpy.ndarray]) ndarray[source]

Concatenate a list of feature arrays, keeping only features present in all datasets.

Parameters:
  • feats (list of array-like) – List of feature arrays to concatenate.

  • indices (list of np.ndarray) – List of index arrays indicating valid entries for each feature array.

Returns:

Tuple of (concatenated feature array, common indices).

Return type:

tuple

featurize(smiles: list[str]) ndarray[source]

Featurize a list of SMILES strings using all featurizers and concatenate the results.

Parameters:

smiles (list of str) – List of SMILES strings to featurize.

Returns:

Concatenated feature array for all SMILES.

Return type:

np.ndarray

featurizers: list[openadmet.models.features.feature_base.FeaturizerBase]
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].