CrossValidator.lpo constructor

CrossValidator.lpo(
  1. DataFrame samples,
  2. int p, {
  3. DType dtype = dTypeDefaultValue,
})

Creates a LPO validator to evaluate the quality of a ML model.

It splits a dataset into all possible test sets of size p and evaluates the quality of a model on each produced test set.

Parameters:

samples A dataset that is going to be split into parts to iteratively evaluate on them a model's performance

p A size of a part of samples in rows.

dtype A type for all the numerical data.

Implementation

factory CrossValidator.lpo(
  DataFrame samples,
  int p, {
  DType dtype = dTypeDefaultValue,
}) {
  initModelSelectionModule();

  final dataSplitterFactory =
      modelSelectionInjector.get<SplitIndicesProviderFactory>();
  final dataSplitter =
      dataSplitterFactory.createByType(SplitIndicesProviderType.lpo, p: p);

  return CrossValidatorImpl(
    samples,
    dataSplitter,
    dtype,
  );
}