An open API service indexing awesome lists of open source software.

https://github.com/freguglia/vlmcmethods

C++ based implementations of Variable-Length Markov Chains (VLMC) and related methods.
https://github.com/freguglia/vlmcmethods

context-tree probabilistic-suffix-trees

Last synced: about 2 months ago
JSON representation

C++ based implementations of Variable-Length Markov Chains (VLMC) and related methods.

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "70%"
)
```

# vlmcmethods

Methods for Variable-Length Markov Chain models...

## Installation

Install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("Freguglia/vlmcmethods")
```
## Example

```{r example}
library(vlmcmethods)
# Example dataset format
str(binchain)

# Fitting VLMC via context algorithm
fit <- vlmcfit(binchain, Hmax = 8, cutoff = 10)
fit
summary(fit)

# Plotting trees
plot(fit)

# Obtain a tbl_graph object from the fitted tree (string)
graph <- tree_graph(fit)
graph
# You can use this object within the 'ggraph' package to create
# custom visualizations
```