I am not talking about how to get the same result every time which can happen by setting the random state
parameter to a number.
I am referring to the fact that since with one run I get 99.2 with the next 89.3, then the other 93.5. If it has so much variation on every random cross validation how can you rely on that?
Example:
from sklearn import datasets
iris = datasets.load_iris()
data1 = pd.DataFrame(data= np.c_[iris['data'], iris['target']],
columns= iris['feature_names'] + ['target'])
X = data1[['sepal length (cm)','sepal width (cm)','petal length (cm)','petal width (cm)']]
y = data1[['target']]
X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.20)
model = LogisticRegression()
model.fit(X_train, y_train)
prediction = model.predict(X_test)
print('Accuracy:',accuracy_score(prediction,y_test))
print(classification_report(y_test,y_pred))
I you run this you will get tremendously different result any time.