I'm using this dataset and i'm trying to do logistic regression
heart_data = pd.read_csv('../input/heart-disease-uci/heart.csv') X = heart_data.iloc[:,:-1] y = heart_data.iloc[:,-1] X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.20,random_state=5,shuffle=True) from sklearn.preprocessing import MinMaxScaler nr = MinMaxScaler() X_train = nr.fit_transform(X_train) X_test = nr.transform(X_test) from sklearn.metrics import accuracy_score def cal(method,c=1): lr = LogisticRegression(C=c,solver=method) lr.fit(X_train,y_train) pre_test = lr.predict(X_test) pre_train = lr.predict(X_train) train_score = accuracy_score(y_train,pre_train) test_score = accuracy_score(y_test,pre_test) return train_score,test_score for i in method: print(i,'->>>>>>>>',cal(i))
First is training accuracy and second one is testing accuracy. why am i getting more testing accuracy over training?
And Is there another way to increase the both accuracy? I'm using min-max scaling so are there any other normalization to increase the accuracy more or this is the best accuracy we can get using logistic?