copulaPredict {MLCOPULA} | R Documentation |
Gets 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 |
A classification model given by |
Value
A list with the following entries:
class |
a vector with the predicted class. |
prob |
a data frame with the probabilities of each class. |
Examples
# Example 1
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)
classification_report(y_true = y, y_pred = 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)
classification_report(y_true = y, y_pred = y_pred$class)
[Package MLCOPULA version 1.0.1 Index]