SO 私は最近 ipython を使用しようとし始めましたが、出力グラフを生成できないことがわかりました。ipython で次のコードを実行しています。
from sklearn import linear_model
regr = linear_model.LinearRegression()
regr.fit(x, y)
pl.plot(x, y, 'o')
pl.plot(x_test, regr.predict(x_test))
そして、私は出力を受け取っています:
[<matplotlib.lines.Line2D at 0x21d453b0>]
画像添付なし。
pythonxy パッケージを使用して ipython をインストールしました。ipythonでプロットを正しく出力する方法に関する提案についての考え
添付の画像を参照してください: