reweight: Re-weighting

Description Usage Arguments Value

View source: R/useful_functions.R

Description

Re-weighting to preserve the sum of weights in each binary class

Usage

1
reweight(weights, labels, N_s, N_b)

Arguments

weights

Input weights (unnormalized).

labels

Binary labels of the data points corresponding to the input weights (labels should be 0/1).

N_s

Desired sum of weights corresponding to data points with labels equal to 1.

N_b

Desired sum of weights corresponding to data points with labels equal to 1.

Value

Normalized weights


hsansford1/higgsboson documentation built on Jan. 22, 2022, 4:34 a.m.