TensorBFS / TensorInference.jl

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

Port GenericTensorNetworks #57

Closed GiggleLiu closed 1 year ago

GiggleLiu commented 1 year ago
  1. Convert a GraphProblem to a TensorNetworkModel or a MMAPModel
  2. Allows setting unity tensors manually with the flexibility to compute joint marginal probabilities.

We can solve a set of inference problems on a collection of combinatorial optimization problems now, cheers!

codecov[bot] commented 1 year ago

Codecov Report

Merging #57 (3059164) into main (2615430) will increase coverage by 0.65%. The diff coverage is 96.15%.

@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   81.59%   82.24%   +0.65%     
==========================================
  Files           9       10       +1     
  Lines         489      507      +18     
==========================================
+ Hits          399      417      +18     
  Misses         90       90              
Files Changed Coverage Δ
src/mar.jl 94.54% <50.00%> (-0.10%) :arrow_down:
src/Core.jl 46.29% <100.00%> (ø)
src/TensorInference.jl 100.00% <100.00%> (ø)
src/generictensornetworks.jl 100.00% <100.00%> (ø)
src/map.jl 100.00% <100.00%> (ø)
GiggleLiu commented 1 year ago

mars is a vector containing vectors of variables. Each inner vector is a set of variables for computing joint marginal probability distribution.

To make it distinct from openvars, I use mars rather than marvars.