luz.scorers module¶
- class CrossValidation(num_folds, val_fraction=None, fold_seed=None, shuffle=True)¶
Bases:
luz.scorers.Scorer
Object which scores a learning algorithm using cross validation.
- Parameters
num_folds (
int
) – Number of cross validation folds.val_fraction (
Optional
[int
]) – Fraction of data to use as a validation set, by default None.fold_seed (
Optional
[int
]) – Seed for random fold split, by default None.shuffle (
Optional
[bool
]) – If True, shuffle dataset before splitting into folds; by default True.
- score(learner, dataset, device='cpu')¶
Learn a model and estimate its future performance using cross validation.
- class Holdout(test_fraction, val_fraction=None)¶
Bases:
luz.scorers.Scorer
Object which scores a learning algorithm using the holdout method.
- Parameters
test_fraction (
float
) – Fraction of data to use as a test set for scoring.val_fraction (
Optional
[float
]) – Fraction of data to use as a validation set, by default None.
- score(learner, dataset, device='cpu')¶
Learn a model and estimate its future performance using the holdout method.