Make a weighted random series of numbers

None.

bang | Makes a weighted random choice of a number to be sent out, based on the immediately previous output and on the specified likelihoods of subsequent numbers. No output will be produced if no input has been received or if the contents of the prob object have been cleared using the message. | |

int | input [int] |
Sets (but does not send out) out the current number value. The subsequent output, in response to a | message, will be determined by the stored matrix of probable transitions from that number.

list | probability-matrix-of-transitions [list] |
The numbers make an entry in a probability matrix of transitions from one number to another (known as a first-order Markov chain). The list should consist of three numbers: a current value, a next value, and a probability that current will be followed by next. The first two numbers in the list identify a possible succession of output values: a possibility that the first number will be followed by the second. The third number sets the relative likelihood that the sequence of numbers will occur. Once the first number has been sent out, the next output is determined by the relative likelihood(s) assigned to each possible subsequent number. |

clear | Erases the contents of the prob object. | |

embed | save-with-patch-flag (0 or non-zero) [int] |
The word prob to be saved as part of the patch that contains it. The message causes prob to forget its contents when the patch is closed. | , followed by a non-zero number, causes the contents of

dump | Prints out a complete list of the stored transition probabilities (Markov chain) in the Max window. | |

reset | restart-value [int] |
The word prob what number to revert to in the event that it gets "stuck" on a number that has no possible next number. | , followed by a number, tells

Name | Description |
---|---|

anal | Make a histogram of number pairs received |

histo | Make a histogram of the numbers received |

mean | Find the running average of a stream of numbers |

Max Data Tutorial 5: List Processing | Max Data Tutorial 5: List Processing |