-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break Up Moore Penrose Test Into Smaller Tests For Clarity and Ease of Debugging #284
Conversation
…efinition in the wiki more closely.
…c failure happens more precisely.
… ones to aid debugging of the errratic test.
@olekscode @SergeStinckwich We may have discovered the source of the problem:
I am unsure of the purpose of this test to be honest, and I propose removing the loop and changing the purpose of the test. |
a := PMMatrix rows: 3 columns: 3 random: 1.0. | ||
self assert: (a mpInverse closeTo: a inverse). | ||
a := PMSymmetricMatrix new: 4 random: 1.0. | ||
self assert: (a mpInverse closeTo: a inverse) ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeking a mathematician to help me in understand the needs of this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears, after splitting the testMoorePenroseInverse test up, this part was the source of the random test failure. I infer from the repetition that this may be some kind of exhaustive data-driven test. I've changed this so as to get a more deterministic test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Hemal !
| identityMatrix | | ||
"These two assertions are what define a pseudoinverse. They are known as | ||
the Moore–Penrose conditions of which there are four, but here we have two. The other two | ||
are that (A * A+) and A+ * A are Hermitian. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asserting that A x A+
is Hermitian failed, sadly.
a := PMMatrix rows: 3 columns: 3 random: 1.0. | ||
self assert: (a mpInverse closeTo: a inverse). | ||
a := PMSymmetricMatrix new: 4 random: 1.0. | ||
self assert: (a mpInverse closeTo: a inverse) ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Hemal !
Issue: #279
I have started by trying to improve clarity in the tests by breaking the test up into well named smaller ones. I hypothesise that it will pin point which scenario is failing.