{"id":32209707,"url":"https://github.com/mlindsk/ess","last_synced_at":"2026-07-12T22:31:05.339Z","repository":{"id":56934908,"uuid":"263326056","full_name":"mlindsk/ess","owner":"mlindsk","description":"Eficient Stepwise Selection in Decomposable Models","archived":false,"fork":false,"pushed_at":"2021-10-13T07:38:32.000Z","size":1597,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-30T04:22:36.142Z","etag":null,"topics":["chow-liu-tree","decomposable-models","graphical-models","model-selection"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlindsk.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-12T12:10:41.000Z","updated_at":"2022-04-16T06:38:16.000Z","dependencies_parsed_at":"2022-08-21T06:50:49.094Z","dependency_job_id":null,"html_url":"https://github.com/mlindsk/ess","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mlindsk/ess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlindsk%2Fess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlindsk%2Fess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlindsk%2Fess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlindsk%2Fess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlindsk","download_url":"https://codeload.github.com/mlindsk/ess/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlindsk%2Fess/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35404819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chow-liu-tree","decomposable-models","graphical-models","model-selection"],"created_at":"2025-10-22T06:14:37.321Z","updated_at":"2026-07-12T22:31:05.333Z","avatar_url":"https://github.com/mlindsk.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"ess: Efficient Stepwise Selection in Decomposable Models\"\noutput:\n  github_document\n---\n\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/mlindsk/ess/workflows/R-CMD-check/badge.svg)](https://github.com/mlindsk/ess/actions)\n[![](https://www.r-pkg.org/badges/version/ess?color=green)](https://cran.r-project.org/package=ess)\n\u003c!-- badges: end --\u003e\n\n## About ess\n\nThe **ess** package is an **R** implementation of the algorithm presented in [this paper](https://arxiv.org/abs/1301.2267) and later corrected slightly [in this paper](https://doi.org/10.1109/ictai.2004.100). The ESS algorithm is used for model selection in discrete decomposable graphical models. It is fast compared to other model selection procedures in **R**, especially when data is high-dimensional. \n\n## Decomposable Graphical Models\n\nThe class of graphical models is a family of probability distributions for which conditional dependencies can be read off from a graph. If the graph is decomposable, the maximum likelihood estimates of the parameters in the model can be shown to be on exact form. This is what enables ESS to be fast and efficient.\n\n## Installation\n\nYou can install the current stable release of the package by using the `devtools` package:\n\n```{r, eval = FALSE}\ndevtools::install_github(\"mlindsk/ess\", build_vignettes = FALSE)\n```\n\n## Getting Started\n\nThe main function in **ess** is `fit_graph` which fits a decomposable graph. An object returned from `fit_graph` is a `gengraph` object. `fit_graph` has four types; forward selection (`fwd`), backward selection (`bwd`), tree (`tree`) and a combination of tree and forward (`tfwd`). Using `adj_lst` on an object returned by `fit_graph` gives the adjacency list corresponding to the graph. Similarly one can use `adj_mat` to obtain an adjacency matrix. Finally, the object can be converted to an `igraph` object using the `as_igraph` function.\n\nA neat usecase of **ess** is that of variable selection. Consider the built-in data `derma` (dermatitis) with class variable `ES`. We can fit a graph structure to this data, and inspect the graph to see which variables `ES` directly depends upon:\n\n```{r var_select}\nlibrary(ess)\ng \u003c- fit_graph(derma)\nplot(g, vertex.size = 1)\n```\n\nInstead of inspecting the graph (it can be difficult if there are many variables) we can simply extract the neighbors of `ES`\n\n```{r neighbors}\nadj \u003c- adj_lst(g)\nadj$ES\n```\n\nFor more information, see the documentation. E.g. type `?fit_graph` in an **R** session.\n\n## See Also\nThe [molic](https://github.com/mlindsk/molic) package is used for outlier detection in categorical data and is designed to work with `gengraph` objects. One can use **ess** to fit a `gengraph` object, extract the adjacency matrix, conert it to an `igraph` object and use it in connection with belief propagation via the [jti](https://github.com/mlindsk/jti) package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlindsk%2Fess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlindsk%2Fess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlindsk%2Fess/lists"}