Learn R Programming

⚠️There's a newer version (1.0.1) of this package.Take me there.

sparta: Sparse Tables

About

The sparta package implements new methods (multiplication, marginalization etc.) for dealing with conditional probability tables (CPTs) and are especially useful when the CPTs are sparse.

Installation

  • Current stable release from CRAN:
install.packages("sparta")
  • Current development version:
remotes::install_github("mlindsk/sparta")

See Also

The jti, https://github.com/mlindsk/jti, package (on CRAN) implements belief propagation via the Junction Tree Algorithm which relies heavily on sparta tables. See also https://github.com/mlindsk/pednoa for a usecase of jti where “ordinary/dense” table operations will fail.

Copy Link

Version

Install

install.packages('sparta')

Monthly Downloads

340

Version

0.8.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Mads Lindskou

Last Published

April 12th, 2022

Functions in sparta (0.8.4)

slice

Slice
sparsity

Sparsity
equiv

Equiv
sparta_struct

Construct sparta object
table_size

Number of elements in a table
sum.sparta

Vector-like operations on sparta objects
sparta_unity_struct

Sparse unity table
sparta-package

sparta: Sparse Tables
sparta_ones

Sparta Ones
normalize

Normalize
print.sparta

Print
allowed_class_to_sparta

Classes that can be converted to sparta
marg

Marginalization of sparse tables
as_array

As array
as_df

As data frame
as_sparta

As sparse table
as_cpt

As cpt
mult

Multiplication and division of sparse tables
get_val

Get value or cell name
vals

Sparta getters