qualitylib.cross_validate.run_split

run_split(model_builder, feats, labels, test_mask, test_content_labels, eval_content_wise)[source]

Run one random cross-validation split

Parameters:
  • model_builder (Callable) – A callable that returns a new model object that contains the fit and predict methods.

  • feats (ndarray) – Input features

  • labels (ndarray) – Ground truth labels

  • test_mask (ndarray) – Boolean mask denoting test samples

  • test_content_labels (ndarray) – Labels denoting source content of each sample

  • eval_content_wise (bool) – Evaluaate accuracy for each content separately

Return type:

Dict[str, float]

Returns:

Accuracy stats