# Sample data
feature <- c(5, 15, 25, 35, 45, 55, 65, 75)
target <- c(0, 0, 1, 1, 1, 1, 0, 0)
# Define custom cutpoints
cutpoints <- c(30, 60)
# Apply binning
result <- ob_cutpoints_num(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