uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
Calibrate binary classification datasets using isotonic regression as discussed in [guo2017].
In effect, the method transforms incoming uncalibrated confidences using a histogram-like
function where the range of each transforming bin and its magnitude is learned.
References
[guo2017]
Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K. Q. “On calibration of modern neural
networks”. ICML, 2017. https://arxiv.org/abs/1706.04599
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
Calibrate multiclass classification datasets using isotonic regression as discussed in
[guo2017]. It uses a one-vs-all aggregation scheme to extend isotonic regression from binary to
multiclass classifiers.
References
[guo2017]
Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K. Q. “On calibration of modern neural
networks”. ICML, 2017. https://arxiv.org/abs/1706.04599
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the
shape of nxtxc, where n is the number of input molecules/reactions, t is
the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in
the fitting
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the
shape of nxtxc, where n is the number of input molecules/reactions, t is
the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in
the fitting
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the
shape of nxtxc, where n is the number of input molecules/reactions, t is
the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in
the fitting
Creates conformal in-set and conformal out-set such that, for \(1-\alpha\) proportion of datapoints,
the set of labels is bounded by the in- and out-sets [1]_:
where the in-set \(\hat{\mathcal C}_\text{in}\) is contained by the set of true labels \(\mathcal Y\) and
\(\mathcal Y\) is contained within the out-set \(\hat{\mathcal C}_\text{out}\).
Parameters:
alpha (float) – The error rate, \(\alpha \in [0, 1]\)
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
uncs (Tensor) – a tensor containinig uncalibrated uncertainties
Returns:
the calibrated uncertainties of the shape of nxtx2, where n is the number of input
molecules/reactions, t is the number of tasks, and the first element in the last dimension
corresponds to the in-set \(\hat{\mathcal C}_\text{in}\), while the second corresponds to
the out-set \(\hat{\mathcal C}_\text{out}\).
Calibrate regression datasets that have ensembles of individual models that make variance predictions.
This method minimizes the negative log likelihood for the predictions versus the targets by applying
a weighted average across the variance predictions of the ensemble. [wang2021]
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of mxnxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
Calibrate classification datasets using the Platt scaling algorithm [guo2017], [platt1999].
In [platt1999], Platt suggests using the number of positive and negative training examples to
adjust the value of target probabilities used to fit the parameters.
References
[guo2017]
Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K. Q. “On calibration of modern neural
networks”. ICML, 2017. https://arxiv.org/abs/1706.04599
Platt, J. “Probabilistic Outputs for Support Vector Machines and Comparisons to
Regularized Likelihood Methods.” Adv. Large Margin Classif. 1999, 10 (3), 61–74.
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
Conformalize quantiles to make the interval \([\hat{t}_{\alpha/2}(x),\hat{t}_{1-\alpha/2}(x)]\) to have
approximately \(1-\alpha\) coverage. [angelopoulos2021]
where \(s\) is the nonconformity score as the difference between \(y\) and its nearest quantile.
\(\hat{t}_{\alpha/2}(x)\) and \(\hat{t}_{1-\alpha/2}(x)\) are the predicted quantiles from a quantile
regression model.
Note
The algorithm is specifically designed for quantile regression model. Intuitively, the set \(C(x)\) just
grows or shrinks the distance between the quantiles by \(\hat{q}\) to achieve coverage. However, this
function can also be applied to regression model without quantiles being provided. In this case, both
\(\hat{t}_{\alpha/2}(x)\) and \(\hat{t}_{1-\alpha/2}(x)\) are the same as \(\hat{y}\). Then, the
interval would be the same for every data point (i.e., \(\left[-\hat{q}, \hat{q} \right]\)).
Parameters:
alpha (float) – The error rate, \(\alpha \in [0, 1]\)
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
Calibrate regression datasets by applying a scaling value to the uncalibrated standard deviation,
fitted by minimizing the negative-log-likelihood of a normal distribution around each prediction. [levi2022]
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the fitting
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
A ClassificationDirichletEstimator predicts an amount of ‘evidence’ for both the
negative class and the positive class as described in [sensoy2018]. The class probabilities and
the uncertainty are calculated based on the evidence.
\[S = \sum_{i=1}^K \alpha_i
p_i = \alpha_i / S
u = K / S\]
where \(K\) is the number of classes, \(\alpha_i\) is the evidence for class \(i\),
\(p_i\) is the probability of class \(i\), and \(u\) is the uncertainty.
References
[sensoy2018]
Sensoy, M.; Kaplan, L.; Kandemir, M. “Evidential deep learning to quantify
classification uncertainty.” NeurIPS, 2018, 31. https://doi.org/10.48550/arXiv.1806.01768
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
A DropoutEstimator creates a virtual ensemble of models via Monte Carlo dropout with
the provided model [gal2016].
Parameters:
ensemble_size (int) – The number of samples to draw for the ensemble.
dropout (float | None) – The probability of dropping out units in the dropout layers. If unspecified,
the training probability is used, which is prefered but not possible if the model was not
trained with dropout (i.e. p=0).
Gal, Y.; Ghahramani, Z. “Dropout as a bayesian approximation: Representing model uncertainty in deep learning.”
International conference on machine learning. PMLR, 2016. https://arxiv.org/abs/1506.02142
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
A MulticlassDirichletEstimator predicts an amount of ‘evidence’ for each class as
described in [sensoy2018]. The class probabilities and the uncertainty are calculated based on
the evidence.
\[S = \sum_{i=1}^K \alpha_i
p_i = \alpha_i / S
u = K / S\]
where \(K\) is the number of classes, \(\alpha_i\) is the evidence for class \(i\),
\(p_i\) is the probability of class \(i\), and \(u\) is the uncertainty.
References
[sensoy2018]
Sensoy, M.; Kaplan, L.; Kandemir, M. “Evidential deep learning to quantify
classification uncertainty.” NeurIPS, 2018, 31. https://doi.org/10.48550/arXiv.1806.01768
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
Nix, D. A.; Weigend, A. S. “Estimating the mean and variance of the target
probability distribution.” Proceedings of 1994 IEEE International Conference on Neural
Networks, 1994 https://doi.org/10.1109/icnn.1994.374138
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
the models used for model predictions and uncertainty predictions. If using
MolAtomBondMPNN models, the uncertainty estimator will return preds and uncs for each of
the mole, atom, and bond predictions and uncertainties.
trainer: pl.Trainer
an instance of the Trainer used to manage model inference
Returns:
preds (Tensor) – the model predictions, with shape varying by task type:
regression/binary classification: mxnxt
multiclass classification: mxnxtxc, where m is the number of models,
n is the number of inputs, t is the number of tasks, and c is the number of classes.
uncs (Tensor) – the predicted uncertainties, with shapes of m'xnxt.
.. note:: – The m and m' are different by definition. The m is the number of models,
while the m' is the number of uncertainty estimations. For example, if two MVE
or evidential models are provided, both m and m' are two. However, for an
ensemble of two models, m' would be one (even though m=2).
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
A class for evaluating regression uncertainty values based on how they deviate from perfect
calibration on an observed-probability versus expected-probability plot.
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties (variance) of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
num_bins (int, default=100) – the number of bins to discretize the [0,1] interval
Returns:
a tensor of the shape t containing the evaluated metrics
A class that evaluates uncertainty performance by binning together clusters of predictions
and comparing the average predicted variance of the clusters against the RMSE of the cluster. [1]_
where \(N\) is the number of bins, \(\mathrm{RMV}_i\) is the root of the mean uncertainty over the
\(i\)-th bin and \(\mathrm{RMSE}_i\) is the root mean square error over the \(i\)-th bin. This
discrepancy is further normalized by the uncertainty over the bin, \(\mathrm{RMV}_i\), because the error
is expected to be naturally higher as the uncertainty increases.
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties (variance) of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
num_bins (int, default=100) – the number of bins the data are divided into
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the shape of nxtxc, where n is the number of input
molecules/reactions, t is the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the shape of nxtxc, where n is the number of input
molecules/reactions, t is the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
where the in-set \(\hat{\mathcal C}_\text{in}\) is contained by the set of true labels \(\mathcal Y\) and
\(\mathcal Y\) is contained within the out-set \(\hat{\mathcal C}_\text{out}\).
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate uncertainty values for binary classification datasets using the mean negative-log-likelihood
of the targets given the assigned probabilities from the model:
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probability of class 1) of the shape of nxt, where n is the number of input
molecules/reactions, and t is the number of tasks.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate uncertainty values for multiclass classification datasets using the mean negative-log-likelihood
of the targets given the assigned probabilities from the model:
\[\mathrm{NLL} = -\log(p_{y_i})\]
where \(p_{y_i}\) is the predicted probability for the true class \(y_i\), calculated as:
Here: \(K\) is the total number of classes,
\(\mathbb{1}(y_i = k)\) is the indicator function that is 1 when the true class \(y_i\) equals class \(k\), and 0 otherwise,
and \(p_k\) is the predicted probability for class \(k\).
The function returns a tensor containing the mean NLL for each task.
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
uncs (Tensor) – the predicted uncertainties (i.e., the predicted probabilities for each class) of the shape of nxtxc, where n is the number of input
molecules/reactions, t is the number of tasks, and c is the number of classes.
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate uncertainty values for regression datasets using the mean negative-log-likelihood
of the targets given the probability distributions estimated by the model:
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics
Evaluate the Spearman rank correlation coefficient between the uncertainties and errors in the model predictions.
The correlation coefficient returns a value in the [-1, 1] range, with better scores closer to 1
observed when the uncertainty values are predictive of the rank ordering of the errors in the model prediction.
Evaluate the performance of uncertainty predictions against the model target values.
Parameters:
preds (Tensor) – the predictions for regression tasks. It is a tensor of the shape of nxt, where n is
the number of input molecules/reactions, and t is the number of tasks.
uncs (Tensor) – the predicted uncertainties of the shape of nxt
targets (Tensor) – a tensor of the shape nxt
mask (Tensor) – a tensor of the shape nxt indicating whether the given values should be used in the evaluation
Returns:
a tensor of the shape t containing the evaluated metrics