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

120 Views Asked by At

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.

1

There are 1 best solutions below

0
larrywgray On

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