|
|||||||||||
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
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 |
Fields inherited from interface de.fu_berlin.ties.classify.Classifier |
CONFIG_CLASSIFIER |
Constructor Summary | |
UltraconservativeWinnow(Set allValidClasses)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set allValidClasses,
FeatureTransformer trans,
boolean balance,
float promotionFactor,
float demotionFactor,
float thresholdThick,
int featureNum)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set allValidClasses,
FeatureTransformer trans,
TiesConfiguration config)
Creates a new instance by delegating to the corresponding super constructor. |
|
UltraconservativeWinnow(Set allValidClasses,
TiesConfiguration config)
Creates a new instance by delegating to the corresponding super constructor. |
Method Summary | |
protected void |
chooseClassesToAdjust(WinnowDistribution winnowDist,
String targetClass,
Set classesToPromote,
Set 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, sigmoid, threshold, toString, trainOnErrorHook, updateScores |
Methods inherited from class de.fu_berlin.ties.classify.TrainableClassifier |
classify, createClassifier, createClassifier, createClassifier, getAllClasses, train, trainOnError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UltraconservativeWinnow(Set allValidClasses) throws IllegalArgumentException
allValidClasses
- the set of all valid classes
IllegalArgumentException
- if one of the parameters is outside
the allowed rangepublic UltraconservativeWinnow(Set allValidClasses, TiesConfiguration config) throws IllegalArgumentException
allValidClasses
- the set of all valid classesconfig
- contains configuration properties
IllegalArgumentException
- if one of the parameters is outside
the allowed rangepublic UltraconservativeWinnow(Set allValidClasses, FeatureTransformer trans, TiesConfiguration config) 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 usedconfig
- contains configuration properties
IllegalArgumentException
- if one of the parameters is outside
the allowed rangepublic UltraconservativeWinnow(Set allValidClasses, FeatureTransformer trans, boolean balance, float promotionFactor, float demotionFactor, float thresholdThick, int featureNum) 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 otherwisefeatureNum
- the number of features to store
IllegalArgumentException
- if one of the parameters is outside
the allowed rangeMethod Detail |
protected void chooseClassesToAdjust(WinnowDistribution winnowDist, String targetClass, Set classesToPromote, Set classesToDemote)
chooseClassesToAdjust
in class Winnow
winnowDist
- the prediction distribution returned by
TrainableClassifier.classify(FeatureVector, 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 |