When dealing with surveys, it’s common to want your sample to reflect a specific demographic. When this ideal representation cannot be achieved, you’d usually assign a strictly positive weight to each row reflecting how representative it is of your desired population. This step takes these precomputed weights and uses them to make the input reflect your desired population by repeating the rows a number of times in proportion to their weight until the desired image of your target population is reached within the dataset.

weights
string
required

Name of column to be used as weights.

n_samples_min
integer
default: "1"

Number of samples given to the least weighted set of rows.

Values must be in the following range:

1 ≤ n_samples_min < inf