public class CombinedScorer extends Scorer
This is currently set up to take any number of undefined scorers. This code can be easily modified to take a tightly defined set of scorers and combine them with defined weights. To do this, replace the ArrayList instance variable with an array of scorers that are initialized in the constructor. Also define a corresponding array of weights for those scorers. Then the calculateScore method just needs to go down the array of scorers, calculate each score, multiply it by the corresponding weight, and return the result.
Scorer.ScoreSoftValueHashMap
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Scorer> |
scorers |
lookupCount, mf, motifScoreCache2, usePrior
Constructor and Description |
---|
CombinedScorer(Scorer s1)
Sets the scores, and takes the motif finders from s1.
|
Modifier and Type | Method and Description |
---|---|
void |
addScorer(Scorer s)
Adds the scorer to this CombinedScorer, and sets the use prior variable to false.
|
double |
calculateScore(Motif m)
Returns the some of the scores from s1 and s2, minus the prior.
|
double |
calculateScore(MotifList ml)
Returns the some of the scores from s1 and s2, minus the prior.
|
void |
setMotifFinder(MotifFinder newMF)
Calls setMotifFinder on all the scorers.
|
void |
setSeparateMotifFinders(boolean b) |
void |
setUsePrior(boolean b)
Sets whether or not Bayesian priors are used.
|
baseEntropy, computePhi, computePhi, computePhi, computePrior, computePrior, getDiscardOverlaps, getLookupCount, getMotifFinder, getUsePrior, setDiscardOverlaps, setScore, setScore, setScores, setScores
protected java.util.ArrayList<Scorer> scorers
public CombinedScorer(Scorer s1)
public void addScorer(Scorer s)
public double calculateScore(Motif m)
calculateScore
in class Scorer
public double calculateScore(MotifList ml)
calculateScore
in class Scorer
public void setMotifFinder(MotifFinder newMF)
setMotifFinder
in class Scorer
public void setSeparateMotifFinders(boolean b)
public void setUsePrior(boolean b)
Scorer
setUsePrior
in class Scorer