Created
May 12, 2018 21:47
-
-
Save grohith327/9cc4d71ea0bc7ac7f2cf6016465b1c7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
f,(ax1,ax2) = plt.subplots(1,2,figsize=(30,10)) | |
# Linear Regression | |
ax1.scatter(range(len(y_test)),y_test,label='data') | |
ax1.plot(range(len(y_test)),y_pred_lr,color='green',label='LR model') | |
ax1.legend() | |
# Support Vector Machine | |
ax2.scatter(range(len(y_test)),y_test,label='data') | |
ax2.plot(range(len(y_test)),y_pred_svr,color='orange',label='SVM-RBF model') | |
ax2.legend() | |
f1,(ax3,ax4) = plt.subplots(1,2,figsize=(30,10)) | |
# Random Forest Regressor | |
ax3.scatter(range(len(y_test)),y_test,label='data') | |
ax3.plot(range(len(y_test)),y_pred_rf,color='red',label='RF model') | |
ax3.legend() | |
# Gradient Boosting Regressor | |
ax4.scatter(range(len(y_test)),y_test,label='data') | |
ax4.plot(range(len(y_test)),y_pred_gb,color='black',label='GB model') | |
ax4.legend() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment