scikit-feature icon indicating copy to clipboard operation
scikit-feature copied to clipboard

'W' key error in line 46 of laplacian_score.py

Open lguangyu opened this issue 2 years ago • 0 comments

The error is stated in the title. Source file shows:

42     # if 'W' is not specified, use the default W
43     if "W" not in list(kwargs.keys()):
44         W = construct_W(X)
45     # construct the affinity matrix W
46     W = kwargs["W"]

I guess it should be:

42     # if 'W' is not specified, use the default W
43     if "W" not in list(kwargs.keys()):
44         W = construct_W(X)
45     else:
46         W = kwargs["W"]

Am I correct?

lguangyu avatar Sep 01 '22 15:09 lguangyu