yamle.methods.uncertain_method module#

class yamle.methods.uncertain_method.MemberMethod(num_members, **kwargs)[source]#

Bases: BaseMethod

This class is the extension of the base method for which the prediciton is performed using multiple members.

Parameters:

num_members (int) – The number of members to be used for the prediction.

training_num_members = 1#
static add_specific_args(parent_parser)[source]#

This method is used to add the specific arguments for the class.

Return type:

ArgumentParser

test_name: Optional[str]#
prepare_data_per_node: bool#
allow_zero_length_dataloader_with_multiple_devices: bool#
training: bool#
class yamle.methods.uncertain_method.MCSamplingMethod(num_members, **kwargs)[source]#

Bases: MemberMethod

This class is the extension of the base method for which the prediciton is performed using Monte Carlo sampling.

test_name: Optional[str]#
prepare_data_per_node: bool#
allow_zero_length_dataloader_with_multiple_devices: bool#
training: bool#
class yamle.methods.uncertain_method.SVIMethod(alpha, **kwargs)[source]#

Bases: MCSamplingMethod

This class is the extension of the base method for stochastic variational inference methods. That need to minimize the KL divergence between the prior and the posterior for their parameters.

Parameters:

alpha (float) – The alpha to be used for the trade-off between the likelihood and the KL divergence.

static add_specific_args(parent_parser)[source]#

This method is used to add the specific arguments for the class.

Return type:

ArgumentParser

test_name: Optional[str]#
prepare_data_per_node: bool#
allow_zero_length_dataloader_with_multiple_devices: bool#
training: bool#