parsnip.ParsnipModel.loss_function

ParsnipModel.loss_function(result, return_components=False, return_individual=False)

Compute the loss function for a set of light curves

Parameters:
  • result (dict) – Output of forward

  • return_components (bool, optional) – Whether to return the individual parts of the loss function, by default False.

  • return_individual (bool, optional) – Whether to return the loss function for each light curve individually, by default False.

Returns:

If return_components and return_individual are False, return a single value representing the loss function for a set of light curves. If return_components is True, then we return a set of four values representing the negative log likelihood, the KL divergence, the regularization penalty, and the amplitude probability. If return_individual is True, then we return the loss function for each light curve individually.

Return type:

float or FloatTensor