File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -589,9 +589,9 @@ def __call__(self, data):
589589 if sp .issparse (data .X ):
590590 data_csc = sp .csc_matrix (data .X )
591591 h , w = data_csc .shape
592- sparsness = [data_csc [:, i ].count_nonzero ()/ h for i in range (w )]
592+ sparsness = [data_csc [:, i ].count_nonzero () / h for i in range (w )]
593593 else :
594- sparsness = np .count_nonzero (data .X , axis = 0 )/ data .X .shape [0 ]
594+ sparsness = np .count_nonzero (data .X , axis = 0 ) / data .X .shape [0 ]
595595 att = [a for a , s in zip (data .domain .attributes , sparsness ) if s >= self .threshold ]
596596 domain = Orange .data .Domain (att , data .domain .class_vars ,
597597 data .domain .metas )
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ def setThresh(self, thresh):
271271 self .changed .emit ()
272272
273273 def parameters (self ):
274- return {'sparse_thresh' :self .sparse_thresh }
274+ return {'sparse_thresh' : self .sparse_thresh }
275275
276276 def setParameters (self , params ):
277277 self .setThresh (params .get ('sparse_thresh' , 5 ))
@@ -280,7 +280,7 @@ def setParameters(self, params):
280280 def createinstance (params ):
281281 params = dict (params )
282282 threshold = params .pop ('sparse_thresh' , 5 )
283- return RemoveSparse (threshold = threshold / 100 )
283+ return RemoveSparse (threshold = threshold / 100 )
284284
285285class ImputeEditor (BaseEditor ):
286286 (NoImputation , Constant , Average ,
You can’t perform that action at this time.
0 commit comments