seldonian.models.trees.skrandomforest_model.sklearn_predict_vjp¶
- sklearn_predict_vjp(ans, theta, X, model)¶
Do a backward pass through the Sklearn model, obtaining the Jacobian d pred / dtheta. Must convert back to numpy array before returning
- Parameters:
ans (numpy ndarray) – The result from the forward pass
theta (numpy ndarray) – model weights
X (numpy ndarray) – model features
model – An instance of the SeldonianRandomForest model
- Return fn:
A function representing the vector Jacobian operator