示例#1
0
        private ExperimentResult <TMetrics> ExecuteCrossValSummary(IDataView[] trainDatasets,
                                                                   ColumnInformation columnInfo,
                                                                   IDataView[] validationDatasets,
                                                                   IEstimator <ITransformer> preFeaturizer,
                                                                   IProgress <RunDetail <TMetrics> > progressHandler)
        {
            columnInfo = columnInfo ?? new ColumnInformation();
            UserInputValidationUtil.ValidateExperimentExecuteArgs(trainDatasets[0], columnInfo, validationDatasets[0], _task);

            // Apply pre-featurizer
            ITransformer[] preprocessorTransforms = null;
            (trainDatasets, validationDatasets, preprocessorTransforms) = ApplyPreFeaturizerCrossVal(trainDatasets, validationDatasets, preFeaturizer);

            var runner = new CrossValSummaryRunner <TMetrics>(Context, trainDatasets, validationDatasets, MetricsAgent, preFeaturizer,
                                                              preprocessorTransforms, columnInfo.GroupIdColumnName, columnInfo.LabelColumnName, OptimizingMetricInfo, _logger);
            var columns = DatasetColumnInfoUtil.GetDatasetColumnInfo(Context, trainDatasets[0], columnInfo);

            return(Execute(columnInfo, columns, preFeaturizer, progressHandler, runner));
        }