axesの中身がどうなっているのかわかりません。
print(axes)としても
[[<matplotlib.axes._subplots.AxesSubplot object at 0x1c17f9fb90>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c19f16ed0>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c19e3ed50>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c1a276490>]
[<matplotlib.axes._subplots.AxesSubplot object at 0x1c1cc4cb10>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c1e038c90>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c19e68050>
<matplotlib.axes._subplots.AxesSubplot object at 0x1c1a26c610>]]
と出てきて、これが何を意味するのかわかりません。
また、axx, axの中身もaxesと同じなのでしょうか?
fig, axes = plt.subplots(3, 4, figsize=(20, 8)) for axx, n_hidden_nodes in zip(axes, [10, 100]): for ax, alpha in zip (axx, [0.0001, 0.01, 0.1, 1]): mlp = MLPClassifier(solver='lbfgs', random_state = 0, hidden_layer_sizes=[n_hidden_nodes, n_hidden_nodes], alpha=alpha) mlp.fit(X_train, y_train) mglearn.plots.plot_2d_separator(mlp, X_train, fill=True, alpha = .3, ax=ax) mglearn.discrete_scatter(X_train[:, 0], X_train[:, 1], y_train, ax=ax)

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/23 07:30
2019/08/23 07:36
2019/08/23 07:37
2019/08/23 07:40