{
  "_id": "6ac0b13191601a2ad299764f",
  "Package": "BCT",
  "Type": "Package",
  "Title": "Bayesian Context Trees for Discrete Time Series",
  "Version": "1.3",
  "Date": "2026-08-03",
  "Authors@R": "c(person(given = \"Ioannis\",\nfamily = \"Papageorgiou\",\nrole = \"aut\"),\nperson(given = c(\"Valentinian\", \"Mihai\"),\nfamily = \"Lungu\",\nrole = c(\"aut\", \"cre\"),\nemail = \"valentinian.mihai@gmail.com\"),\nperson(given = \"Ioannis\",\nfamily = \"Kontoyiannis\",\nrole = \"aut\"))",
  "Description": "An implementation of a collection of tools for exact\nBayesian inference with discrete times series. This package\ncontains functions that can be used for prediction, model\nselection, estimation, segmentation/change-point detection and\nother statistical tasks. Specifically, the functions provided\ncan be used for the exact computation of the prior predictive\nlikelihood of the data, for the identification of the a\nposteriori most likely (MAP) variable-memory Markov models, for\ncalculating the exact posterior probabilities and the AIC and\nBIC scores of these models, for prediction with respect to\nlog-loss and 0-1 loss and segmentation/change-point detection.\nExample data sets from finance, genetics, animal communication\nand meteorology are also provided. Detailed descriptions of the\nunderlying theory and algorithms can be found in [Kontoyiannis\net al. 'Bayesian Context Trees: Modelling and exact inference\nfor discrete time series.' Journal of the Royal Statistical\nSociety: Series B (Statistical Methodology), April 2022.\nAvailable at: <doi:10.48550/arXiv.2007.14900> [stat.ME], July\n2020] and [Lungu et al. 'Change-point Detection and\nSegmentation of Discrete Data using Bayesian Context Trees'\n<doi:10.48550/arXiv.2203.04341> [stat.ME], March 2022].",
  "License": "GPL (>= 2)",
  "LazyData": "true",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-10-03 07:32:55 UTC",
    "User": "root"
  },
  "Author": "Ioannis Papageorgiou [aut], Valentinian Mihai Lungu [aut, cre],\nIoannis Kontoyiannis [aut]",
  "Maintainer": "Valentinian Mihai Lungu <valentinian.mihai@gmail.com>",
  "Config/pak/sysreqs": "libglpk-dev libicu-dev libxml2-dev",
  "Repository": "https://valentinian22.r-universe.dev",
  "Date/Publication": "2026-08-03 23:20:22 UTC",
  "RemoteUrl": "https://github.com/cran/BCT",
  "RemoteRef": "HEAD",
  "RemoteSha": "7256534c1617af656e8f3255676a34733225dcb3",
  "_user": "valentinian22",
  "_type": "src",
  "_file": "BCT_1.3.tar.gz",
  "_fileid": "https://r2.ropensci.org/144389e04599ba6039efa3ce87b2c87cd714afbe8320e703436c07ee192d9802",
  "_filesize": 277567,
  "_sha256": "144389e04599ba6039efa3ce87b2c87cd714afbe8320e703436c07ee192d9802",
  "_expires": "2027-01-11T07:39:27.000Z",
  "_created": "2026-10-03T07:32:55.000Z",
  "_published": "2026-10-03T07:39:29.806Z",
  "_jobs": [
    {
      "job": 111156622489,
      "time": 91,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11267438639"
    },
    {
      "job": 111156622449,
      "time": 115,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11268435587"
    },
    {
      "job": 111156622461,
      "time": 97,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11267633438"
    },
    {
      "job": 111156622439,
      "time": 109,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11268425530"
    },
    {
      "job": 111156622462,
      "time": 338,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11268410874"
    },
    {
      "job": 111156622521,
      "time": 304,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11268505562"
    },
    {
      "job": 111156622498,
      "time": 253,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11268525590"
    },
    {
      "job": 111156622539,
      "time": 266,
      "config": "macos-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11268655414"
    },
    {
      "job": 111156158427,
      "time": 171,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11268285796"
    },
    {
      "job": 111156622522,
      "time": 90,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11268550356"
    },
    {
      "job": 111156622563,
      "time": 324,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11268159812"
    },
    {
      "job": 111156622464,
      "time": 130,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11267798475"
    },
    {
      "job": 111156622616,
      "time": 91,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11267954871"
    },
    {
      "job": 111156622487,
      "time": 314,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11267983317"
    },
    {
      "job": 111156622565,
      "time": 101,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11268325682"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491",
  "_status": "success",
  "_upstream": "https://github.com/cran/BCT",
  "_commit": {
    "id": "7256534c1617af656e8f3255676a34733225dcb3",
    "author": "Valentinian Mihai Lungu <valentinian.mihai@gmail.com>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 1.3\n",
    "time": 1785799222
  },
  "_maintainer": {
    "name": "Valentinian Mihai Lungu",
    "email": "valentinian.mihai@gmail.com",
    "login": "valentinian22",
    "description": "",
    "uuid": 74271212
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.0.5",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "igraph",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    }
  ],
  "_owner": "cran",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-32",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "1.3",
      "date": "2026-08-03"
    }
  ],
  "_stars": 0,
  "_contributors": [
    {
      "user": "valentinian22",
      "count": 4,
      "uuid": 74271212
    }
  ],
  "_userbio": {
    "uuid": 74271212,
    "type": "user",
    "name": "Valentinian22",
    "followers": 0
  },
  "_downloads": {
    "count": 380,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/BCT"
  },
  "_mentions": 51,
  "_searchresults": 9,
  "_topics": [
    "cpp"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/BCT.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf"
  ],
  "_realowner": "valentinian22",
  "_cranurl": false,
  "_releases": [
    {
      "version": "1.0",
      "date": "2020-11-23"
    },
    {
      "version": "1.1",
      "date": "2020-12-08"
    },
    {
      "version": "1.2",
      "date": "2022-05-12"
    },
    {
      "version": "1.3",
      "date": "2026-08-03"
    }
  ],
  "_exports": [
    "BCT",
    "calculate_exact_changepoint_posterior",
    "compute_counts",
    "CTW",
    "draw_models",
    "generate_data",
    "infer_fixed_changepoints",
    "infer_unknown_changepoints",
    "kBCT",
    "log_loss",
    "MAP_parameters",
    "ML",
    "plot_changepoint_posterior",
    "plot_individual_changepoint_posterior",
    "prediction",
    "show_tree",
    "zero_one_loss"
  ],
  "_datasets": [
    {
      "name": "el_nino",
      "title": "El Nino",
      "object": "el_nino",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "enterophage",
      "title": "Enterobacteria_phage_lambda",
      "object": "enterophage",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "gene_s",
      "title": "SARS-CoV-2 gene S",
      "object": "gene_s",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "pewee",
      "title": "Pewee birdsong",
      "object": "pewee",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "sars_cov_2",
      "title": "SARS-CoV-2 genome",
      "object": "sars_cov_2",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "simian_40",
      "title": "simian_40",
      "object": "simian_40",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "SP500",
      "title": "Daily changes in the S&P 500 index",
      "object": "sp500",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "three_changes",
      "title": "three_changes",
      "object": "three_changes",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "BCT",
      "title": "Bayesian Context Trees (BCT) algorithm",
      "topics": [
        "BCT"
      ]
    },
    {
      "page": "calculate_exact_changepoint_posterior",
      "title": "Calculates the exact posterior for a sequence with a single change-point.",
      "topics": [
        "calculate_exact_changepoint_posterior"
      ]
    },
    {
      "page": "compute_counts",
      "title": "Compute empirical frequencies of all contexts",
      "topics": [
        "compute_counts"
      ]
    },
    {
      "page": "CTW",
      "title": "Context Tree Weighting (CTW) algorithm",
      "topics": [
        "CTW"
      ]
    },
    {
      "page": "draw_models",
      "title": "Plot the results of the BCT and kBCT functions",
      "topics": [
        "draw_models"
      ]
    },
    {
      "page": "el_nino",
      "title": "El Nino",
      "topics": [
        "el_nino"
      ]
    },
    {
      "page": "enterophage",
      "title": "Enterobacteria_phage_lambda",
      "topics": [
        "enterophage"
      ]
    },
    {
      "page": "gene_s",
      "title": "SARS-CoV-2 gene S",
      "topics": [
        "gene_s"
      ]
    },
    {
      "page": "generate_data",
      "title": "Sequence generator",
      "topics": [
        "generate_data"
      ]
    },
    {
      "page": "infer_fixed_changepoints",
      "title": "Inferring the change-points locations when the number of change-points is fixed.",
      "topics": [
        "infer_fixed_changepoints"
      ]
    },
    {
      "page": "infer_unknown_changepoints",
      "title": "Inferring the number of change-points and their locations.",
      "topics": [
        "infer_unknown_changepoints"
      ]
    },
    {
      "page": "kBCT",
      "title": "k-Bayesian Context Trees (kBCT) algorithm",
      "topics": [
        "kBCT"
      ]
    },
    {
      "page": "log_loss",
      "title": "Calculating the log-loss incurred in prediction",
      "topics": [
        "log_loss"
      ]
    },
    {
      "page": "MAP_parameters",
      "title": "Parameters of the MAP model",
      "topics": [
        "MAP_parameters"
      ]
    },
    {
      "page": "ML",
      "title": "Maximum Likelihood",
      "topics": [
        "ML"
      ]
    },
    {
      "page": "pewee",
      "title": "Pewee birdsong",
      "topics": [
        "pewee"
      ]
    },
    {
      "page": "plot_changepoint_posterior",
      "title": "Plot the empirical posterior distribution of the change-points.",
      "topics": [
        "plot_changepoint_posterior"
      ]
    },
    {
      "page": "plot_individual_changepoint_posterior",
      "title": "Plot empirical conditional posterior of the number of change-points.",
      "topics": [
        "plot_individual_changepoint_posterior"
      ]
    },
    {
      "page": "prediction",
      "title": "Prediction",
      "topics": [
        "prediction"
      ]
    },
    {
      "page": "sars_cov_2",
      "title": "SARS-CoV-2 genome",
      "topics": [
        "sars_cov_2"
      ]
    },
    {
      "page": "show_tree",
      "title": "Plot tree with given contexts",
      "topics": [
        "show_tree"
      ]
    },
    {
      "page": "simian_40",
      "title": "simian_40",
      "topics": [
        "simian_40"
      ]
    },
    {
      "page": "SP500",
      "title": "Daily changes in the S&P 500 index",
      "topics": [
        "SP500"
      ]
    },
    {
      "page": "three_changes",
      "title": "three_changes",
      "topics": [
        "three_changes"
      ]
    },
    {
      "page": "zero_one_loss",
      "title": "Calculating the 0-1 loss incurred in prediction",
      "topics": [
        "zero_one_loss"
      ]
    }
  ],
  "_rundeps": [
    "cli",
    "cpp11",
    "glue",
    "igraph",
    "lattice",
    "lifecycle",
    "magrittr",
    "Matrix",
    "pkgconfig",
    "Rcpp",
    "rlang",
    "stringi",
    "stringr",
    "vctrs"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_score": 2,
  "_indexed": true,
  "_nocasepkg": "bct",
  "_universes": [
    "valentinian22"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3",
      "date": "2026-10-03T07:34:33.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/aa5460073377c0b434f486682b714a71346a3acc26503eda342f259d5175d0fe",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.3",
      "date": "2026-10-03T07:35:01.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/113f4e1af128ecc7af018499bc712898cceff00090fc9c32bd6a22c0a7ce3c92",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.3",
      "date": "2026-10-03T07:34:41.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/d1d7aae4bc4e386c679b74bb617e386b9a8b86a03b2a7c719ebac665ddb78dbb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.3",
      "date": "2026-10-03T07:34:48.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/1e409ac9fc8b0c9443e087dc1a552f3a71f55e998546ce2273ec59063aff602d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.3",
      "date": "2026-10-03T07:38:08.000Z",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/9e48e6581846cba8bbcafcd253fd9807eec8abc33345508fefca85bad3140faa",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.3",
      "date": "2026-10-03T07:37:24.000Z",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/8e7a39da37892aa83a489bacd3d499c8d23bae98f68b491dffa118a08f8ed088",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.3",
      "date": "2026-10-03T07:37:03.000Z",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/d09cca56b41fcfab97b7cce845fff9e642043182a54107e24148a991bd628e64",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.3",
      "date": "2026-10-03T07:36:58.000Z",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/5223427bb014086c3f84d921e0931bb396712ceb47796f9c61d931e814340926",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.3",
      "date": "2026-10-03T07:34:46.000Z",
      "arch": "emscripten",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/383563bdf7c4431796f1806506689d81356290d3eb3713b25a46dde6c7845791",
      "status": "success",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.3",
      "date": "2026-10-03T07:37:50.000Z",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/dcb489a3c5ee02a75c5b3232b6236f035438e0c30847a272f10562cddff23569",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.3",
      "date": "2026-10-03T07:34:06.000Z",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/a8592be93de695a41ed144f18abce40cb1b1f775719d46ed2b7e36383b05e893",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.3",
      "date": "2026-10-03T07:34:09.000Z",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/b52b65193c7c4d5f3270b373808c3217047c60f695921d5c5731ce4d36239a27",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.3",
      "date": "2026-10-03T07:37:35.000Z",
      "arch": "aarch64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/35a231daa0fc1dbbf09ea583a3144f76af9e8c0c0a1c2681f086343c2b413ee2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.3",
      "date": "2026-10-03T07:34:14.000Z",
      "arch": "x86_64",
      "commit": "7256534c1617af656e8f3255676a34733225dcb3",
      "fileid": "https://r2.ropensci.org/f5de375e41650c41727aff69b1ce98ade20c60184243d969050a88d938662eeb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/valentinian22/actions/runs/37106544491"
    }
  ]
}