model_pr: PR curve: Precision - Recall curve

View source: R/pr.R

model_prR Documentation

PR curve: Precision - Recall curve

Description

model_pr() returns the Precision - Recall curve, which is based on the confusion matrix (Precision and Recall). The graph allows you to study cases of population imbalance.

Usage

model_pr(y_train, y_train_prob, y_test, y_test_prob, type = 3)

Arguments

y_train

Values of the response variable in training set.

y_train_prob

Probabilities of the response variable in training set.

y_test

Values of the response variable in test set.

y_test_prob

Probabilities of the response variable in test set.

type

1 indicates that the PR curve is plotted using Recall on the x-axis and Precision on the y-axis, while 2 indicates that both Recall and Precision are plotted using probabilities on the x-axis. Value 3 generates both graphs (default).


Dfranzani/MTRGLM documentation built on March 28, 2024, 1:34 a.m.