diff --git a/skfeature/function/similarity_based/lap_score.py b/skfeature/function/similarity_based/lap_score.py index 5bee2f8..bfaec90 100644 --- a/skfeature/function/similarity_based/lap_score.py +++ b/skfeature/function/similarity_based/lap_score.py @@ -33,7 +33,8 @@ def lap_score(X, **kwargs): if 'W' not in kwargs.keys(): W = construct_W(X) # construct the affinity matrix W - W = kwargs['W'] + else: + W = kwargs['W'] # build the diagonal D matrix from affinity matrix W D = np.array(W.sum(axis=1)) L = W