|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.biojava.bio.dist.SimpleDistributionTrainerContext
A no-frills implementation of DistributionTrainerContext.
Constructor Summary | |
SimpleDistributionTrainerContext()
|
Method Summary | |
void |
addCount(Distribution dist,
Symbol sym,
double times)
Registers that sym was counted in this state. |
void |
clearDistributionCounts()
Clears all of the counts to zero. |
DistributionTrainer |
getDistributionTrainer(Distribution dist)
Return the Distribution trainer object from the current context. |
Distribution |
getNullModel()
Retrieve the background distribution |
double |
getNullModelWeight()
Retrieve the weight of the background distribution |
void |
registerDistribution(Distribution dist)
Register a distribution object |
void |
registerDistributionTrainer(Distribution dist,
DistributionTrainer trainer)
Register a distribution and an associated distributiontrainer object |
void |
setNullModel(Distribution nullModel)
Assign a background distribution |
void |
setNullModelWeight(double nullModelWeight)
Assign a weight to the background distribution |
void |
trainDistributions()
Trains the Distribution, given a null model. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SimpleDistributionTrainerContext()
Method Detail |
public Distribution getNullModel()
public void setNullModel(Distribution nullModel)
nullModel
- the background distribution to assignpublic double getNullModelWeight()
public void setNullModelWeight(double nullModelWeight)
nullModelWeight
- the weight of the null model to assign.public void registerDistribution(Distribution dist)
public void registerDistributionTrainer(Distribution dist, DistributionTrainer trainer)
dist
- the distribution to be registered.trainer
- the distribution's trainer object to be registered.public DistributionTrainer getDistributionTrainer(Distribution dist)
dist
- the Distribution whose trainer is required.public void addCount(Distribution dist, Symbol sym, double times) throws IllegalSymbolException
This method may be called multiple times with the same symbol. In this case, the times should be summed.
dist
- the Distribution that the symbol was associated withsym
- the Symbol seentimes
- the number of times to addpublic void trainDistributions() throws IllegalSymbolException
This will use the information collected with multiple addCount calls, and the null model to generate the new weights.
nullModel
- the null model Distributionweight
- how many lots of the null model to addpublic void clearDistributionCounts()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |