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:
where each
The copula density function
For more details and visualization of the copulas, go to https://abrahammontoyacalzada.shinyapps.io/Copulas/
Frank copula:
with
This copula has no upper nor lower tail dependency.
Clayton copula:
with
When
Gaussiana (Normal) copula
with
This copula has no upper nor lower tail dependency.
Joe copula
with
This copula has upper tail dependence equal to
Gumbel copula
with
This copula has upper tail dependence equal to
Ali–Mikhail–Haq copula
with
This copula has no upper nor lower tail dependency.
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)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