Learn R Programming

McMiso (version 0.1.2)

predict.pbc: S3 predict method for class "pbc"

Description

S3 predict method for class "pbc"

Usage

# S3 method for pbc
predict(object, Xnew, ...)

Value

List containing predictions

Arguments

object

object of class "pbc"

Xnew

numeric matrix of inputs

...

additional arguments (not used)

Examples

Run this code
A <- as.matrix(expand.grid(rep(list(0:1), 6)))
set.seed(2025)
X <- A[sample(nrow(A),size=500, replace = TRUE),]
y <- as.numeric(rowSums(X)>=3)
fit <- PBclassifier(X,y)
predict(fit,X)

Run the code above in your browser using DataLab