hookeai.model_architectures.hybrid_base_model.model.hybridized_model.set_hybridized_model

set_hybridized_model(model_class, hyb_indices, model_init_args=None, model_init_file_path=None, model_state_file_path=None, is_input_residual=False, data_scalers=None)[source]

Set hybridized model data.

Parameters:
  • model_class (type) – Hybridized model class.

  • hyb_indices (tuple[int]) – Hybridized model hybridization indices stored as (i, j), where i is the hybridization channel index and j the position index along the hybridization channel.

  • model_init_args (dict, default=None) – Hybridized model class initialization parameters.

  • model_init_file_path (str, default=None) – Hybridized model initialization file path. Ignored if model_init_args is provided.

  • model_state_file_path (str, default=None) – Hybridized model state file path. If provided, then model state is initialized from state file, otherwise model state stems from model (default) initialization.

  • is_input_residual (bool, default=False) – If True, then input residual connection is assigned to hybridized model, False otherwise.

  • data_scalers (dict, default=None) – Data scaler (item, TorchStandardScaler) for each feature data (key, str). Only extracts data scalers for ‘features_in’ and ‘features_out’ if available. Overrides data scalers provided in model initialization file path.

Returns:

hyb_model_data – Hybridized model data.

Return type:

dict