4
$\begingroup$

Do you know what is the best way to force positive coefficients with Logistic Regression and Linear SVC using scikit learn?

for instance

svm = LinearSVC(loss='hinge'  )
coefficients = svm.coef_

Is there a way to force them to be positive numbers?

$\endgroup$

1 Answer 1

0
$\begingroup$

You can do that using the clogistic package. https://pypi.org/project/clogistic/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.