Error while plotting Logistic Regression Classification
The error occurs because X_train and Y_train are pandas dataframes and you are trying to directly access them as arrays. There are two solutions:


Convert X_train and Y_train to arrays before using them as:



  X_set, y_set = X_train.values, Y_train.values



Whenever you are accessing their values use iloc so everywhere replace X_set by X_set.iloc