cobsurv.utils.index_calculator_helper#

cobsurv.utils.index_calculator_helper(i, pred_l, test_pred, n_estimators, alpha, epsilon, times, distance_func)#

A helper function for index_calculator, it is used for canculating the index of one row, i.e. one test data proximity to all training data

Parameters:
  • i (int) – The observation index

  • pred_l (3d array) – Predictions of all training data

  • test_pred (3d array) – Predictions of all test data

  • n_estimators (int) – number of estimators

  • alpha (int) – The number of base estimators to be in consensus

  • epsilon (float) – the proximity threshold

  • times (1d array) – The times at which the predictions are made

  • distance_func (function) – The distance function

Returns:

index_arr_row – The index of the test data to all observation in \(D_l\) which is in \(\epsilon,lpha)\) proximity

Return type:

1d array