text_plain_output_1.png
from sklearn.ensemble import RandomForestClassifier

from sklearn.linear_model import LogisticRegression

from sklearn.model_selection import cross_val_score

from sklearn.naive_bayes import GaussianNB

from sklearn.neighbors import KNeighborsClassifier

from sklearn.preprocessing import StandardScaler

from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
scaler.fit(X_train)
X_train = scaler.transform(X_train)
X_test = scaler.transform(X_test)

gnb = GaussianNB()
cv = cross_val_score(gnb, X_train, y_train, cv=5)

lr = LogisticRegression(max_iter=2000)
cv = cross_val_score(lr, X_train, y_train, cv=5)

knn = KNeighborsClassifier(n_neighbors=4)
cv = cross_val_score(knn, X_train, y_train, cv=5)

rf = RandomForestClassifier(random_state=42)
cv = cross_val_score(rf, X_train, y_train, cv=5)
print(cv)
print(cv.mean())