REG : Perceptron Class Code

Sir, above is the code of the ‘Perceptron’ Class & I have a doubt regarding the highlighted code in it.

As the highlighted code is nothing but the Output of ‘Predict’ Method (defined within the ‘Perceptron’ Class’ itself), so instead of using the highlighted code, is there a way to call the ‘Predict’ Fn. directly using ‘self’ or through some other way - as both the codes (the highlighted one & Calling Predict Fn.), result in the same output (y_pred)?

Please help me get some clarity Sir.

Thank you.

Hi @Chandra,
No, the returned value from predict() is not same as the returned value from model().
Note that predict() uses model(), but actually returns a binary value