Please help for cross validation to do keyboard input

import numpy as np import pandas as pd from sklearn.model_selection import cross_val_score from sklearn.cross_validation import train_test_split from sklearn.ensemble import AdaBoostClassifier data = pd.read_csv(r'D:\download\ENB2012.csv', ';') data.head() kfold = 5 #количество подвыборок для валидации itog_val = {} #список для записи результатов кросс валидации разных алгоритмов X = data.drop('Y1', axis=1).values[:, :7] # [y] столбец не должен попадать в [X] y = data['Y1'].values X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) print ('обучающая выборка:\n', X_train[:9]) print ('\n') print ('тестовая выборка:\n', X_test[:7]) clf = AdaBoostClassifier(n_estimators=70) scores = cross_val_score(clf, X_train, y_train, cv=kfold) itog_val['AdaBoostClassifier'] = scores.mean() print ('итог', itog_val) clf.fit(X_train, y_train) clf.score(X_test, y_test) y_test_predicted = clf.predict(X_test) print ('AdaBoostClassifier first 9 predicted values:\n', y_test_predicted[:9]) res = pd.DataFrame(np.column_stack((y_test, y_test_predicted, X_test)), columns=['Y1','YP'] + data.columns[1:8].tolist()) res 
  • text = input("Input a = ") ? - gil9red
  • Please specify the question - what should be entered from the keyboard? - MaxU
  • for cross validation, kfold = 5, so that after the introduction with input there were further changes, that is, so that the test and training samples should be divided from the cross validation entered with input - user280357

0