Skip to content

Commit

Permalink
Display sample weight distribution in log file.
Browse files Browse the repository at this point in the history
  • Loading branch information
hqucms committed May 7, 2024
1 parent 5a88c20 commit 063f41a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weaver/utils/data/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def make_weights(self, table):

if self._data_config.reweight_basewgt:
wgts = _build_weights(table, self._data_config, reweight_hists=result)
_logger.info('Sample weight percentiles: %s', str(np.percentile(wgts, np.arange(101))))
wgt_ref = np.percentile(wgts, 100 - self._data_config.reweight_threshold)
_logger.info('Set overall reweighting scale factor (%d threshold) to %s (max %s)' %
(100 - self._data_config.reweight_threshold, wgt_ref, np.max(wgts)))
Expand Down

0 comments on commit 063f41a

Please sign in to comment.