ertk.train.CrossValidationConfig

class ertk.train.CrossValidationConfig(part: str | None = None, kfold: int = '???', test_size: float = 0.2)

Bases: ERTKConfig

Class to hold cross-validation configuration.

__init__(part: str | None = None, kfold: int = '???', test_size: float = 0.2) None

Methods

__init__([part, kfold, test_size])

Inherited Methods

from_config(config)

Create config object from any compatible config.

from_file(path[, override])

Create config from YAML file and optionlly override some values.

merge_with_args([args])

Merge config with command-line arguments.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

kfold

Number of folds for cross-validation.

part

Partition to use for cross-validation.

test_size

Fraction of data to use for testing.

kfold: int = '???'

Number of folds for cross-validation.

part: str | None = None

Partition to use for cross-validation. If not given, then cross-validation is performed over instances instead of groups.

test_size: float = 0.2

Fraction of data to use for testing. This is only used if kfold is 1.