MyNixOS website logo
Description

Building Sets of Variables in a Probabilistic Framework.

Create sets of variables based on a mutual information approach. In this context, a set is a collection of distinct elements (e.g., variables) that can also be treated as a single entity. Mutual information, a concept from probability theory, quantifies the dependence between two variables by expressing how much information about one variable can be gained from observing the other. Furthermore, you can analyze, and visualize these sets in order to better understand the relationships among variables.

setweaver setweaver website

CRANstatus R-CMD-check

setweaver is an R package designed to help users create sets of variables based on a mutual information approach. In this context, a set is a collection of distinct elements (e.g., variables) that can also be treated as a single entity. Mutual information, a concept from probability theory, quantifies the dependence between two variables by expressing how much information about one variable can be gained from observing the other.

Authors

Aaron Fisher
Nicolas Leenaerts

Installation

You can install the released version of setweaver from CRAN with:

install.packages("setweaver")

Or you can install the development version of setweaver from GitHub with the following code snippet:

devtools::install_github('nicolasleenaerts/setweaver')

You can then attach the package as follows:

library(setweaver)

Simple example

Create sets of variables using the pairmi function, which takes a dataframe of variables and pairs them up to a specified maximum number of elements.

# Loading the package, which automatically also downloads the example data (misimdata)
library(setweaver) 

# Pairing variables
results = pairmi(misimdata[,2:11],alpha = 0.05,n_elements = 5)
x1x2x3x4x5x6x7x8x9x10x1_x2x2_x3x3_x4x3_x5x4_x5x5_x6x6_x7x3_x4_x5
100010101000000000
111010101111010000
110010111110000000
101010111000010000
100101111000000010

Table 1. Expanded Data

n_elementssetmirelative.mip
2x1_x20.01483410.00000000.0000972
2x2_x30.01126990.00000000.0008788
2x3_x40.00904650.00000000.0048279
2x3_x50.00318420.00000000.0370173
2x4_x50.01024410.00000000.0020023
2x5_x60.01023470.00000000.0013331
2x6_x70.00527970.00000000.0046674
3x3_x4_x50.01465430.01147010.0142389

Table 2. Information on sets

Once the sets are created with the pairmi function , you can assess their relationship with a specific outcome using the probstat function.

# Evaluating the sets
evaluated_sets = probstat(misimdata$y,results$expanded.data[,results$sets$set],nfolds = 5)
xvarsyprobxprobcprobcprobxcprobicpdifcpdifperxentyentcecedifcedifperORORmargprmse
1x1_x20.30039990.2050.1660.1130.335-0.134-0.4470.7310.8820.8640.0180.0200.3940.46400.00706
6x4_x50.30039990.1860.1930.1200.325-0.107-0.3580.6940.8820.8720.0100.0110.4960.55600.00706
2x2_x30.30039990.1960.2000.1300.325-0.101-0.3360.7150.8820.8730.0090.0100.5200.58200.00706
3x3_x40.30039990.1760.2030.1190.321-0.098-0.3250.6700.8820.8740.0070.0080.5380.59200.00706
5x3_x50.30039990.2730.2270.2060.328-0.074-0.2450.8460.8820.8740.0070.0080.6020.68400.00706

Table 3. Evaluated sets

More information

Consult the vignette for more detailed information!

Metadata

Version

1.0.0

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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-uefi
  • x86_64-windows