I have a test dataset and train dataset as below. I have provided a sample data with min records, but my data has than 1000\'s of records. Here E is my target variable which I n
You could try
LogisticRegression(multi_class='multinomial',solver ='newton-cg').fit(X_train,y_train)
LogisticRegression can handle multiple classes out-of-the-box.
X = df[['A', 'B', 'C', 'D']]
y = df['E']
lr = LogisticRegression()
lr.fit(X, y)
preds = lr.predict(X) # will output array with integer values.