# Hard-SVM in Julia

**URL:** <https://discourse.julialang.org/t/hard-svm-in-julia/10326>\
**Category:** Machine Learning\
**Created:** [April 13, 2018, 3:19pm UTC](https://discourse.julialang.org/t/hard-svm-in-julia/10326 "2018-04-13T15:19:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_McVay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_mcvay/32/4307_2.png) [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Post date:** [April 13, 2018, 3:19pm UTC](https://discourse.julialang.org/t/hard-svm-in-julia/10326/1 "2018-04-13T15:19:53Z")

</div>

Is there any library that implements hard-SVM directly instead of soft-SVM? I looked at several libraries and they all seem to implement C-SVM or nu-SVM, something with the slack variables.

---

<div class="post-metadata">

**Author:** ![vvjn](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@vvjn](https://discourse.julialang.org/u/vvjn)\
**Post date:** [April 14, 2018, 3:54pm UTC](https://discourse.julialang.org/t/hard-svm-in-julia/10326/2 "2018-04-14T15:54:29Z")

</div>

They probably don’t implement it because almost all datasets are not linearly separable. You could probably get a good approximate of the solution by setting C really high or nu really low. Also, linear hard margin SVMs can be solved relatively easily with quadratic programming (using say JuMP).

---

<div class="post-metadata">

**Author:** ![Paul\_McVay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_mcvay/32/4307_2.png) [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Post date:** [April 16, 2018, 7:47pm UTC](https://discourse.julialang.org/t/hard-svm-in-julia/10326/3 "2018-04-16T19:47:15Z")

</div>

That’s what I figured. Thanks for the reply
