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: 11 months ago
JSON representation
C++ based implementations of Variable-Length Markov Chains (VLMC) and related methods.
- Host: GitHub
- URL: https://github.com/freguglia/vlmcmethods
- Owner: Freguglia
- License: gpl-3.0
- Created: 2021-06-01T11:30:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T17:26:31.000Z (about 5 years ago)
- Last Synced: 2025-03-29T05:12:33.819Z (about 1 year ago)
- Topics: context-tree, probabilistic-suffix-trees
- Language: R
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
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
```