LZGENERATE
Arguments: dict maxpast [[length]] &optional mostprobable minpast mincomplex incipit1 incipit2 reconstr strategy constraints equiv1 equiv2 [generic-function]
Generates a new sequence following the model of a given LZ continuation tree (generated by the LZify function).
inputs :
dict: a LZ continuation tree generated by the LZify function.
maxPast: nil or integer. maximum length of the context. If nil : no maximum past constraint.
Length: integer, >=1. length of the sequence to be generated.
mostprobable: if not true, inverse all the probability distributions (the less probable one becomes the most probable one).
minPast: integer, >=0. minimum length of the context.
minComplex: integer, >=0. minimum size of the subLZtree of each context.
incipit1: list. a sequence of analysis symboles that will be the beginning of the generated analysis sequence.
incipit2: list. a sequence of synthesis symboles that will be the beginning of the generated synthesis sequence.
reconstr: the name of a function that reconstructs the symbol from analysis and synthesis information. If nil, the predefined (in LZify) fonction will be used.
strategy: the name of function that chooses new synthesis information according to its last evolution.
constraints: constraint function of the last generated analysis information and last generated sequence, both reversed.
equiv1: the name of function that compares a symbole at the root of the tree with the last generated one.
equiv2: the name of function that compares a symbole with any in the tree.
maxPast: nil or integer. maximum length of the context. If nil : no maximum past constraint.
Length: integer, >=1. length of the sequence to be generated.
mostprobable: if not true, inverse all the probability distributions (the less probable one becomes the most probable one).
minPast: integer, >=0. minimum length of the context.
minComplex: integer, >=0. minimum size of the subLZtree of each context.
incipit1: list. a sequence of analysis symboles that will be the beginning of the generated analysis sequence.
incipit2: list. a sequence of synthesis symboles that will be the beginning of the generated synthesis sequence.
reconstr: the name of a function that reconstructs the symbol from analysis and synthesis information. If nil, the predefined (in LZify) fonction will be used.
strategy: the name of function that chooses new synthesis information according to its last evolution.
constraints: constraint function of the last generated analysis information and last generated sequence, both reversed.
equiv1: the name of function that compares a symbole at the root of the tree with the last generated one.
equiv2: the name of function that compares a symbole with any in the tree.
output :
a list of events in the same alphabet as the analyzed sequence.
After building a pattern dictionary using LZify, LZGenerate may be used to
generate a new sequence that imitates the statistical behaviour encoded into the dictionary.
If a list of <something> had been analyzed by LZify, the result will be a new list of <something>.
At a every point of the generation, LZGenerate looks at the longest sequence of last generated elements
that belongs to the LZ tree (even those that do not start exactly from the root).
It then checks the conditional probabilities associated with
that pattern (or context) , then generates a new element with regard to the probability. It then adds
this element to the right of the generated sequence, and iterates.
generate a new sequence that imitates the statistical behaviour encoded into the dictionary.
If a list of <something> had been analyzed by LZify, the result will be a new list of <something>.
At a every point of the generation, LZGenerate looks at the longest sequence of last generated elements
that belongs to the LZ tree (even those that do not start exactly from the root).
It then checks the conditional probabilities associated with
that pattern (or context) , then generates a new element with regard to the probability. It then adds
this element to the right of the generated sequence, and iterates.
If maxPast in an integer, the length of the context must not exceed maxPast. That is to say, this
limits the size of the memory of what LZGenerate has previously generated.
limits the size of the memory of what LZGenerate has previously generated.
If, at a certain point of the generation, the length of the context is lower than minPast, then LZGenerate
goes back one step before and generates another symbols until it respects the minPast constraint. It may
go back as far as necessa
ry. If no sequence can respect the constraint, LZGenerate returns nil.
Thanks to the minPast parameter, you can prevent LZGenerate from generating with no or little context.
goes back one step before and generates another symbols until it respects the minPast constraint. It may
go back as far as necessa
ry. If no sequence can respect the constraint, LZGenerate returns nil.
Thanks to the minPast parameter, you can prevent LZGenerate from generating with no or little context.
If, at a certain point of the generation, the number of all the nodes of the tree that can be reached from now on
(which is called the subtree generated by the present context) is lower than minComplex, then LZGenerate
takes into account not only the continuation of the longest context, but also those of more little context,
this in order to get out of this subtree. Thanks to the minContext parameter, you can prevent LZGenerate
from getting stuck inside a little subtree.
(which is called the subtree generated by the present context) is lower than minComplex, then LZGenerate
takes into account not only the continuation of the longest context, but also those of more little context,
this in order to get out of this subtree. Thanks to the minContext parameter, you can prevent LZGenerate
from getting stuck inside a little subtree.