bias_variance_parallel

bias_variance_compute_parallel(estimator, X_train, y_train, X_test, y_test, prepare_X=<function <lambda>>, prepare_y_train=<function <lambda>>, iterations=200, random_state=None, decomp_fn=<function bias_variance_mse>, fit_kwargs=None, predict_kwargs=None)[source]

Compute the bias-variance decomposition in parallel

Parameters:
  • estimator (EstimatorWrapper) – estimator wrapped with a class extending EstimatorWrapper

  • X_train – features for training

  • y_train – ground truth labels for training

  • X_test – features for testing

  • y_test – ground truth labels for testing

  • prepare_X (function, optional) – function to transform feature datasets before calling fit and predict methods

  • prepare_y_train (function, optional) – function to transform training ground truth labels before calling fit method

  • iterations (int, optional) – number of iterations for the training/testing

  • random_state (int, optional) – random state for bootstrap sampling

  • decomp_fn (function, optional) – bias-variance decomposition function

  • fit_kwargs (dict, optional) – kwargs to pass to the fit method

  • predict_kwargs (dict, optional) – kwargs to pass to the predict method

Returns:

(average loss, average bias, average variance, net variance)