Wed Oct 8 08:45:11 2025 perceptron_test(): python version: 3.10.12 numpy version: 1.26.4 Use the perceptron algorithm to determine a classifier for sets of data. dividing_line_test(): Apply the perceptron to an artificial data set. Points (x,y) are in set 0 if y < 3x + 2 Points (x,y) are in set 1 if y > 3x + 2 Generate 25 points at random and search for a classifier using the perceptron algorithm Number of training data values = 25 Training data: [[ 0. 0.86814227 2.23100751 0. ] [ 1. 0.31714063 2.97319973 1. ] [ 2. 0.95389327 4.55477559 0. ] [ 3. 0.82160191 3.33925972 0. ] [ 4. 0.78820232 3.77668577 0. ] [ 5. 0.66600506 3.18074217 0. ] [ 6. 0.93284637 2.86397407 0. ] [ 7. 0.98011405 4.91767029 0. ] [ 8. 0.4971054 2.74322088 0. ] [ 9. 0.1032757 4.91401861 1. ] [10. 0.97255306 2.41730742 0. ] [11. 0.69190975 2.83199354 0. ] [12. 0.13882607 2.01883014 0. ] [13. 0.85380568 4.40163591 0. ] [14. 0.71195083 3.37550232 0. ] [15. 0.48813961 3.9514309 1. ] [16. 0.40336446 2.43749345 0. ] [17. 0.6913014 3.98577676 0. ] [18. 0.9610687 3.27145083 0. ] [19. 0.91232136 2.01490951 0. ] [20. 0.11471289 3.79267964 1. ] [21. 0.70661408 3.84182453 0. ] [22. 0.92262046 2.27041796 0. ] [23. 0.23975697 2.82838771 1. ] [24. 0.81580282 2.05473336 0. ]] 25 good y, and 25 bad y 0.103276 <= X <= 0.980114 2.01491 <= Y <= 4.91767 GOOD: mean X = 0.252605, mean Y = 3.69194 BAD: mean X = 0.764502, mean Y = 3.12646 Graphics saved as "dividing_line_data.png" Using learning rate alpha = 0.05 Using 1000 steps All training data classified on step 46 Perceptron weights: f(x) = -0.302601 + -0.930307 * x + 0.20727 * y Index x*w (0 {0, 1} Generator ratings Number of generators = 56 56 good generators, and 56 bad generators 562 <= RPM <= 939 79 <= VIB <= 585 GOOD: mean RPM = 740.75, mean VIB = 447.286 BAD: mean RPM = 741.964, mean VIB = 219.857 Graphics saved as "generator_ratings_data.png" All training data classified on step 8 Perceptron weights: f(x) = -0.541674 + 0.397848 * r + 0.740477 * v Index x*w (0