def validation_target(self):
        """Get a `DatasetSentinel` representing an Experiment's `fold_validation_target`

        Returns
        -------
        DatasetSentinel:
            A `Sentinel` that will be converted to :attr:`hyperparameter_hunter.experiments.BaseExperiment.fold_validation_target`
            upon `Model` initialization"""
        return DatasetSentinel("validation_target", **self._dataset_sentinel_helper())
Esempio n. 2
0
    def holdout_target(self):
        """Get a `DatasetSentinel` representing an Experiment's `holdout_target_data`

        Returns
        -------
        DatasetSentinel:
            A `Sentinel` that will be converted to :attr:`hyperparameter_hunter.experiments.BaseExperiment.holdout_target_data`
            upon `Model` initialization"""
        return DatasetSentinel('holdout_target', self.cross_experiment_key.parameters['holdout_dataset'])
Esempio n. 3
0
def test_dataset_sentinel_validate_parameters(sentinel_parameters,
                                              error_match):
    """Ensure appropriate ValueErrors raised by `sentinels.DatasetSentinel._validate_parameters`"""
    with pytest.raises(ValueError, match=error_match):
        DatasetSentinel(*sentinel_parameters)