cardinality_adjustment: cardinality_adjustment

Description Usage Arguments Details Value Author(s)

Description

Modify the cardinality of the dataset based on the divisibility with the desire clusters.

Usage

1

Arguments

df

dataset to adjust cardinality

k

number of desire clusters

Details

  1. 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

  2. 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.

  3. Define the dataset with rows until the cardinality "cardinality"

  4. Add 2. to each numeric and integer variable of the dataset to have a balanced dataset.

Value

the dataset with the cardinality adjusted based on the desire clusters.

Author(s)

Eduardo Trujillo


1Edtrujillo1/udeploy documentation built on July 13, 2021, 9:12 p.m.