public void MeanRegressionEnsembleStrategy_Combine() { var sut = new MeanRegressionEnsembleStrategy(); var values = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0 }; var actual = sut.Combine(values); Assert.AreEqual(3.0, actual, 0.001); }
public void RegressionModelSelectingEnsembleLearner_Constructor_CrossValidation_Null() { var learners = new IIndexedLearner <double> [4]; var metric = new MeanSquaredErrorRegressionMetric(); var ensembleStrategy = new MeanRegressionEnsembleStrategy(); var ensembleSelection = new ForwardSearchRegressionEnsembleSelection(metric, ensembleStrategy, 5, 1, true); var sut = new RegressionModelSelectingEnsembleLearner(learners, null, ensembleStrategy, ensembleSelection); }
public void RegressionModelSelectingEnsembleLearner_Constructor_EnsembleSelection_Null() { var learners = new IIndexedLearner <double> [4]; var metric = new MeanSquaredErrorRegressionMetric(); var ensembleStrategy = new MeanRegressionEnsembleStrategy(); var crossValidation = new RandomCrossValidation <double>(5); var sut = new RegressionModelSelectingEnsembleLearner(learners, crossValidation, ensembleStrategy, null); }
public void RegressionModelSelectingEnsembleLearner_Constructor_Learners_Null() { var metric = new MeanSquaredErrorRegressionMetric(); var ensembleStrategy = new MeanRegressionEnsembleStrategy(); var ensembleSelection = new ForwardSearchRegressionEnsembleSelection(metric, ensembleStrategy, 5, 1, true); var crossValidation = new RandomCrossValidation <double>(5); var sut = new RegressionModelSelectingEnsembleLearner(null, crossValidation, ensembleStrategy, ensembleSelection); }