Converting from half precision to bfloat16
in Pearson correlation coefficient cause numerical errors
#1922
Labels
bfloat16
in Pearson correlation coefficient cause numerical errors
#1922
🐛 Bug
The lack of half-precision op support on CPUs has lead to the decision to convert to
bfloat16
in the calculation of Pearson correlation coefficient. (#1813)However this leads to broadcasting errors when the values are (meaningfully) small.
To Reproduce
Which generally makes sense since there are only 5 exponential bits in
float16
, and some are lost in the operations. However this is not obvious during debugging since 0.001 is not that small...Expected behavior
A warning when the dynamic range is problematic, such as what SciPy does.
Or there may be some way to preserve more precision?
Environment
The text was updated successfully, but these errors were encountered: