bndl's picture
Upload 115 files
4f5540c
raw
history blame contribute delete
440 Bytes
import torch
def epistemic(outdict):
'''
Epistemic uncertainty given the output of evidential model
'''
beta = outdict['beta']
alpha = outdict['alpha']
v = outdict['v']
return (beta / (v * (alpha - 1))).item()
def aleatoric(outdict):
'''
Aleatoric uncertainty given the output of evidential model
'''
beta = outdict['beta']
alpha = outdict['alpha']
return (beta / (alpha - 1)).item()