From 063f41adbd1db6a5dbdcc27b1934645e92ac639b Mon Sep 17 00:00:00 2001 From: Huilin Qu Date: Tue, 7 May 2024 14:09:31 +0200 Subject: [PATCH] Display sample weight distribution in log file. --- weaver/utils/data/preprocess.py | 1 + 1 file changed, 1 insertion(+) diff --git a/weaver/utils/data/preprocess.py b/weaver/utils/data/preprocess.py index a0a86a60..611c8969 100644 --- a/weaver/utils/data/preprocess.py +++ b/weaver/utils/data/preprocess.py @@ -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)))