eqdisco.knowledge.ShapeConstraint#
- class eqdisco.knowledge.ShapeConstraint(kind, variable=None, lower=None, upper=None, domain=None)[source]#
Bases:
objectA constraint on the model or on one of its partial derivatives.
- Parameters:
- kind{“increasing”, “decreasing”, “convex”, “concave”, “nonnegative”, “nonpositive”, “bounded”}
increasing: \(\partial f/\partial x_j\ge 0\);convex: \(\partial^2 f/\partial x_j^2\ge0\);nonnegative: \(f\ge 0\);bounded:lower\(\le f\le\)upper.- variable
strorint,optional The variable of the derivative (not needed for value constraints).
- lower, upper
float,optional Bounds of
bounded.- domain
tupleofarrays,optional (lower_corner, upper_corner)of the box on which the constraint must hold; default: the range of the training data.