Optimal transport of the joint distribution between data sources
OptimalTransportDataIntegration.loss_crossentropy
— Methodloss_crossentropy(Y, F)
Cross entropy is typically used as a loss in multi-class classification, in which case the labels y are given in a one-hot format. dims specifies the dimension (or the dimensions) containing the class probabilities. The prediction ŷ is usually probabilities but in our case it is also one hot encoded vector.
OptimalTransportDataIntegration.modality_cost
— Methodmodality_cost(loss, weight)
- loss: matrix of size len(weight) * len(levels)
- weight: vector of weights
Returns the scalar product <loss[level,],weight>