A naïve method for computing the partition function is therefore to evaluate The above would require calculating n determinants, resulting in O(n 4 ) complexity.
more concretely, this technique corresponds to defining the matrixL(θ) aŝ where diag(v) is the diagonal matrix with the vector v on its diagonal.