ludusc commited on
Commit
83d8189
·
1 Parent(s): 10930fc

lowered threshold

Browse files
Files changed (1) hide show
  1. backend/disentangle_concepts.py +2 -2
backend/disentangle_concepts.py CHANGED
@@ -25,8 +25,8 @@ def get_separation_space(type_bin, annotations, df, samples=100, method='LR', C=
25
  clf = LogisticRegression(random_state=0, C=C)
26
  clf.fit(x_train, y_train)
27
  print('Val performance logistic regression', clf.score(x_val, y_val))
28
- imp_features = (np.abs(clf.coef_) > 0.2).sum()
29
- imp_nodes = np.where(np.abs(clf.coef_) > 0.2)[1]
30
  return clf.coef_ / np.linalg.norm(clf.coef_), imp_features, imp_nodes
31
 
32
 
 
25
  clf = LogisticRegression(random_state=0, C=C)
26
  clf.fit(x_train, y_train)
27
  print('Val performance logistic regression', clf.score(x_val, y_val))
28
+ imp_features = (np.abs(clf.coef_) > 0.15).sum()
29
+ imp_nodes = np.where(np.abs(clf.coef_) > 0.15)[1]
30
  return clf.coef_ / np.linalg.norm(clf.coef_), imp_features, imp_nodes
31
 
32