seldonian.utils.stats_utils

Functions

custom_cumprod(x)

Custom implementation of np.cumprod that works with autograd Source: https://github.com/HIPS/autograd/issues/257

default_supervised_initial_solution_fn(...)

A wrapper around model.fit() to use as the initial_solution_fn parameter to the spec.

softmax(x)

Calculate the softmax for a vector of values, x

stddev(v)

Sample standard deviation of the vector v, with Bessel's correction

tinv(p, nu)

Returns the inverse of Student's t CDF using the degrees of freedom in nu for the corresponding probabilities in p.

weighted_sum_gamma(arr[, gamma])

Calculate weighted sum of an array, where weights are gamma**(index of arr).