-1
y_test=np.array(y_test)
y_pred=np.array(y_pred)
plt.scatter(y_test,y_pred,color='red')
plt.xlabel('Actual Values')
plt.ylabel('Prediction Values')
plt.title('Actual vs Predicted')

I have tried the above code and have got the below graph.

![enter image description here][1]

The graph axis values are coming in exp form. How to correct that? enter image description here

1 Answers1

0

You may need to explicitly set the axis labels to the number format you need using scientific notation if you are not okay with the format provided by default. Link here. A sample example is shown below. You will need to adjust scilimits to indicate how many digits you want to see in the plot.

x=[2000000, 4000000, 6000000, 8000000]
y=[2000000, 4000000, 6000000, 8000000]
plt.scatter(x, y, c='red')
plt.ticklabel_format(style='sci', axis='both', scilimits=(5,7))
plt.show()

enter image description here

Redox
  • 9,321
  • 5
  • 9
  • 26