Removed warning, requiring to send dual explicitly to True.

This commit is contained in:
Heiko Joerg Schick
2023-09-11 20:31:18 +02:00
parent 4c5fbe4786
commit 02ee89dcc5
+1 -1
View File
@@ -106,7 +106,7 @@ def calculate_recommendation(
y[ptoi[pid]] = 1.0
# classify
clf = svm.LinearSVC(class_weight='balanced', verbose=False, max_iter=10000, tol=1e-6, C=0.01)
clf = svm.LinearSVC(class_weight='balanced', verbose=False, max_iter=10000, tol=1e-6, C=0.01, dual=True)
clf.fit(x, y)
s = clf.decision_function(x)
sortix = np.argsort(-s)