Error when plotting it says kernel crashed #941
Unanswered
Harshith-reddy-td
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
code:
Plot the training and testing data
def plot_predictions(train_data = X_train,
train_labels = y_train,
test_data = X_test,
test_labels = y_test,
predictions = None):
plt.figure(figsize = (10,7))
plt.scatter(train_data,train_labels,c = 'b',s = 4,label = "Training data")
plt.scatter(test_data,test_labels,c = 'g',s = 4,label = "Test data")
if predictions is not None:
plt.scatter(test_data,predictions,c = 'r',s = 4,label = "Predictions")
plt.legend(prop = {"size" : 14})
plot_predictions()
result:

The Kernel crashed while executing code in the current cell or a previous cell.
Please review the code in the cell(s) to identify a possible cause of the failure.
Click here for more info.
View Jupyter log for further details.
Beta Was this translation helpful? Give feedback.
All reactions