seldonian.models.objectives

Objective functions

Functions

Error_Rate(model, theta, X, Y, **kwargs)

Calculate mean error rate over the whole sample.

False_Negative_Rate(model, theta, X, Y, **kwargs)

Calculate probabilistic mean false negative rate over the whole sample.

False_Positive_Rate(model, theta, X, Y, **kwargs)

Calculate probabilistic mean false positive rate over the whole sample.

IS_estimate(model, theta, episodes, **kwargs)

Calculate the vanilla importance sampling estimate using all episodes.

Mean_Error(model, theta, X, Y, **kwargs)

Calculate mean error (y_hat-y) over the whole sample

Mean_Squared_Error(model, theta, X, Y, **kwargs)

Calculate mean squared error over the whole sample

Negative_Rate(model, theta, X, Y, **kwargs)

Calculate mean negative rate for the whole sample.

PDIS_estimate(model, theta, episodes, **kwargs)

Calculate per-decision importance sampling (PDIS) estimate using all episodes.

Positive_Rate(model, theta, X, Y, **kwargs)

Calculate mean positive rate for the whole sample.

True_Negative_Rate(model, theta, X, Y, **kwargs)

Calculate mean true negative rate for the whole sample.

True_Positive_Rate(model, theta, X, Y, **kwargs)

Calculate mean true positive rate for the whole sample.

US_estimate(model, theta, episodes, **kwargs)

Get the expected return of the PRIMARY reward for behavior episodes whose actions (cr,cf) fall within the theta bounding box.

WIS_estimate(model, theta, episodes, **kwargs)

Calculate the weighted importance sampling (WIS) estimate using all episodes.

binary_logistic_loss(model, theta, X, Y, ...)

Calculate mean logistic loss over all data points for binary classification

confusion_matrix(model, theta, X, Y, l_i, ...)

Get the mean probability of predicting class label l_k if the true class label was l_i. This is the C[l_i,l_k] element of the confusion matrix, C. Let: i = number of datapoints j = number of features (including bias term, if provied) k = number of classes.

gradient_Bounded_Squared_Error(model, theta, ...)

Analytical gradient of the bounded squared error (BSE)

gradient_Mean_Squared_Error(model, theta, X, ...)

Gradient of the mean squared error w.r.t.

gradient_binary_logistic_loss(model, theta, ...)

Gradient of binary logistic loss w.r.t.

multiclass_logistic_loss(model, theta, X, Y, ...)

Calculate mean logistic loss over all data points for multi-class classification