Skip to content

Commit

Permalink
Merge pull request jundongl#8 from thelole/reliefFix
Browse files Browse the repository at this point in the history
The previous version used random sampling with duplicates
  • Loading branch information
jundongl authored Sep 8, 2016
2 parents 09c623b + acca39c commit 1c8f355
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions skfeature/function/similarity_based/reliefF.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from random import randrange
from sklearn.metrics.pairwise import pairwise_distances


Expand Down Expand Up @@ -41,8 +40,7 @@ def reliefF(X, y, **kwargs):
score = np.zeros(n_features)

# the number of sampled instances is equal to the number of total instances
for iter in range(n_samples):
idx = randrange(0, n_samples, 1)
for idx in range(n_samples):
near_hit = []
near_miss = dict()

Expand Down

0 comments on commit 1c8f355

Please sign in to comment.