powered by
S3 predict method for class "pbc"
# S3 method for pbc predict(object, Xnew, ...)
List containing predictions
object of class "pbc"
numeric matrix of inputs
additional arguments (not used)
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