pred_LB: Predict Binary Responses from a Logistic Biplot

View source: R/predict_LB.R

pred_LBR Documentation

Predict Binary Responses from a Logistic Biplot

Description

Predicts the binary response matrix from a fitted logistic biplot and computes the optimal classification threshold for each variable by minimising the Balanced Error Rate (BER).

Usage

pred_LB(object, x, ncuts = 100)

Arguments

object

An object of class BiplotML, as returned by LogBip.

x

The original binary matrix used to fit the model.

ncuts

Number of equally spaced threshold candidates in [0, 1]. Default is 100.

Details

The optimal threshold for variable j is the value \alpha_j \in [0,1] that minimises the Balanced Error Rate:

BER_j = 1 - \frac{1}{2} \left(\frac{TP_j}{TP_j + FN_j} + \frac{TN_j}{TN_j + FP_j}\right),

where TP, TN, FP, and FN denote true positives, true negatives, false positives, and false negatives, respectively.

Value

A named list of class BiplotML with components:

thresholds

Data frame with the optimal threshold and minimum BER for each variable.

predictX

Predicted binary matrix.

fitted

Confusion matrix (sensitivity, specificity, global accuracy) for each variable.

BER

Overall Balanced Error Rate (in percent).

Author(s)

Giovany Babativa <jgbabativam@unal.edu.co>

Examples


data("Methylation")
LB  <- LogBip(Methylation, plot = FALSE)
out <- pred_LB(LB, Methylation)


BiplotML documentation built on May 8, 2026, 5:06 p.m.

Related to pred_LB in BiplotML...