copulaPredict {MLCOPULA} | R Documentation |
Get predictions from a classification model.
Description
Use the models trained with copula functions to generate new predictions.
Usage
copulaPredict(X, model)
Arguments
X |
Data frame with predictor variables. |
model |
Classification model. |
Value
A list with the prediction of the class "class" and the probabilities of each class "prob".
Examples
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)
[Package MLCOPULA version 1.0.0 Index]