/* * File: SupervisedLearnerValidationExperiment.java * Authors: Justin Basilico * Company: Sandia National Laboratories * Project: Cognitive Foundry * * Copyright December 18, 2007, Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the U.S. Government. Export * of this program may require a license from the United States Government. * See CopyrightHistory.txt for complete details. * * */ package gov.sandia.cognition.learning.experiment; import gov.sandia.cognition.evaluator.Evaluator; import gov.sandia.cognition.learning.data.InputOutputPair; import gov.sandia.cognition.learning.performance.PerformanceEvaluator; import gov.sandia.cognition.util.Summarizer; import java.util.Collection; /** * The {@code SupervisedLearnerValidationExperiment} class extends the * {@code LearnerValidationExperiment} class to provide a easy way to create * a learner validation experiment for supervised learning. * * @param <InputType> The type of the input data for supervised learning. * @param <OutputType> The type of the output data for supervised learning. * @param <StatisticType> The type of the statistic generated by the * performance evaluator on the learned object for each fold. It is * created by passing the learned object plus the test data for the * fold into the performance evaluator. * @param <SummaryType> The type produced by the summarizer at the end of * the experiment from a collection of the given statistics (one for * each fold). This represents the performance result for the learning * algorithm for the whole experiment. * @author Justin Basilico * @since 2.0 */ public class SupervisedLearnerValidationExperiment<InputType, OutputType, StatisticType, SummaryType> extends LearnerValidationExperiment<InputOutputPair<InputType, OutputType>, InputOutputPair<InputType, OutputType>, Evaluator<? super InputType, OutputType>, StatisticType, SummaryType> { /** * Creates a new instance of {@code SupervisedLearnerValidationExperiment}. */ public SupervisedLearnerValidationExperiment() { this(null, null, null); } /** * Creates a new instance of {@code SupervisedLearnerValidationExperiment}. * * @param foldCreator The object to use for creating the folds. * @param performanceEvaluator The evaluator to use to compute the * performance of the learned object on each fold. * @param summarizer The summarizer for summarizing the result of the * performance evaluator from all the folds. */ public SupervisedLearnerValidationExperiment( final ValidationFoldCreator<InputOutputPair<InputType, OutputType>, InputOutputPair<InputType, OutputType>> foldCreator, final PerformanceEvaluator<? super Evaluator<? super InputType, ? extends OutputType>, ? super Collection<? extends InputOutputPair<InputType, OutputType>>, ? extends StatisticType> performanceEvaluator, final Summarizer<? super StatisticType, ? extends SummaryType> summarizer) { super(foldCreator, performanceEvaluator, summarizer); } }