chrism0dwk / covid19uk

MIT License
11 stars 10 forks source link

Switch to `tfd_e.MultivariateNormalPrecisionFactorLinearOperator` #21

Open chrism0dwk opened 3 years ago

chrism0dwk commented 3 years ago

Potential speed improvement, cutting out an explicit matrix inverse.

chrism0dwk commented 3 years ago

@csuter Smooth switch to tfp.experimental.distributions.MultivariateNormalPrecisionFactorLinearOperator here, but seeing warnings:

WARNING:tensorflow:Using (possibly slow) default implementation of determinant. Requires conversion to a dense matrix and O(N^3) operations.

I guess this is reasonable, though unavoidable?

csuter commented 3 years ago

Use LinearOperatorLowerTriangular for the precision factor to avoid this.