-
Notifications
You must be signed in to change notification settings - Fork 7
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
FormulaGrader Enhancements: Non-scalar formulas #31
Comments
If we want to continue using the same parser/evaluator for all math graders, which I think we do, then I suggest we just roll all of these enhancements into the existing FormulaGrader class. I have also looked into whether it makes sense to use an alternative math parser, rather than the one in calc.py. For example, |
I like 1, 2, and 3. They should fit into the current framework straightforwardly. 4 will be much, much harder, and I suggest we put it on the backburner for the moment. I'm happy to discuss each of 1-3 in individual issues. I like the idea of keeping things in FormulaGrader. All of these ideas are enhancements there, and shouldn't necessitate a separate grading class. I agree that keeping our own version of calc.py at this stage sounds good. |
For me, I am really only interested in having something like 4. I think that this is in some sense already done in Ike's calc library, and we should consider using existing frameworks. Or maybe pyzo? |
I'm going to go ahead and close this. Everything discussed in this issue and associated comments has been implemented. Some associated bits and pieces that remain are discussed in #78. |
The following are some enhancements to FormulaGrader related to handling non-scalar expressions. Some of these were discussed as summer projects for Chris.
Matrix/Vector Sampling: In formulas like
a*b
, samplea
andb
from vectors instead of scalars. Useful for grading any non-commutative mathematical expressions. Also possibly useful for specific matrices, like grading Pauli matrix identities in a quantum mechanics course.Implementation Difficulty: Straightforward and fast... 1 day for an initial PR?
[Implemented in FormulaGrader comparer key #32] Custom Comparer functions: Currently correctness is determined by comparing student's input and author's answer using approximate equality. Allow author to pass an alternative comparer function. Examples: compare modulo 2π, compare whether expressions are parallel, compare whether student's input is in the span of some other vectors.
Same as Function application post computation #30.
Implementation Difficulty: Straightforward and fast... 1 day for an initial PR?
[Implemented in Implementing multi-argument functions and fixing exponentiation issue #59] Parse/Eval Multivariable: Parse functions with multiple variables, e.g.,
f(x, y) + g(x)*y^2
Implementation Difficulty: A bit harder. Minor changes to parser and evaluator
[Implemented in Allow vectors/matrices in parser #61] Parse/Eval Vectors and Matrices: Parse and evaluate expressions like
A*[1,2,3] + b
whereA
is a matrix andb
a vector, or[1, x]/sqrt(1 + x^2)
. Jen has wanted this for linear algebra courses and it could be useful in physics, too. (Although, I suspect that physics prefers Dirac bra-ket notation).Implementation Difficulty: Much harder. Significant changes to parser and evaluator
If necessary, we can discuss each of these in-depth in its own issue. Current question:
Question: Should these enhancements all be rolled up into FormulaGrader? Or should the matrix-related enhancements be part of a new grader class?
The text was updated successfully, but these errors were encountered: