Spaces:
Runtime error
Runtime error
new threshold for important factor
Browse files
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_) >
|
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):
|