/// <summary> /// Regression model selecting EnsembleLearner. /// Trains several models and selects the best subset of models for the ensemble. /// The selection of the best set of models is based on cross validation. /// http://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf /// </summary> /// <param name="learners">Learners in the ensemble</param> /// <param name="crossValidation">Cross validation method</param> /// <param name="ensembleStrategy">Strategy on how to combine the models</param> /// <param name="ensembleSelection">Ensemble selection method used to find the beset subset of models</param> public RegressionModelSelectingEnsembleLearner( IIndexedLearner <double>[] learners, ICrossValidation <double> crossValidation, IRegressionEnsembleStrategy ensembleStrategy, IRegressionEnsembleSelection ensembleSelection) : this(learners, crossValidation, () => ensembleStrategy, ensembleSelection) { }
/// <summary> /// Regression model selecting EnsembleLearner. /// Trains several models and selects the best subset of models for the ensemble. /// The selection of the best set of models is based on cross validation. /// Trains several models and selects the best subset of models for the ensemble. /// http://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf /// </summary> /// <param name="learners">Learners in the ensemble</param> /// <param name="crossValidation">Cross validation method</param> /// <param name="ensembleStrategy">Strategy on how to combine the models</param> /// <param name="ensembleSelection">Ensemble selection method used to find the beset subset of models</param> public RegressionModelSelectingEnsembleLearner( IIndexedLearner <double>[] learners, ICrossValidation <double> crossValidation, Func <IRegressionEnsembleStrategy> ensembleStrategy, IRegressionEnsembleSelection ensembleSelection) { m_learners = learners ?? throw new ArgumentNullException(nameof(learners)); m_crossValidation = crossValidation ?? throw new ArgumentNullException(nameof(crossValidation)); m_ensembleStrategy = ensembleStrategy ?? throw new ArgumentNullException(nameof(ensembleStrategy)); m_ensembleSelection = ensembleSelection ?? throw new ArgumentNullException(nameof(ensembleSelection)); }
/// <summary> /// Regression model selecting EnsembleLearner. /// Trains several models and selects the best subset of models for the ensemble. /// The selection of the best set of models is based on cross validation. /// Trains several models and selects the best subset of models for the ensemble. /// http://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf /// </summary> /// <param name="learners">Learners in the ensemble</param> /// <param name="crossValidation">Cross validation method</param> /// <param name="ensembleStrategy">Strategy on how to combine the models</param> /// <param name="ensembleSelection">Enemble selection method used to find the beset subset of models</param> public RegressionModelSelectingEnsembleLearner(IIndexedLearner <double>[] learners, ICrossValidation <double> crossValidation, Func <IRegressionEnsembleStrategy> ensembleStrategy, IRegressionEnsembleSelection ensembleSelection) { if (learners == null) { throw new ArgumentNullException("learners"); } if (crossValidation == null) { throw new ArgumentNullException("crossValidation"); } if (ensembleStrategy == null) { throw new ArgumentNullException("ensembleStrategy"); } if (ensembleSelection == null) { throw new ArgumentNullException("ensembleSelection"); } m_learners = learners; m_crossValidation = crossValidation; m_ensembleStrategy = ensembleStrategy; m_ensembleSelection = ensembleSelection; }