Description Usage Arguments Value
Analyses or generates a sequence using a PPM model.
1 2 3 4 5 6 7 8 9 10 11 |
model |
A PPM model object as produced by (for example)
|
seq |
When |
time |
(NULL or a numeric vector) Timepoints corresponding to each element of the sequence. Only used by certain model types (e.g. decay-based models). |
zero_indexed |
(Logical scalar)
Whether or not the |
train |
(Logical scalar) Whether or not the model should learn from the incoming sequence. |
predict |
(Logical scalar) Whether or not to generate predictions for each element of the incoming sequence. |
return_distribution |
(Logical scalar)
Whether or not to return the conditional distribution over each
potential continuation as part of the model output
(ignored if |
return_entropy |
(Logical scalar)
Whether or not to return the entropy of each event prediction
(ignored if |
generate |
(Logical scalar)
If |
A tibble
which will be empty if predict = FALSE
and otherwise will contain one row for each element in the sequence,
with the following columns:
symbol
- the symbol being predicted. This should be identical
to the input argument seq
, with indexing determined by
the argument 0-indexed
.
model_order
- the model order used for generating predictions.
information_content
- the information content
(i.e. negative log probability, base 2) of the observed symbol.
entropy
- the expected information content when
predicting the symbol.
distribution
- the predictive probability distribution for the
symbol, conditioned on the preceding symbols.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.