In perceptron model:

It gives a accuracy of 78.47% using the fit() function but it gives 76.19% using the predict() function for the training data.

I don’t know why is it happening.

Here is the code;

wt_matrix = perceptron.fit(x_train,y_train,100,0.001) – This gives accuracy_score = 0.7847141190198367

Where as;

y_pred_train = perceptron.predict(x_train)

print(accuracy_score(y_pred_train,y_train)) --This gives accuracy_score = 0.7619603267211202