validate#
- tpcp.validate.validate(pipeline: PipelineT, dataset: DatasetT, *, scoring: Callable[[PipelineT, DatasetT], float | Aggregator[Any] | dict[str, float | Aggregator[Any]]] | Scorer[PipelineT, DatasetT], n_jobs: int | None = None, verbose: int = 0, pre_dispatch: str | int = '2*n_jobs', progress_bar: bool = True) dict[str, Any] [source]#
Evaluate a pipeline on a dataset without any optimization.
- Parameters:
- pipeline
A
Pipeline
to evaluate on the given data.- dataset
A
Dataset
containing all information.- scoring
A callable that can score a single data point given a pipeline. This function should return either a single score or a dictionary of scores.
- n_jobs
Number of jobs to run in parallel. One job is created per datapoint. The default (
None
) means 1 job at the time, hence, no parallel computing.- verbose
The verbosity level (larger number -> higher verbosity). At the moment this only effects
Parallel
.- pre_dispatch
The number of jobs that should be pre dispatched. For an explanation see the documentation of
Parallel
.- progress_bar
True/False to enable/disable a
tqdm
progress bar.
Examples using tpcp.validate.validate
#
Validation
Custom Scorer