fix in DistributionMatchingX

This commit is contained in:
Alejandro Moreo Fernandez 2023-11-08 18:11:45 +01:00
parent c3cf0e2d49
commit 66ad7295df
1 changed files with 3 additions and 2 deletions

View File

@ -137,8 +137,9 @@ class DistributionMatchingX(BaseQuantifier):
def __get_distributions(self, X):
histograms = []
for feat_idx in range(self.nfeats):
hist = np.histogram(X[:, feat_idx], bins=self.nbins, density=True, range=self.feat_ranges[feat_idx])[0]
histograms.append(hist)
hist = np.histogram(X[:, feat_idx], bins=self.nbins, range=self.feat_ranges[feat_idx])[0]
normhist = hist / hist.sum()
histograms.append(normhist)
distributions = np.vstack(histograms)
if self.cdf: