jsvmstruct
Class LearningProblem<PatternType,LabelType>
java.lang.Object
jsvmstruct.LearningProblem<PatternType,LabelType>
public abstract class LearningProblem<PatternType,LabelType>
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
structParams
protected StructLearnParam structParams
structModel
protected StructModel structModel
LearningProblem
public LearningProblem()
readStructExamples
public abstract Example<PatternType,LabelType>[] readStructExamples(String filename)
throws Throwable
- Throws:
Throwable
initStructModel
public abstract void initStructModel(Example<PatternType,LabelType>[] sample)
throws Throwable
- Throws:
Throwable
initStructConstraints
public Constraint[] initStructConstraints()
throws Throwable
- Throws:
Throwable
classifyStructExample
public abstract LabelType classifyStructExample(PatternType x)
throws Throwable
- Throws:
Throwable
findMostViolatedConstraint
public abstract LabelType findMostViolatedConstraint(PatternType x,
LabelType y)
throws Throwable
- Throws:
Throwable
psi
public abstract FeatureVector psi(PatternType x,
LabelType y)
throws Throwable
- Throws:
Throwable
loss
public double loss(LabelType y,
LabelType ybar)
throws Throwable
- Throws:
Throwable
printStructLearningStats
public void printStructLearningStats(Example<PatternType,LabelType>[] sample,
Constraint[] cset,
double[] alpha)
throws Throwable
- Throws:
Throwable
writeStructModel
public void writeStructModel(String file)
throws Throwable
- Throws:
Throwable
readStructModel
public StructModel readStructModel(String file)
throws Throwable
- Throws:
Throwable
printStructHelp
public void printStructHelp()
parseStructParameters
public void parseStructParameters()
throws Throwable
- Throws:
Throwable
test
public void test(String[] argv)
throws Throwable
- Throws:
Throwable