Probabilistic Gene Nets Week 6 General Structure (later we will outline in detail) • • • • • pbndriver ruletree genestm d2b b2d New – to be created I suggest building ruletree first and testing it with rule and prob to see if you get the ruletree, pnet and rnet specified in the notes. [pnet, rnet]=ruletree(rule,prob) This is still “rule 1” (one rule), it can just take two forms, with different associated probabilities. Rule 1 Biograph makes Rule Tree from ptree Building ptree • Each row and each column in ptree are nodes in ruletree. • Initialize ptree. To do this you need to find out, from your cell rule, how many nodes there will be. – Build a vector called R, where R(i)=the number of different forms that rule{i} can take. • Input probabilities from cell prob into ptree. Each entry specifies the probability that node (row) will connect to node (column). ptree, ctd. -What does the cell prob look like? -add your ids to ptree and hand to biograph! pnet and rnet • pnet contains the probabilities of arriving at each of the final nodes in the ruletree. Find this for our example… • You can implement this step-wise in MATLAB: accumulate a prob cell that contains the probabilities of arriving at the nodes in each “layer” • For example stepprob={[each node in layer 1] [each node in layer 2]… [each node in final layer]} In this case, what is pnet? pnet and rnet continued! • • • • • • rnet is “a vector of N rule indicators” What does this mean? For each final node, what is it telling us? Let’s build by hand for our small example. How to encode: use powers of 10? Do same way as pnet: build cell then take final entry which corresponds with terminal nodes. The Driver: pbndriver • Where STM is made, among other things • What other things? pbndriver • Specify wire, rule, prob • Draw gene net itself just based on wire • Call ruletree on rule and prob to return pnet and rnet • Build STM – Initialize – Build using pnet and genestm • Display the STM using imagesc • Display the STM using biograph Building STM • Run last week’s genestm on wire and the different rule combinations. • genestm will output an STM. What is the probability that this STM will occur? Where do we find it? • The final STM is simply the sum of all possible STMs generated by genestm, weighted by the probabilities that they will occur, found in pnet.