J. Doe
0
Q:

scatter plot actual vs predicted python

plot.scatter(xTrain, yTrain, color = 'red')plot.plot(xTrain, linearRegressor.predict(xTrain), color = 'blue')plot.title('Salary vs Experience (Training set)')plot.xlabel('Years of Experience')plot.ylabel('Salary')plot.show()
1
linearRegressor.fit(xTrain, yTrain)
1
plot.scatter(xTest, yTest, color = 'red')plot.plot(xTrain, linearRegressor.predict(xTrain), color = 'blue')plot.title('Salary vs Experience (Test set)')plot.xlabel('Years of Experience')plot.ylabel('Salary')plot.show()
0

New to Communities?

Join the community