Skip to content

Commit

Permalink
Make uncertainty toolbox optional
Browse files Browse the repository at this point in the history
  • Loading branch information
emsunshine committed Nov 22, 2024
1 parent ca7bf07 commit 47f171a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions systems2atoms/hyperplanetree/hyperplanetree/uq.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

import torch

try:
from uncertainty_toolbox import get_all_metrics
except ImportError:
raise ImportError('For uncertainty quantification, please install Uncertainty Toolbox: https://uncertainty-toolbox.github.io/')

def calculate_uncertainty_metrics(
y_pred,
uncertainty,
y_true,
num_bins = 100,
resolution = 99,
):

try:
from uncertainty_toolbox import get_all_metrics
except ImportError:
raise ImportError('For uncertainty quantification, please install Uncertainty Toolbox: https://uncertainty-toolbox.github.io/')

y_pred = y_pred.flatten()
uncertainty = uncertainty.flatten()
Expand Down

0 comments on commit 47f171a

Please sign in to comment.