Description Usage Arguments Details Value Author(s)
Modify the cardinality of the dataset based on the divisibility with the desire clusters.
1 |
df |
dataset to adjust cardinality |
k |
number of desire clusters |
If the cardinality is divisible by k then return the dataset, if not then. obtain a number called "cardinality" where under the cardinality of df is divisible by k
From the elements that are not going to be in the dataset, make a proportional sum (row cardinlaity + 1 to the last one) to add that proportion to each numeric and integer variables on the rows of the dataset that are going to be included.
Define the dataset with rows until the cardinality "cardinality"
Add 2. to each numeric and integer variable of the dataset to have a balanced dataset.
the dataset with the cardinality adjusted based on the desire clusters.
Eduardo Trujillo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.