Skip to content

Commit

Permalink
Exported final model with pickle
Browse files Browse the repository at this point in the history
  • Loading branch information
Eshan Srivastava committed Jan 17, 2022
1 parent cb730d4 commit 88bf35b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Binary file modified models/model.pkl
Binary file not shown.
23 changes: 21 additions & 2 deletions notebooks/Model Building.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 70,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -23,7 +23,8 @@
"from sklearn.metrics import mean_squared_error, r2_score\n",
"from sklearn.preprocessing import StandardScaler\n",
"from sklearn.svm import SVR\n",
"import math"
"import math\n",
"import pickle"
]
},
{
Expand Down Expand Up @@ -289,6 +290,24 @@
"plt.ylabel('High')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*We can see that the SVM is slightly better than Linear Regression*"
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
"#exporting model\n",
"with open('../models/model.pkl', 'wb') as final_model:\n",
" pickle.dump(svregressor, final_model)"
]
}
],
"metadata": {
Expand Down

0 comments on commit 88bf35b

Please sign in to comment.