Right now, only oneFunctionData field can be a pint.Quantity. It would be useful for the entire cost function API to be compatible with Pint units, including all FunctionData fields.
To go one step further, we might even validate the units of the FunctionData fields in relation to each other: for instance, for QuadraticFunctionData, there must exist some units Y and X such that constant_term has units Y, proportional_term has units Y/X, and quadratic_term has units Y/X^2. This is less important though.
Right now, only one
FunctionData
field can be apint.Quantity
. It would be useful for the entire cost function API to be compatible with Pint units, including allFunctionData
fields.To go one step further, we might even validate the units of the
FunctionData
fields in relation to each other: for instance, forQuadraticFunctionData
, there must exist some units Y and X such thatconstant_term
has units Y,proportional_term
has units Y/X, andquadratic_term
has units Y/X^2. This is less important though.