seldonian.models.trees.sktree_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.

Parameters:
  • ans (numpy ndarray) – The result from the forward pass

  • theta (numpy ndarray) – model weights

  • X (numpy ndarray) – model features

  • model – An instance of a tree-based Seldonian model

Return fn:

A function representing the vector Jacobian operator