cc.mallet.grmm.learning
Class DefaultAcrfTrainer

java.lang.Object
  extended by cc.mallet.grmm.learning.DefaultAcrfTrainer
All Implemented Interfaces:
ACRFTrainer
Direct Known Subclasses:
PiecewiseACRFTrainer, PseudolikelihoodACRFTrainer, PwplACRFTrainer

public class DefaultAcrfTrainer
extends java.lang.Object
implements ACRFTrainer

Class for training ACRFs.

Created: Thu Oct 16 17:53:14 2003

Version:
$Id: DefaultAcrfTrainer.java,v 1.1 2007/10/22 21:37:43 mccallum Exp $
Author:
Charles Sutton

Nested Class Summary
static class DefaultAcrfTrainer.FileEvaluator
           
static class DefaultAcrfTrainer.LogEvaluator
           
static class DefaultAcrfTrainer.TestResults
           
 
Constructor Summary
DefaultAcrfTrainer()
           
 
Method Summary
protected  boolean callEvaluator(ACRF acrf, InstanceList trainingList, InstanceList validationList, InstanceList testSet, int iter, ACRFEvaluator eval)
           
protected  Optimizable.ByGradientValue createOptimizable(ACRF acrf, InstanceList trainingList)
           
 Optimizer getMaxer()
           
static java.util.Random getRandom()
           
 boolean incrementalTrain(ACRF acrf, InstanceList training, InstanceList validation, InstanceList testing, ACRFEvaluator eval, int numIter)
           
 boolean incrementalTrain(ACRF acrf, InstanceList training, InstanceList validation, InstanceList testing, int numIter)
           
static boolean isRethrowExceptions()
           
 void setMaxer(Optimizer maxer)
           
 void setOutputPrefix(java.io.File f)
           
static void setRethrowExceptions(boolean rethrowExceptions)
           
 boolean someUnsupportedTrain(ACRF acrf, InstanceList trainingList, InstanceList validationList, InstanceList testSet, ACRFEvaluator eval, int numIter)
           
 void test(ACRF acrf, InstanceList testing, ACRFEvaluator eval)
           
 void test(ACRF acrf, InstanceList testing, ACRFEvaluator[] evals)
           
 boolean train(ACRF acrf, InstanceList training)
           
 boolean train(ACRF acrf, InstanceList training, ACRFEvaluator eval, int numIter)
           
 void train(ACRF acrf, InstanceList training, InstanceList validation, InstanceList testing, ACRFEvaluator eval, double[] proportions, int iterPerProportion)
           
 boolean train(ACRF acrf, InstanceList trainingList, InstanceList validationList, InstanceList testSet, ACRFEvaluator eval, int numIter)
           
 boolean train(ACRF acrf, InstanceList trainingList, InstanceList validationList, InstanceList testSet, ACRFEvaluator eval, int numIter, Optimizable.ByGradientValue macrf)
           
 boolean train(ACRF acrf, InstanceList training, InstanceList validation, InstanceList testing, int numIter)
           
 boolean train(ACRF acrf, InstanceList training, int numIter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAcrfTrainer

public DefaultAcrfTrainer()
Method Detail

setOutputPrefix

public void setOutputPrefix(java.io.File f)

getMaxer

public Optimizer getMaxer()

setMaxer

public void setMaxer(Optimizer maxer)

isRethrowExceptions

public static boolean isRethrowExceptions()

setRethrowExceptions

public static void setRethrowExceptions(boolean rethrowExceptions)

train

public boolean train(ACRF acrf,
                     InstanceList training)
Specified by:
train in interface ACRFTrainer

train

public boolean train(ACRF acrf,
                     InstanceList training,
                     int numIter)
Specified by:
train in interface ACRFTrainer

train

public boolean train(ACRF acrf,
                     InstanceList training,
                     ACRFEvaluator eval,
                     int numIter)
Specified by:
train in interface ACRFTrainer

train

public boolean train(ACRF acrf,
                     InstanceList training,
                     InstanceList validation,
                     InstanceList testing,
                     int numIter)
Specified by:
train in interface ACRFTrainer

train

public boolean train(ACRF acrf,
                     InstanceList trainingList,
                     InstanceList validationList,
                     InstanceList testSet,
                     ACRFEvaluator eval,
                     int numIter)
Specified by:
train in interface ACRFTrainer

createOptimizable

protected Optimizable.ByGradientValue createOptimizable(ACRF acrf,
                                                        InstanceList trainingList)

incrementalTrain

public boolean incrementalTrain(ACRF acrf,
                                InstanceList training,
                                InstanceList validation,
                                InstanceList testing,
                                int numIter)

incrementalTrain

public boolean incrementalTrain(ACRF acrf,
                                InstanceList training,
                                InstanceList validation,
                                InstanceList testing,
                                ACRFEvaluator eval,
                                int numIter)

train

public boolean train(ACRF acrf,
                     InstanceList trainingList,
                     InstanceList validationList,
                     InstanceList testSet,
                     ACRFEvaluator eval,
                     int numIter,
                     Optimizable.ByGradientValue macrf)
Specified by:
train in interface ACRFTrainer

callEvaluator

protected boolean callEvaluator(ACRF acrf,
                                InstanceList trainingList,
                                InstanceList validationList,
                                InstanceList testSet,
                                int iter,
                                ACRFEvaluator eval)
Returns:
true means stop, false means keep going (opposite of evaluators... ugh!)

someUnsupportedTrain

public boolean someUnsupportedTrain(ACRF acrf,
                                    InstanceList trainingList,
                                    InstanceList validationList,
                                    InstanceList testSet,
                                    ACRFEvaluator eval,
                                    int numIter)

test

public void test(ACRF acrf,
                 InstanceList testing,
                 ACRFEvaluator eval)

test

public void test(ACRF acrf,
                 InstanceList testing,
                 ACRFEvaluator[] evals)

getRandom

public static java.util.Random getRandom()

train

public void train(ACRF acrf,
                  InstanceList training,
                  InstanceList validation,
                  InstanceList testing,
                  ACRFEvaluator eval,
                  double[] proportions,
                  int iterPerProportion)