MyNixOS website logo
Description

Efficient Stepwise Selection in Decomposable Models.

An implementation of the ESS algorithm following Amol Deshpande, Minos Garofalakis, Michael I Jordan (2013) <arXiv:1301.2267>. The ESS algorithm is used for model selection in decomposable graphical models.

ess: Efficient Stepwise Selection in Decomposable Models

R buildstatus

About ess

The ess package is an R implementation of the algorithm presented in this paper and later corrected slightly in this paper. 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.

Decomposable Graphical Models

The 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.

Installation

You can install the current stable release of the package by using the devtools package:

devtools::install_github("mlindsk/ess", build_vignettes = FALSE)

Getting Started

The 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.

A 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:

library(ess)
g <- fit_graph(derma)
plot(g, vertex.size = 1)

Instead of inspecting the graph (it can be difficult if there are many variables) we can simply extract the neighbors of ES

adj <- adj_lst(g)
adj$ES
#>  [1] "h21" "h20" "h28" "h33" "h16" "h29" "c9"  "h15" "h14" "c5"  "c3"  "h19"
#> [13] "h26" "c4"  "age" "c7"  "c2"  "h31" "c1"  "h18" "h17" "h32" "c11" "h13"
#> [25] "h23" "c10" "h22" "h24" "h30" "h27"

For more information, see the documentation. E.g. type ?fit_graph in an R session.

See Also

The 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 package.

Metadata

Version

1.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows