mitodl / mitx-grading-library

The MITx Grading Library, a python grading library for edX
https://edge.edx.org/courses/course-v1:MITx+grading-library+examples/
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Separate class for grading vectors/matrices #71

Closed ChristopherChudzicki closed 6 years ago

ChristopherChudzicki commented 6 years ago

Related to #70

I suggest creating a subclass of FormulaGrader for grading vectors/matrices:

class ArrayFormulaGrader(FormulaGrader):
  # custom configuration schema
  # custom default functions and variables
  # shadows check_answer

Reasons to create a new ArrayFormulaGrader class for grading vectors/matrices:

jolyonb commented 6 years ago

Seems reasonable. I think we should aim for a single subclass of FormulaGrader where we load in the appropriate machinery. I don't want to have separate vector/matrix/tensor classes though. Add trace, det, and possibly a cross product to the list of functions to expose in this situation.

ChristopherChudzicki commented 6 years ago

I agree!

ChristopherChudzicki commented 6 years ago

@jfrench @jolyonb I'm adding defaults for MatrixFormulaGrader. Does anyone have strong feelings about names for the extra default functions?

none of these render nicely by default in Asciimath. (adjoint(A) is amusingly terrible in asciimath by default. Try to guess what it looks like ... )

Also if anyone has a name preference... ArrayFormulaGrader or MatrixFormulaGrader. (It would handle vector/matrix/tensor either way. Matrix maybe sounds nicer if is misleading.)

jolyonb commented 6 years ago

I'm in favor of trans rather than transpose. We don't ask people to type tangent or hyperboliccosine.

I prefer dagger to ctrans or ctranspose, but I am willing to go for adjoint.

I don't expect any of these to render nicely in asciimath, a priori, as asciimath doesn't know what any of them are, and will need to be taught. I'm actually not sure that they can be taught; I suspect that they'll need preprocessing. The adjoint rendering is really cute though at the moment!

I prefer MatrixFormulaGrader. Yes, slight misnomer, but sounds so much better.