fusilli.fusionmodels.tabularfusion.concat_data

Concatenating the two tabular modalities at the data-level (early fusion)

Classes

ConcatTabularData(prediction_task,Β ...)

Concatenating the two tabular modalities at the data-level (early fusion)

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

Bases: ParentFusionModel, Module

Concatenating the two tabular modalities at the data-level (early fusion)

prediction_task

Type of prediction to be performed.

Type:

str

fused_dim

Number of features of the fused layers. In this method, it’s the tabular 1 dimension plus the tabular 2 dimension.

Type:

int

fused_layers

Sequential layer containing the fused layers. Calculated in the set_fused_layers() method.

Type:

nn.Sequential

final_prediction

Sequential layer containing the final prediction layers. The final prediction layers take in the number of features of the fused layers as input. Calculated in the set_final_pred_layers() method.

Type:

nn.Sequential

__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]

Calculate the fused layers.

Return type:

None

forward(x)[source]

Forward pass of the model.

Parameters:

x (tuple) – Tuple containing the data of the two modalities.

Returns:

List containing the output of the model.

Return type:

list

fusion_type = 'operation'

Type of fusion.

Type:

str

get_fused_dim()[source]

Get the number of features of the fused layers.

Return type:

None

method_name = 'Concatenating tabular data'

Name of the method.

Type:

str

modality_type = 'tabular_tabular'

Type of modality.

Type:

str