相关疑难解决方法(0)

当我在jupyter笔记本中使用matplotlib时,它总是引发"matplotlib目前正在使用非GUI后端"错误?

import matplotlib.pyplot as pl
%matplot inline
def learning_curves(X_train, y_train, X_test, y_test):
""" Calculates the performance of several models with varying sizes of training data.
    The learning and testing error rates for each model are then plotted. """

print ("Creating learning curve graphs for max_depths of 1, 3, 6, and 10. . .")

# Create the figure window
fig = pl.figure(figsize=(10,8))

# We will vary the training set size so that we have 50 different sizes
sizes = np.rint(np.linspace(1, len(X_train), 50)).astype(int) …
Run Code Online (Sandbox Code Playgroud)

python matplotlib jupyter-notebook

36
推荐指数
8
解决办法
6万
查看次数

标签 统计

jupyter-notebook ×1

matplotlib ×1

python ×1