Tabular Output Configuration

Complete configuration guide for tabular prediction and classification tasks.

Overview

Tabular outputs handle structured predictions including:

  • Classification - Multi-class and binary classification

  • Regression - Continuous value prediction

  • Multi-target - Multiple simultaneous predictions

  • Mixed targets - Combination of classification and regression

Quick Example

output_info:
  output_source: "my_tabular_output.csv"
  output_name: "patient_outcomes"
  output_type: "tabular"
output_type_info:
  target_cat_columns: ["diagnosis", "risk_level"]
  target_con_columns: ["survival_time", "biomarker_level"]
model_config:
  model_type: "mlp-residual"
  model_init_config:
    fc_repr_dim: 128
    rb_do: 0.1

Output Type Configuration

class eir.setup.schemas.TabularOutputTypeConfig(
target_cat_columns: Sequence[str] = <factory>,
target_con_columns: Sequence[str] = <factory>,
label_parsing_chunk_size: None | int = None,
cat_label_smoothing: float = 0.0,
cat_loss_name: Literal['CrossEntropyLoss',
'BCEWithLogitsLoss']='CrossEntropyLoss',
con_loss_name: Literal['MSELoss',
'L1Loss',
'SmoothL1Loss',
'PoissonNLLLoss',
'HuberLoss']='MSELoss',
cat_loss_class_balanced: bool = False,
uncertainty_weighted_mt_loss: bool = False,
)
Parameters:
  • target_cat_columns – Which columns from label_file to use as categorical targets.

  • target_con_columns – Which columns from label_file to use as continuous targets.

  • label_parsing_chunk_size – Number of rows to process at time when loading in the input_source. Useful when RAM is limited.

  • cat_label_smoothing – Label smoothing to apply to categorical targets.

  • cat_loss_name – Loss function to use for categorical targets. If using BCEWithLogitsLoss, the targets should all be binary.

  • con_loss_name – Loss function to use for continuous targets.

  • cat_loss_class_balanced – Whether to use class-balanced weighting for categorical loss. Uses the effective number of samples (Cui et al., 2019) to compute per-class weights, helping with imbalanced targets. Only applicable with BCEWithLogitsLoss.

  • uncertainty_weighted_mt_loss – Whether to use uncertainty weighted loss for multitask / multilabel learning.

Output Module Configuration

Base Tabular Output Module

class eir.models.output.tabular.tabular_output_modules.TabularOutputModuleConfig(
model_init_config: ResidualMLPOutputModuleConfig | LinearOutputModuleConfig | SharedResidualMLPOutputModuleConfig,
model_type: Literal['mlp_residual', 'linear', 'shared_mlp_residual'] = 'mlp_residual',
)
Parameters:
  • model_init_config – Configuration / arguments used to initialise model.

  • model_type – Which type of image model to use.

Available Output Architectures

Residual MLP

class eir.models.output.tabular.mlp_residual.ResidualMLPOutputModuleConfig(
layers: list[int] = <factory>,
fc_task_dim: int = 256,
rb_do: float = 0.1,
fc_do: float = 0.1,
stochastic_depth_p: float = 0.1,
final_layer_type: Literal['linear',
'mlp_residual']='linear',
)
Parameters:
  • layers – Number of residual MLP residual blocks to use in the output module.

  • fc_task_dim – Number of hidden nodes in each MLP residual block.

  • rb_do – Dropout in each MLP residual block.

  • fc_do – Dropout before final layer.

  • stochastic_depth_p – Stochastic depth probability (probability of dropping input) for each residual block.

  • final_layer_type – Which type of final layer to use to construct tabular output prediction.

Linear Output

class eir.models.output.tabular.linear.LinearOutputModuleConfig