|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.TrainableClassifier
de.fu_berlin.ties.classify.winnow.Winnow
de.fu_berlin.ties.classify.winnow.UltraconservativeWinnow
public class UltraconservativeWinnow
A combination of Winnow with the "ultraconservative" approach proposed by Koby Crammer and Yoram Singer. In case of a loss (mistake) the target class is promoted and all classes whose score is greater than or equal to the target class (the "error set") are demoted.
Instances of this class are thread-safe.
Field Summary | |
---|---|
static String |
UC_SUFFIX
Optional prefix used to give values for the configuration parameters of this classifier that differ from the values used by Winnow. |
Fields inherited from class de.fu_berlin.ties.classify.TrainableClassifier |
---|
META_CLASSIFIER, MULTI_CLASSIFIER, OAR_CLASSIFIER |
Fields inherited from interface de.fu_berlin.ties.classify.Classifier |
---|
CONFIG_CLASSIFIER |
Constructor Summary | |
---|---|
UltraconservativeWinnow(Set<String> allValidClasses)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set<String> allValidClasses,
FeatureTransformer trans,
boolean balance,
float promotionFactor,
float demotionFactor,
float thresholdThick,
TiesConfiguration config,
String configSuffix)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set<String> allValidClasses,
FeatureTransformer trans,
TiesConfiguration config)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set<String> allValidClasses,
TiesConfiguration config)
Creates a new instance by delegating to the corresponding super constructor. |
Method Summary | |
---|---|
protected void |
chooseClassesToAdjust(WinnowDistribution winnowDist,
String targetClass,
Set<String> classesToPromote,
Set<String> classesToDemote)
Chooses the classes to promote and the classes to demote. |
Methods inherited from class de.fu_berlin.ties.classify.winnow.Winnow |
---|
adjustWeights, confidence, defaultWeight, doClassify, doTrain, featureSet, getDemotion, getPromotion, getThresholdThickness, initScores, initWeight, initWeightArray, isBalanced, majorThreshold, minorThreshold, rawThreshold, reset, sigmoid, threshold, toString, trainOnErrorHook, updateScores |
Methods inherited from class de.fu_berlin.ties.classify.TrainableClassifier |
---|
classify, createClassifier, createClassifier, createClassifier, createClassifier, getAllClasses, getConfig, shouldTrain, toElement, train, trainOnError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String UC_SUFFIX
Constructor Detail |
---|
public UltraconservativeWinnow(Set<String> allValidClasses) throws IllegalArgumentException, ProcessingException
allValidClasses
- the set of all valid classes
IllegalArgumentException
- if one of the parameters is outside
the allowed range
ProcessingException
- if an error occurred while creating
the feature transformer(s)public UltraconservativeWinnow(Set<String> allValidClasses, TiesConfiguration config) throws IllegalArgumentException, ProcessingException
allValidClasses
- the set of all valid classesconfig
- contains configuration properties
IllegalArgumentException
- if one of the parameters is outside
the allowed range
ProcessingException
- if an error occurred while creating
the feature transformer(s)public UltraconservativeWinnow(Set<String> allValidClasses, FeatureTransformer trans, TiesConfiguration config) throws IllegalArgumentException, ProcessingException
allValidClasses
- the set of all valid classestrans
- the last transformer in the transformer chain to use, or
null
if no feature transformers should be usedconfig
- contains configuration properties
IllegalArgumentException
- if one of the parameters is outside
the allowed range
ProcessingException
- if an error occurred while creating
the feature transformer(s)public UltraconservativeWinnow(Set<String> allValidClasses, FeatureTransformer trans, boolean balance, float promotionFactor, float demotionFactor, float thresholdThick, TiesConfiguration config, String configSuffix) throws IllegalArgumentException
allValidClasses
- the set of all valid classestrans
- the last transformer in the transformer chain to use, or
null
if no feature transformers should be usedbalance
- whether to use the Balanced Winnow or the standard
Winnow algorithmpromotionFactor
- the promotion factor used by the algorithmdemotionFactor
- the demotion factor used by the algorithmthresholdThick
- the thickness of the threshold if the "thick
threshold" heuristic is used (must be < 1.0), 0.0 otherwiseconfig
- contains configuration propertiesconfigSuffix
- optional suffix appended to the configuration keys
when configuring this instance; might be null
IllegalArgumentException
- if one of the parameters is outside
the allowed rangeMethod Detail |
---|
protected void chooseClassesToAdjust(WinnowDistribution winnowDist, String targetClass, Set<String> classesToPromote, Set<String> classesToDemote)
chooseClassesToAdjust
in class Winnow
winnowDist
- the prediction distribution returned by
TrainableClassifier.classify(de.fu_berlin.ties.classify.feature.FeatureVector, java.util.Set)
targetClass
- the expected class of this instance; must be
contained in the set of candidateClasses
classesToPromote
- the classes to promote are added to this setclassesToDemote
- the classes to demote are added to this set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |