Intro To ML PDF
Intro To ML PDF
Intro To ML PDF
learning
1. Define two classes (CY and CN) that correspond to Apple = Yes and
Apple = No.
Naïve Bayes assumes that the features of the input data (the apple
30 30,000
70 40,000
90 55,000
110 60,000
130 80,000
150 90,000
180 95,000
190 110,000
C. $85,000 70 40,000
90 55,000
110 60,000
130 80,000
150 90,000
180 95,000
190 110,000
• After the learning process, you get the most accurate line, the bias, and the
slope to draw your line.
Logistic function
Iteration 1:
• Now, we calculate for each point to which center it belongs. The result
depends on the distance between the center and the point (by using
Euclidian distance):
Point 1: (1, 1) d11 = Yes d12 = No
This means point1(2,2) belongs to C1 and not C2 because it is closer to C1.
▪ Point 2: (2, 1) d21 = No, d22 = Yes
▪ Point 3: (4, 3) d31 = No, d32 = Yes
▪ Point 4: (5, 4) d41 = No, d42 = Yes
• Now, we calculate the new centroid as follows:
▪ C1 = (1, 1)
▪ C2 = 1/3 ((2, 1) + (4, 3) + (5, 4)) = (3.67, 2.67)