Esempio n. 1
0
        public void IsCompatibleReturnsFalseForDifferentSubSampleRatio()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new GenomePredictionRandomForestConfig.GenomePredictionRandomForestConfigBuilder()
                                .SetSubSampleRatio(defaultConfig.SubSampleRatio + 0.1)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 2
0
        public void IsTechnicallyCompatibleReturnsFalseForDifferentTreeCount()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new GenomePredictionRandomForestConfig.GenomePredictionRandomForestConfigBuilder()
                                .SetTreeCount(defaultConfig.TreeCount + 1)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckTechnicalIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 3
0
        public void IsTechnicallyCompatibleReturnsFalseForDifferentIncumbentFocus()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetFocusOnIncumbent(!defaultConfig.FocusOnIncumbent)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckTechnicalIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 4
0
        public void IsCompatibleReturnsFalseForDifferentRunParallelFlag()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new GenomePredictionRandomForestConfig.GenomePredictionRandomForestConfigBuilder()
                                .SetRunParallel(!defaultConfig.RunParallel)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 5
0
        public void IsTechnicallyCompatibleReturnsFalseForIncumbentFocusWithDifferentMinimumDomainSize()
        {
            var focusedConfig = this._builder.SetFocusOnIncumbent(true).BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetMinimumDomainSize(focusedConfig.MinimumDomainSize + 1)
                                .BuildWithFallback(focusedConfig);

            ConfigurationBaseTest.CheckTechnicalIncompatibility(focusedConfig, otherConfig);
        }
Esempio n. 6
0
        public void IsCompatibleReturnsFalseForDifferentInitialStepSize()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetInitialStepSize(defaultConfig.InitialStepSize + 0.02)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 7
0
        public void IsCompatibleReturnsFalseForDifferentFixInstancesFlags()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetFixInstances(!defaultConfig.FixInstances)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 8
0
        public void IsCompatibleReturnsFalseForIncumbentFocusWithDifferentReplacementRate()
        {
            var focusedConfig = this._builder.SetFocusOnIncumbent(true).BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetReplacementRate(focusedConfig.ReplacementRate + 0.1)
                                .BuildWithFallback(focusedConfig);

            ConfigurationBaseTest.CheckIncompatibility(focusedConfig, otherConfig);
        }
Esempio n. 9
0
        public void IsCompatibleReturnsFalseForDifferentMaximumNumberGenerations()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new CovarianceMatrixAdaptationStrategyConfiguration.CovarianceMatrixAdaptationStrategyConfigurationBuilder()
                                .SetMaximumNumberGenerations(defaultConfig.MaximumNumberGenerations - 1)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
        public void IsCompatibleReturnsFalseForDifferentLearningRate()
        {
            var defaultConfig = this._builder.BuildWithFallback(null);
            var otherConfig   = new DifferentialEvolutionConfiguration.DifferentialEvolutionConfigurationBuilder()
                                .SetLearningRate(defaultConfig.LearningRate + 0.01)
                                .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 11
0
        public void IsTechnicallyCompatibleReturnsFalseForDifferentMinimumDomainSize()
        {
            var defaultConfig = this._builder
                                .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                                .BuildWithFallback(null);
            var otherConfig = new DifferentialEvolutionStrategyConfiguration.DifferentialEvolutionStrategyConfigurationBuilder()
                              .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                              .SetMinimumDomainSize(defaultConfig.MinimumDomainSize + 1)
                              .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckTechnicalIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 12
0
        public void IsCompatibleReturnsFalseForDifferentFocusOnIncumbentFlags()
        {
            var defaultConfig = this._builder
                                .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                                .BuildWithFallback(null);
            var otherConfig = new DifferentialEvolutionStrategyConfiguration.DifferentialEvolutionStrategyConfigurationBuilder()
                              .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                              .SetFocusOnIncumbent(!defaultConfig.FocusOnIncumbent)
                              .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 13
0
        public void IsCompatibleReturnsFalseForDifferentMaximumNumberGenerations()
        {
            var defaultConfig = this._builder
                                .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                                .BuildWithFallback(null);
            var otherConfig = new DifferentialEvolutionStrategyConfiguration.DifferentialEvolutionStrategyConfigurationBuilder()
                              .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                              .SetMaximumNumberGenerations(defaultConfig.MaximumNumberGenerations - 1)
                              .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }
Esempio n. 14
0
        public void IsCompatibleReturnsFalseForIncumbentFocusWithDifferentReplacementRate()
        {
            var localConfig = this._builder
                              .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                              .SetFocusOnIncumbent(true)
                              .BuildWithFallback(null);
            var otherConfig = new DifferentialEvolutionStrategyConfiguration.DifferentialEvolutionStrategyConfigurationBuilder()
                              .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                              .SetReplacementRate(localConfig.ReplacementRate + 0.1)
                              .BuildWithFallback(localConfig);

            ConfigurationBaseTest.CheckIncompatibility(localConfig, otherConfig);
        }
Esempio n. 15
0
        public void IsCompatibleReturnsFalseForIncompatibleDifferentialEvolutionConfigurationBuilders()
        {
            var defaultConfig = this._builder
                                .SetDifferentialEvolutionConfigurationBuilder(this._defaultDifferentialEvolutionConfigurationBuilder)
                                .BuildWithFallback(null);

            var incompatibleDifferentialEvolutionConfigurationBuilder = this._defaultDifferentialEvolutionConfigurationBuilder
                                                                        .SetBestPercentage(this._defaultDifferentialEvolutionConfigurationBuilder.BuildWithFallback(null).BestPercentage + 0.01);
            var otherConfig = new DifferentialEvolutionStrategyConfiguration.DifferentialEvolutionStrategyConfigurationBuilder()
                              .SetDifferentialEvolutionConfigurationBuilder(incompatibleDifferentialEvolutionConfigurationBuilder)
                              .BuildWithFallback(defaultConfig);

            ConfigurationBaseTest.CheckIncompatibility(defaultConfig, otherConfig);
        }