Hi,
I want to balance multi-class unbalanced data with ROSE. How do I do this in Knime?
Hello @Uur_Ercan,
Welcome to the forum.
If you are looking to implement this using the R package ROSE, I would suggest using the R Snippet node. You can write you code in the node, here is a simple code with not much configuration:
library(ROSE)
#input data
data <- knime.in
balanced_data <- ROSE(target_column ~ ., data = data, seed = 0)$data
# Output balanced data
knime.out <- balanced_data
Hope this helps.
Best,
Keerthan
1 Like
@Uur_Ercan here are some examples although I think ROSE does not per se support multi class settings and once can debate if this sort of balancing doe make sense. There are also links to some ‘balancing’ debates in this workflow:
2 Likes