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
In some cases, when an expression contains a summation applied over a product of several terms, the LaTeX representation of that expression may omit necessary brackets. To reproduce this issue, run this demo notebook down to the cells at the end. Here is a screenshot:
A visual check of the string representations of result_4 and expected_result shows that they are the same up to a permutation in the order of the terms in the products, and the notebook runs an assert_expr_equal that verifies the same. But the LaTeX representation of result_4 is misleading in that it appears that, in the numerator for example, the summation $\Sigma_{W_{1}}{\Sigma_{W_{2},X,Y}{\Sigma_{W_{3}}}}$ is applied to all three terms in the product, whereas in fact only $\Sigma_{W_{1}}$ is applied to all three terms, and $\Sigma_{W_{2},X,Y}{\Sigma_{W_{3}}}$ is applied only to the first term. To make this fact clear, the LaTeX representation needs to include the red brackets in the numerator in the screenshot. Similarly, there should be brackets around the entire expression following $\Sigma_{Y}{\Sigma_{W_{1}}}$ in the denominator.
The text was updated successfully, but these errors were encountered:
That's a good point. Latex output isn't strictly correct in terms of the math and would benefit from grouping symbols in some places to make it more "correct". We haven't done this since the current output more resembles what people write in the literature. Maybe a ruleset could be made for when grouping symbols increase legibility
In some cases, when an expression contains a summation applied over a product of several terms, the LaTeX representation of that expression may omit necessary brackets. To reproduce this issue, run this demo notebook down to the cells at the end. Here is a screenshot:
A visual check of the string representations of$\Sigma_{W_{1}}{\Sigma_{W_{2},X,Y}{\Sigma_{W_{3}}}}$ is applied to all three terms in the product, whereas in fact only $\Sigma_{W_{1}}$ is applied to all three terms, and $\Sigma_{W_{2},X,Y}{\Sigma_{W_{3}}}$ is applied only to the first term. To make this fact clear, the LaTeX representation needs to include the red brackets in the numerator in the screenshot. Similarly, there should be brackets around the entire expression following $\Sigma_{Y}{\Sigma_{W_{1}}}$ in the denominator.
result_4
andexpected_result
shows that they are the same up to a permutation in the order of the terms in the products, and the notebook runs anassert_expr_equal
that verifies the same. But the LaTeX representation ofresult_4
is misleading in that it appears that, in the numerator for example, the summationThe text was updated successfully, but these errors were encountered: