|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.Reranker
public class Reranker
Reranks the predictions in a distribution by multiplying the probabilities of each of them with a bias, if specified for the type of the prediction.
Constructor Summary | |
---|---|
Reranker()
Creates a new "dummy" instance instance that always returns the original prediction distribution. |
|
Reranker(Configuration config)
Creates a new instance. |
|
Reranker(Map<String,Double> biases)
Creates a new instance. |
Method Summary | |
---|---|
PredictionDistribution |
rerank(PredictionDistribution origDist)
Reranks the predictions in a distribution. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Reranker()
public Reranker(Configuration config)
config
- the biases are read from keys starting with "bias" in
this configuration (bias.classname = bias
, e.g.
bias.spam = 0.9
)public Reranker(Map<String,Double> biases)
biases
- a map from prediction
types (Strings) to biases (Doubles); predictions of types not contained
in this map are left unchangedMethod Detail |
---|
public PredictionDistribution rerank(PredictionDistribution origDist)
The reranked probability estimates are not renormalized, so the result will not be a real probability distribution because sum of all probabilities will typically be different from 1. If you want to work on a real probability distribution you have to normalize it yourself.
origDist
- the prediction distribution to rerank
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |