Description Usage Arguments Details
Classification models work best with "balanced" datasets where the number of positive negative cases are roughly equal. This function takes an input tibble and balances it by randomly downsampling until it has the same number of positive and negative cases.
1 |
data |
A tibble with input data. |
var |
The name of the column to balance. |
Note! It assumes there are more positive than negative cases because this is always true in the customer-review datasets I'm working with. If your data differs, the code is straightforward to modify.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.