Skip to content

Commit

Permalink
Merge pull request #30 from rolisz/patch-2
Browse files Browse the repository at this point in the history
Remove itemfreq
  • Loading branch information
lopuhin authored Oct 12, 2022
2 parents 4ed37d7 + c9b0b24 commit 03ec379
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions eli5/lime/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import six

import numpy as np
from scipy.stats import itemfreq
from sklearn.base import BaseEstimator, clone
from sklearn.neighbors import KernelDensity
from sklearn.metrics import pairwise_distances
Expand Down Expand Up @@ -188,7 +187,7 @@ def _sampler_n_samples(self, n_samples):
p=self.weights)
return [
(self.samplers[idx], freq)
for idx, freq in itemfreq(sampler_indices)
for idx, freq in zip(*np.unique(sampler_indices, return_counts=True))
]


Expand Down

0 comments on commit 03ec379

Please sign in to comment.