Skip to content

Commit

Permalink
fix norm of weightsin wprod
Browse files Browse the repository at this point in the history
  • Loading branch information
leliel12 committed May 26, 2017
1 parent 91cd3c0 commit 9885ce5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion skcriteria/madm/wprod.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def preprocess(self, data):
non_zero = norm.add1to0(non_negative, axis=0)
nmtx = self._mnorm(non_zero, axis=0)
ncriteria = util.criteriarr(data.criteria)
nweights = self._wnorm(data.weights) if data.weights is not None else 1
nweights = (
self._wnorm(data.weights, criteria=data.criteria)
if data.weights is not None else
np.ones(data.criteria.shape))
return Data(mtx=nmtx, criteria=ncriteria, weights=nweights,
anames=data.anames, cnames=data.cnames)

Expand Down

0 comments on commit 9885ce5

Please sign in to comment.