[Biojava-dev] Query about DP example - Dice.java
Matthew Pocock
matthew_pocock@yahoo.co.uk
Wed, 2 Oct 2002 16:46:53 +0100 (BST)
Hi David,
You are right. The actual distribution object used is
returned by getWeights(). This is needed because a
particular HMM class may use a special distribution
implementation which can't be substituted for by any
old implementation. If you feel keen, update the docs.
If we rewrite the dp interfaces, I would be tempted to
replace the individual probabilitites over states with
a single conditional probability distribution over
pairs of states (source, destination), which will
simplify training of complicated models and make it
more transparent for working with models with
non-probability based parameters (e.g. information
scores from pam matricies). Illegal tranisitons could
be flagged with NaN, or zero or something. Live &
learn.
Matthew
--- David Huen <smh1008@cus.cam.ac.uk> wrote: > Hi,
> I note that the example shows manipulation of the
> transition probabilities
> by:-
> dist =
> casino.getWeights(casino.magicalState());
> dist.setWeight(fairS, 0.8);
> dist.setWeight(loadedS, 0.2);
>
> This appears to suggest that getWeights() must
> return the actual
> Distribution object it uses: a copy of it is
> unacceptable if this is to
> work. If this is to be the expected behaviour with
> all future
> implementations of this class, we should explicitly
> state it in the
> javadocs.
>
> Otherwise, perhaps the above snippet should be
> appended with
> casino.setWeights(casino.magicalState(),
> dist);
>
> Would this make sense?
>
> Regards,
> David Huen
>
> _______________________________________________
> biojava-dev mailing list
> biojava-dev@biojava.org
> http://biojava.org/mailman/listinfo/biojava-dev
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com