简体   繁体   English

如何在 yellowbrick plot 中标记 X 轴和 Y 轴? 我使用的代码如下所示

[英]How can I labeled the X axis and Y axis in yellowbrick plot? The code is I used is show below

How can I labeled the X axis and Y axis in yellowbrick plot?如何在 yellowbrick plot 中标记 X 轴和 Y 轴? The code is I used is show below.我使用的代码如下所示。

from yellowbrick.regressor import PredictionError

Visualizer = PredictionError(LL_dt)
Visualizer.fit(X_train,y_train)
Visualizer.score(X_test,y_test)
Visualizer.poof()

I tried adding我尝试添加

Visualizer.ax.set_xlabel("Measured")
Visualizer.ax.set_ylabel("Predicted")

but didn't work.但没有用。

Do not use "Visualizer.poof()".不要使用“Visualizer.poof()”。 add your xlabel and ylabel code right after score.在得分后立即添加您的 xlabel 和 ylabel 代码。

Visualizer = PredictionError(LL_dt)
Visualizer.fit(X_train,y_train)
Visualizer.score(X_test,y_test)
Visualizer.ax.set_xlabel("Measured")
Visualizer.ax.set_ylabel("Predicted")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Dash/Plotly:如何使用相同的 x 轴在 y 轴上绘制两列? - Dash/Plotly: How can I plot two columns on the y-axis with the same x axis? 如何使用pyplot旋转图的x轴和y轴 - How can I rotate a plot x axis and y axis using pyplot 如何在其中一个图上具有一个共享的X轴和多个Y轴的堆叠图? - How can I have a stacked plot with a shared X axis and multiple Y axis on one of the plots? 如何在 python 中以像素数为 x 轴,灰度颜色为 y 轴 plot 图形? - How can I plot the figure with the number of pixel as a x-axis and the grayscale color as a y-axis in python? 如何绘制2d平面,x轴范围从0到1,y轴范围从0到1,z轴0 - how can I plot a 2d plane x axis range from 0 to 1, y axis range from 0 to 1, and z axis 0 在 python - 我如何 plot 2D 图(x,y)并通过每个(x,y)坐标的颜色变化添加第三轴? - In python - How can I plot 2D figure (x,y) and add 3rd axis by variation of the colour for each (x,y)-coordinate? 如何在 Python 中更改直方图 Y 轴上的值 - How can I change the values on Y axis of Histogram plot in Python 如何在 Python 图中以弧度设置 y 轴? - How can I set the y axis in radians in a Python plot? 如何在y轴输入和x轴输出绘制函数 - How do I plot a function with input in y-axis and output in x-axis 如何使用 plot 在 x 轴上循环变量 i 和在 y 轴上循环中的局部变量使用 matplotlib - How to plot loop variable i on x-axis and local variable in the loop on y-axis using matplotlib
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM