Input-
#Bulding the SVM model
kernel=['poly', 'sigmoid', 'rbf']
c = [0.01, 0.1, 1, 10]
gamma = [0.01, 0.1, 1]
epsilon = [0.01, 0.1, 1]
shrinking = [True, False]
svm_grid = {'kernel' : kernel, 'C': c, 'gamma' : gamma, 'epsilon' : epsilon, 'shrinking' : shrinking}
svm = SVR()
svm_search = RandomizedSearchCV(svm, svm_grid, scoring = 'neg_mean_squared_error', cv=3, return_train_score=True, n_jobs=-1, n_iter=40, verbose=1)
svm_search.fit(x_train_confirmed, y_train_confirmed)
Output-
NameError Traceback (most recent call last)
<ipython-input-116-8315c56bdc54> in <module>()
10 svm = SVR()
11 svm_search = RandomizedSearchCV(svm, svm_grid, scoring = 'neg_mean_squared_error', cv=3, return_train_score=True, n_jobs=-1, n_iter=40, verbose=1)
---> 12 svm_search.fit(x_train_confirmed, y_train_confirmed)
NameError: name 'x_train_confirmed' is not defined
Я получаю вышеуказанную ошибку в своем коде. Я запускаю это на ноутбуке Jupyter в python3