|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.Operator
edu.udo.cs.yale.operator.OperatorChain
edu.udo.cs.yale.operator.validation.ValidationChain
public abstract class ValidationChain
Abstract superclass of operator chains that split an ExampleSet into
a training and test set and return a performance vector. The two inner
operators must be a learner returning a Model and an operator or
operator chain that can apply this model and returns a
PerformanceVector. Hence the second inner operator usually is an
operator chain containing a model applier and a performance evaluator.
| Field Summary | |
|---|---|
private PerformanceCriterion |
lastPerformance
|
private IOContainer |
learnResult
|
| Constructor Summary | |
|---|---|
ValidationChain(OperatorDescription description)
|
|
| Method Summary | |
|---|---|
IOObject[] |
apply()
Applies all inner operators. |
abstract IOObject[] |
estimatePerformance(ExampleSet inputSet)
This is the main method of the validation chain and must be implemented to estimate a performance of inner operators on the given example set. |
protected IOContainer |
evaluate(ExampleSet testSet)
Applies the applier and evaluator (= second encapsulated inner operator). |
private Operator |
getEvaluator()
Returns the second encapsulated inner operator (or operator chain), i.e. |
InnerOperatorCondition |
getInnerOperatorCondition()
Must return a condition of the IO behaviour of all desired inner operators. |
java.lang.Class[] |
getInputClasses()
Returns the the classes this operator provides as output. |
InputDescription |
getInputDescription(java.lang.Class cls)
The default implementation returns an input description that consumes the input IOObject without a user parameter. |
private Operator |
getLearner()
Returns the first encapsulated inner operator (or operator chain), i.e. |
int |
getMaxNumberOfInnerOperators()
Returns the maximum number of innner operators. |
int |
getMinNumberOfInnerOperators()
Returns the minimum number of innner operators. |
int |
getNumberOfSteps()
Returns getNumberOfValidationSteps() * getNumberOfChildrensSteps() + 1. |
abstract int |
getNumberOfValidationSteps()
Returns the number of validation steps, i.e. the number of times the inner operators of this validation chain are performed. |
java.lang.Class[] |
getOutputClasses()
Returns the the classes this operator expects as input. |
java.util.List<ParameterType> |
getParameterTypes()
Returns a list of ParameterTypes describing the parameters of this operator. |
protected IOContainer |
learn(ExampleSet trainingSet)
Applies the learner (= first encapsulated inner operator). |
protected void |
setResult(PerformanceCriterion pc)
Can be used by subclasses to set the performance of the example set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private PerformanceCriterion lastPerformance
private IOContainer learnResult
| Constructor Detail |
|---|
public ValidationChain(OperatorDescription description)
| Method Detail |
|---|
public abstract int getNumberOfValidationSteps()
public abstract IOObject[] estimatePerformance(ExampleSet inputSet)
throws OperatorException
OperatorExceptionpublic int getMaxNumberOfInnerOperators()
getMaxNumberOfInnerOperators in class OperatorChainpublic int getMinNumberOfInnerOperators()
getMinNumberOfInnerOperators in class OperatorChainpublic InputDescription getInputDescription(java.lang.Class cls)
Operator
getInputDescription in class Operatorpublic java.lang.Class[] getInputClasses()
getInputClasses in class Operatorpublic java.lang.Class[] getOutputClasses()
getOutputClasses in class Operatorpublic InnerOperatorCondition getInnerOperatorCondition()
OperatorChainSimpleChainInnerOperatorCondition. More than one
condition should be combined with help of the class
CombinedInnerOperatorCondition.
getInnerOperatorCondition in class OperatorChainprivate Operator getLearner()
private Operator getEvaluator()
protected void setResult(PerformanceCriterion pc)
public IOObject[] apply()
throws OperatorException
OperatorChainOperatorChain.clearStepCounter().
apply in class OperatorChainOperatorException
protected IOContainer learn(ExampleSet trainingSet)
throws OperatorException
OperatorException
protected IOContainer evaluate(ExampleSet testSet)
throws OperatorException
testSet
before and after applying the inner operator. If it changed, the
predicted label is removed again. No outer operator could ever see it.
The same applies for the confidence attributes in case of classification
learning.
OperatorExceptionpublic int getNumberOfSteps()
getNumberOfSteps in class OperatorChainpublic java.util.List<ParameterType> getParameterTypes()
Operator
getParameterTypes in class Operator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||