简体   繁体   中英

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? 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()". add your xlabel and ylabel code right after score.

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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM