{"id":17651934,"url":"https://github.com/dm13450/dirichletprocess","last_synced_at":"2025-05-06T21:30:16.136Z","repository":{"id":49544012,"uuid":"106570946","full_name":"dm13450/dirichletprocess","owner":"dm13450","description":"Build dirichletprocess objects for data analysis","archived":false,"fork":false,"pushed_at":"2023-08-26T07:19:08.000Z","size":10559,"stargazers_count":59,"open_issues_count":11,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-02T08:07:01.434Z","etag":null,"topics":["bayesian","bayesian-inference","bayesian-statistics","dirichlet-process","mcmc","r","r-package"],"latest_commit_sha":null,"homepage":"https://dm13450.github.io/dirichletprocess/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dm13450.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-11T15:15:02.000Z","updated_at":"2025-04-19T10:56:38.000Z","dependencies_parsed_at":"2024-10-31T14:04:10.187Z","dependency_job_id":null,"html_url":"https://github.com/dm13450/dirichletprocess","commit_stats":{"total_commits":208,"total_committers":5,"mean_commits":41.6,"dds":"0.40384615384615385","last_synced_commit":"e161437e3d115af266b251494fecb385d24ac4a7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dm13450%2Fdirichletprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dm13450%2Fdirichletprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dm13450%2Fdirichletprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dm13450%2Fdirichletprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dm13450","download_url":"https://codeload.github.com/dm13450/dirichletprocess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252771786,"owners_count":21801781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian","bayesian-inference","bayesian-statistics","dirichlet-process","mcmc","r","r-package"],"created_at":"2024-10-23T11:44:12.822Z","updated_at":"2025-05-06T21:30:16.087Z","avatar_url":"https://github.com/dm13450.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r echo=FALSE, message=FALSE}\nset.seed(2020)\nrequire(dirichletprocess)\nrequire(ggplot2)\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"vignettes/img/\"\n)\n```\n\n# dirichletprocess\n\n[![R build status](https://github.com/dm13450/dirichletprocess/workflows/R-CMD-check/badge.svg)](https://github.com/dm13450/dirichletprocess/actions)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/dm13450/dirichletprocess?branch=master\u0026svg=true)](https://ci.appveyor.com/project/dm13450/dirichletprocess)\n[![Coverage Status](https://codecov.io/gh/dm13450/dirichletprocess/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dm13450/dirichletprocess)\n\n\nThe dirichletprocess package provides tools for you to build custom Dirichlet process mixture models. You can use the pre-built Normal/Weibull/Beta distributions or create your own following the instructions in the vignette. In as little as four lines of code you can be modelling your data nonparametrically.\n\n## Installation\n\nYou can install the stable release of dirichletprocess from CRAN:\n\n```{r, eval=FALSE}\ninstall.packages(\"dirichletprocess\")\n```\n\nYou can also install the development build of dirichletprocess from github with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"dm13450/dirichletprocess\")\n```\n\nFor a full guide to the package and its capabilities please consult the vignette:\n\n```{r vignette, eval=FALSE}\nbrowseVignettes(package = \"dirichletprocess\")\n```\n\n## Examples\n\n### Density Estimation\n\nDirichlet processes can be used for nonparametric density estimation. \n\n```{r density, eval=FALSE}\nfaithfulTransformed \u003c- faithful$waiting - mean(faithful$waiting)\nfaithfulTransformed \u003c- faithfulTransformed/sd(faithful$waiting)\ndp \u003c- DirichletProcessGaussian(faithfulTransformed)\ndp \u003c- Fit(dp, 100, progressBar = FALSE)\nplot(dp)\n```\n\n\u003cimg src=https://github.com/dm13450/dirichletprocess/raw/master/vignettes/img/density-1.png width=50% /\u003e\n\n\n### Clustering\n\nDirichlet processes can also be used to cluster data based on their common distribution parameters. \n\n```{r clustering, eval=FALSE}\nfaithfulTrans \u003c- scale(faithful)\ndpCluster \u003c-  DirichletProcessMvnormal(faithfulTrans)\ndpCluster \u003c- Fit(dpCluster, 2000, progressBar = FALSE)\nplot(dpCluster)\n```\n\n\u003cimg src=https://github.com/dm13450/dirichletprocess/raw/master/vignettes/img/clustering-1.png width=50% /\u003e\n\nFor more detailed explanations and examples see the vignette.\n\n### Tutorials\n\nI've written a number of tutorials: \n\n* [Non parametric priors](https://dm13450.github.io/2019/02/22/Nonparametric-Prior.html)\n* [Calculating cluster probabilities](https://dm13450.github.io/2018/11/21/Cluster-Probabilities.html)\n* [Clustering](https://dm13450.github.io/2018/05/30/Clustering.html)\n* [Point processes](https://dm13450.github.io/2018/03/08/dirichletprocess-pointprocess.html)\n* [Custom mixtures](https://dm13450.github.io/2018/02/21/Custom-Distributions-Conjugate.html)\n* [Density estimation](https://dm13450.github.io/2018/02/01/Dirichlet-Density.html)\n* [Checking convergence](https://dm13450.github.io/2020/01/11/Dirichlet-Convergence.html)\n\nand some case studies: \n\n* [State of the Market - Infinite State Hidden Markov Models](https://dm13450.github.io/2020/06/03/State-of-the-Market.html)\n* [Palmer Penguins and an Introduction to Dirichlet Processes](https://dm13450.github.io/2020/09/28/PriorToPosterior.html)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdm13450%2Fdirichletprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdm13450%2Fdirichletprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdm13450%2Fdirichletprocess/lists"}