Last time University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (9) https://github.com/legacyworld/sklearn-basic
If there are outliers this time Youtube commentary is 6th (1) 55 minutes 30 seconds
The program just adds two lines
X = np.insert(X,0,[5,-50],axis=0)
y = np.insert(y,0,1)
It seems that the first value is replaced in the course, but adding one does not seem to change that much.
This is the execution result. Even if there is one value that deviates greatly, if the answer is correct, the hinge loss will be 0, so there is no effect.
This also adds two lines, but for some reason the coordinates have changed to [5, -35]. Probably because the square loss is too large if it is done at [5, -50]. Here is the execution result
When there is a large outlier, the hinge loss is classified without any problem, but in the square loss, even if the answer is correct, a distant one gives a large penalty, which makes it strange.
University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (1) University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (2) University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (3) University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (4) University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (5) University of Tsukuba Machine Learning Course: Study sklearn while creating the Python script part of the assignment (6) University of Tsukuba Machine Learning Course: Study sklearn while making the Python script part of the task (7) Make your own steepest descent method University of Tsukuba Machine Learning Course: Study sklearn while making the Python script part of the task (8) Make your own stochastic steepest descent method https://github.com/legacyworld/sklearn-basic https://ocw.tsukuba.ac.jp/course/systeminformation/machine_learning/
Recommended Posts