[Biojava-dev] Relations between DistributionTrainer and
TrainigAlgorithm and so on...
Matthew Pocock
matthew_pocock at yahoo.co.uk
Wed Mar 5 22:51:54 EST 2003
Oscar Lopes wrote:
> Hi!
>
> I'm a graduate student, working with HMM's. It has been decided to use
> biojava in my thesis work.
> One of my tasks is to program Viterbi training algorithm, but
> unfortunatly I found difficult to understand the
> relations between DistributionTrainer, DistributionTrainerContext,
> TrainigAlgorithm, AbstractTrainer, etc.
>
> My main problem is to count the occurence of two simultaneous symbols.
> The addCount() method in
> ModelTrainer, DistributionTrainer and DistributionTrainerContext only
> allows one symbol.
Depends what you want to do. If you are viewing the complete sequence as
pairs, then use SymbolListViews.windowedSymbolList(yourSeq, 2) to turn
it into doublets. If you are viewing the sequence as overlapping pairs
then use SymbolListViews.orderNSymbolList(yourSeq, 2). Either way, this
will project your underlying sequence into an alphabet with 16 symbols -
one for each ordered pair of DNA nucleotides.
In the HMM, be careful to match the type of the distribution to the type
of view you have. To deal with dinucleotides (a distribution over the 16
pairs), then use the normal distribution factory. To deal with
overlapping pars (conditional probabilities) then use the order n
distribution factory.
Matthew
> So the question is, is there any kind of interface that I can use?
> Should I define a new one?
> It would be preferable to use the work already done instead of building
> everything by myself.
>
> By the way, is there any tutorial about the dp package?
> The demos and api doc didn't helped very much in my problem.
>
> Thanks in advance.
>
> Óscar Lopes
>
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
>
--
BioJava Consulting LTD - Support and training for BioJava
http://www.biojava.co.uk
More information about the biojava-dev
mailing list