You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
One of the speed bottleneck in creating a FactorGraph is the time to create the variables_for_factors list, which is currently slow as we loop through the individual variables.
However, in the case where all the variable groups are NDVarArr we can speed up this step a lot proposing a generic get_factors interface where the user would define the general rule for the factors and the corresponding list would be generated with numba.
One options is to have a first argument which consists of variable groups for which we loop over dimensions, and a second argument which consists of variable groups for do not loop over,
For, example get_factors({x:(i, j), y:(k, l)}, {z:(i+k, j+l)}) would mean
factors = []
for i in range(x.shape[0]):
for j in range(x.shape[1]):
for k in range(y.shape[0]):
for l in range(y.shape[1]):
factors.append((x[i, j], y[k, l], z[i+k, j+l]))
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
One of the speed bottleneck in creating a
FactorGraph
is the time to create thevariables_for_factors
list, which is currently slow as we loop through the individual variables.However, in the case where all the variable groups are
NDVarArr
we can speed up this step a lot proposing a generic get_factors interface where the user would define the general rule for the factors and the corresponding list would be generated with numba.One options is to have a first argument which consists of variable groups for which we loop over dimensions, and a second argument which consists of variable groups for do not loop over,
For, example
get_factors({x:(i, j), y:(k, l)}, {z:(i+k, j+l)})
would meanThe text was updated successfully, but these errors were encountered: