fix in DistributionMatchingX
This commit is contained in:
parent
c3cf0e2d49
commit
66ad7295df
|
@ -137,8 +137,9 @@ class DistributionMatchingX(BaseQuantifier):
|
||||||
def __get_distributions(self, X):
|
def __get_distributions(self, X):
|
||||||
histograms = []
|
histograms = []
|
||||||
for feat_idx in range(self.nfeats):
|
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]
|
hist = np.histogram(X[:, feat_idx], bins=self.nbins, range=self.feat_ranges[feat_idx])[0]
|
||||||
histograms.append(hist)
|
normhist = hist / hist.sum()
|
||||||
|
histograms.append(normhist)
|
||||||
|
|
||||||
distributions = np.vstack(histograms)
|
distributions = np.vstack(histograms)
|
||||||
if self.cdf:
|
if self.cdf:
|
||||||
|
|
Loading…
Reference in New Issue