# How to resolve name 'log_reg' is not defined [closed]

I am working with the cancer data everything is working perfect but just after the window update i am getting this error

this is my python code

df=pd.read_csv('breast-cancer-wisconsin-data.csv')
mg.plots.plot_knn_classification(n_neighbors=3)

x_train,x_test,y_train,y_test=train_test_split(cancer.data,cancer.target,stratify=cancer.target,random_state=42)
log_reg100=LogisticRegression(C=100)
log_reg100.fit(x_train,y_train)
print("Accuracy on training set {}",format(log_reg.score(x_train,y_train)))
print("Accuracy on training set {}",format(log_reg.score(x_test,y_test)))

• Replace log_reg.score with log_reg100.score – timleathart Apr 20 '18 at 22:12
• You should add the error message to the question. – wacax Apr 21 '18 at 21:15