TensorBFS / TensorInference.jl

Probabilistic inference using contraction of tensor networks
https://tensorbfs.github.io/TensorInference.jl/
MIT License
18 stars 2 forks source link

Fix the overflow issue in probability #78

Closed GiggleLiu closed 1 year ago

GiggleLiu commented 1 year ago

fix #77

The overflow issue has been seriously handled in this package by RescaledArray. However, when calling probability, we have to returns the exponentiated value, which causes the overflow in tests. To avoid potential overflow, we added the logged version of this API:

julia> log_probability(tn)

It will return the logged value of the probability (or partition function), hence does not overflow.

codecov[bot] commented 1 year ago

Codecov Report

Merging #78 (a1100ad) into main (83ee4e7) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   84.61%   84.70%   +0.08%     
==========================================
  Files          10       10              
  Lines         533      536       +3     
==========================================
+ Hits          451      454       +3     
  Misses         82       82              
Files Changed Coverage Δ
src/mar.jl 94.54% <ø> (ø)
src/Core.jl 79.36% <100.00%> (+1.03%) :arrow_up:
GiggleLiu commented 1 year ago

A quick update: The doc building issue is related to: https://github.com/JuliaDocs/Documenter.jl/pull/2194

There are two types of errors relevant.