# Sample data
feature <- c("A", "B", "C", "D", "A", "B", "C", "D")
target <- c(1, 0, 1, 0, 1, 1, 0, 0)
# Define custom bins: (A,B) and (C,D)
cutpoints <- c("A+B", "C+D")
# Apply binning
result <- ob_cutpoints_cat(feature, target, cutpoints)
# View bin statistics
print(result$woebin)
# View WoE-transformed feature
print(result$woefeature)
Run the code above in your browser using DataLab