fusilli.fusionmodels.tabularfusion.decision

Decision fusion of two types of tabular data.

Classes

TabularDecision(prediction_task,Β data_dims,Β ...)

This class implements a model that fuses the two types of tabular data using a decision fusion

class TabularDecision(prediction_task, data_dims, multiclass_dimensions)[source]

Bases: ParentFusionModel, Module

This class implements a model that fuses the two types of tabular data using a decision fusion

approach.

mod1_layers

Dictionary containing the layers of the 1st type of tabular data.

Type:

nn.ModuleDict

mod2_layers

Dictionary containing the layers of the 2nd type of tabular data.

Type:

nn.ModuleDict

fused_layers

Sequential layer containing the fused layers.

Type:

nn.Sequential

final_prediction_tab1

Sequential layer containing the final prediction layers for the first tabular data.

Type:

nn.Sequential

final_prediction_tab2

Sequential layer containing the final prediction layers for the second tabular data.

Type:

nn.Sequential

fusion_operation

Function that performs the fusion operation. Default is torch.mean(torch.stack([x, y]), dim=0).

Type:

function

__init__(prediction_task, data_dims, multiclass_dimensions)[source]
Parameters:
  • prediction_task (str) – Type of prediction to be performed.

  • data_dims (list) – List containing the dimensions of the data.

  • multiclass_dimensions (int) – Number of classes in the multiclass classification task.

calc_fused_layers()[source]

Calculates the fusion layers.

Return type:

None

forward(x)[source]

Forward pass of the model.

Parameters:

x (tuple) – Tuple containing the two types of tabular data. (tab1, tab2)

Returns:

List containing the fused prediction.

Return type:

list

fusion_type = 'operation'

Type of fusion.

Type:

str

method_name = 'Tabular decision'

Name of the method.

Type:

str

modality_type = 'tabular_tabular'

Type of modality.

Type:

str