ludusc commited on
Commit
50eece1
1 Parent(s): 0ed5e86

new threshold for important factor

Browse files
Files changed (1) hide show
  1. backend/disentangle_concepts.py +1 -1
backend/disentangle_concepts.py CHANGED
@@ -15,7 +15,7 @@ def get_separation_space(type_bin, annotations, df):
15
  svc = SVC(gamma='auto', kernel='linear')
16
  svc.fit(x_train, y_train)
17
  print(svc.score(x_val, y_val))
18
- imp_features = (np.abs(svc.coef_) > 2).sum()
19
  return svc.coef_, imp_features
20
 
21
  def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3, count=11):
 
15
  svc = SVC(gamma='auto', kernel='linear')
16
  svc.fit(x_train, y_train)
17
  print(svc.score(x_val, y_val))
18
+ imp_features = (np.abs(svc.coef_) > 0.01).sum()
19
  return svc.coef_, imp_features
20
 
21
  def regenerate_images(model, z, decision_boundary, min_epsilon=-3, max_epsilon=3, count=11):