Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: XML probabilistic trees

by dakkar (Hermit)
on Mar 23, 2003 at 15:03 UTC ( #245271=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    %nodes=( root => { parents => [],
                       probs => [0.01]}, # P(root)
    ...
                       probs => [0.12,0.24,   # P(other|!root,!some), P(ot
    +her|!root,some)
                                 0.81,0.18]}, # P(other|root,!some), P(oth
    +er|root,some)
             );
    
  2. or download this
    # the state you start from
    %state=(root=>1,some=>0);
    ...
     $i=($i<<2)+$state{$_} # this is a simple encoding. Just use the same 
    +for updating and accessing
    }
    $prob=$nodes{other}{probs}[$i];
    
  3. or download this
    use XML::Simple;
    print XMLout(\%nodes);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://245271]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-07-07 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?