Skip to content

Commit

Permalink
Merge pull request #68 from parklab/dev
Browse files Browse the repository at this point in the history
Update preprocessing.py to change a default value
  • Loading branch information
Hu-JIN committed Dec 4, 2023
2 parents d7f9aba + a5b2bd7 commit f91223f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions musical/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def gini(x, input_sorted=True):
"""
if not input_sorted:
x = np.sort(x)

n = len(x)
aux = x * (2 * np.arange(n) - n + 1)
scaling = 1 / (n * np.sum(x))
Expand Down Expand Up @@ -52,7 +52,7 @@ def n_remove_gini(x, gini_delta, thresh):
return n_remove


def remove_samples_based_on_gini(H, X, gini_baseline=.65, gini_delta=.005):
def remove_samples_based_on_gini(H, X, gini_baseline=.65, gini_delta=.05):
"""
Identify signatures with unequal exposures. A signature is said to have unequal exposures if the
Gini coefficient of the sample exposures is higher than a given threshold.
Expand Down Expand Up @@ -347,4 +347,4 @@ def stratify_samples(X, H=None, sil_thresh=0.9,
k = 1
clusters = [np.arange(0, n_samples)]
Xs = [X]
return k, clusters, Xs, optimalK
return k, clusters, Xs, optimalK

0 comments on commit f91223f

Please sign in to comment.