Machine learning code, derivatives calculation and optimization algorithms developed during the Machine Learning course at Universidade de Sao Paulo. All codes in Python, NumPy and Matplotlib with example in the end of file.
15
stars
4
forks
source link
There is a problem in function svm_predict() and the prediction cannot be implemented correctly #4
Describe the bug The problem appears on line 238 of file svm.py.In the original program, the formula for calculating the self.bias is as follows.
Compute the bias
The bias calculated in this way is incorrect and will cause errors in later predictions
Expected behavior According to the formula I looked up, the correct calculation is as follows.
Compute the bias
Screenshots Screenshot from the watermelon book "Machine learning" Zhou Zhihua section 6.2![image](https://user-images.githubusercontent.com/50142890/229091820-cd26c5b0-f616-43c3-ab6f-c53dbc880822.png)