MyNixOS website logo
Description

Classification Models with Copula Functions.

Provides several classifiers based on probabilistic models. These classifiers allow to model the dependence structure of continuous features through bivariate copula functions and graphical models, see Salinas-Gutiérrez et al. (2014) <doi:10.1007/s00180-013-0457-y>.

MLCOPULA

This package implements 7 copulas for supervised classification: frank, gaussian, clayton, joe, gumbel, AMH and grid. The classification model is based on the Bayes theorem, similar to the naive Bayes classifier model, but does not assume that the features are independent.

The probability of a class given a set of characteristics (predictor variables) is:

$$P(A|x_1,..x_d) \alpha \prod_{i = 1}^{d}f_{X_i|A}(x_i)c(u_1,...,u_i)$$

where each $u_i = F_{X_i|A}(x_i)$ with $i = 1,2,..d$.

The copula density function $c(u_1,..u_i)$ is modeled by bivariate copula functions, using graphical models (trees and chains)

Copulas

For more details and visualization of the copulas, go to https://abrahammontoyacalzada.shinyapps.io/Copulas/

Frank copula:

$$C(u_1,u_2;\theta) = -\frac{1}{\theta} ln \left[ 1 + \frac{(e^{-\theta u_1} - 1) (e^{-\theta u_2} - 1) } {e^{-\theta} - 1} \right]$$

with $\theta \in (-\infty,\infty)/0$

This copula has no upper nor lower tail dependency.

Clayton copula:

$$C(u_1,u_2;\theta) = \left( u_1^{-\theta} + u_2^{-\theta} - 1 \right)^{-1/\theta}$$

with $\theta \in [-1,\infty)/0$

When $\theta \geq 0$ has lower tail dependence equal to $\lambda_L = 2^{-1/\theta}$

Gaussiana (Normal) copula $$C(u_1,u_2;\theta) = \Phi_G (\Phi^{-1} (u_1) , \Phi^{-1} (u_2) )$$

with $\theta \in (-1,1)$

This copula has no upper nor lower tail dependency.

Joe copula $$C(u_1,u_2) = 1 - \left[ (1 - u_1)^\theta + (1 - u_2)^\theta - (1 - u_1)^\theta (1 - u_2)^\theta \right ] ^ {1/\theta}$$

with $\theta \in [1,\infty)$

This copula has upper tail dependence equal to $\lambda_U = 2 - 2^{1/\theta}$

Gumbel copula

$$C(u_1,u_2) = exp \left[ - \left[ ( -ln(u_1) )^\theta + ( -ln(u_2) )^\theta \right]^{1/\theta} \right]$$

with $\theta \in [1,\infty)$

This copula has upper tail dependence equal to $\lambda_U = 2 - 2^{1/\theta}$

Ali–Mikhail–Haq copula

$$C(u_1,u_2) = \frac{u_1 u_2}{1 - \theta (1 - u_1)(1- u_2)}$$

with $\theta \in [-1,1)$

This copula has no upper nor lower tail dependency.

Example for iris data set

library(MLCOPULA)
X <- iris[,1:4]
y <- iris$Species
model <- copulaClassifier(X = X, y = y, copula = "frank",
                      distribution = "kernel", graph_model = "tree")
y_pred <- copulaPredict(X = X, model = model)
table(y,y_pred$class)
#Example 2
X <- iris[,1:4]
y <- iris$Species
model <- copulaClassifier(X = X, y = y, copula = c("frank","clayton"), 
                        distribution = "kernel", graph_model = "chain")
y_pred <- copulaPredict(X = X, model = model)
table(y,y_pred$class)

References

Salinas-Gutiérrez, R., Hernández-Aguirre, A., Villa-Diharce, E.R. (2014). Copula selection for graphical models in continuous Estimation of Distribution Algorithms. Computational Statistics, 29(3–4):685–713. https://doi.org/10.1007/s00180-013-0457-y.

Metadata

Version

1.0.0

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