https://www.pycodemates.com/2022/09/primal-formulation-of-svm-simplified.html