CondVAEModel.evaluate
- CondVAEModel.evaluate(data: DataModule | Tuple[torch.Tensor, torch.Tensor] | Tuple[ndarray, ndarray], untransform: bool = False, use_objective: bool = False, losses_evaluate: Dict[str, torch.nn.Module] | None = None) Tuple[DataFrame, DataFrame, DataFrame, DataFrame] [source]
Evaluate the model on the validation data. This method is similar to
CondAEModel.validate()
, but allows to compute the losses in the untransformed space.Depending on the argument untransform, the losses computation is applied on the transformed or untransformed (and non post-processed) data. Hence, one has to be careful when providing the losses to be evaluated, as they should be consistent with the data space - or better work in both spaces.
- Parameters:
data (Union[DataModule, Tuple[torch.Tensor, torch.Tensor], Tuple[np.ndarray, np.ndarray]]) – The data module object that provides validation data. Alternatively, a tuple of input and output tensors can be provided.
untransform (bool, optional, default=False) – If True, the losses are computed in the untransformed space (i.e., the original space).
use_objective (bool, optional, default=False) – If True, the losses are computed using the objective functions of the data objects. Requires untransform=False.
losses_evaluate (Optional[Dict[str, nn.Module]], optional, default=None) – A dictionary containing the losses to be evaluated. If None, the losses are computed using loss defined by DataObject.get_loss_evaluation().
- Returns:
Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame, pd.DataFrame] – A tuple containing the evaluation losses for the input and output features, as well as the values predicted for input and output features.