|
292 | 292 | }
|
293 | 293 | ],
|
294 | 294 | "source": [
|
295 |
| - "asc.train_and_save_classifier(model, \"model.pkl\", model_type\n", |
| 295 | + "asc.train_and_save_classifier(model, \"model_1.pkl\", model_type\n", |
296 | 296 | " , input_cols=header_x, target_col=header_y\n",
|
297 | 297 | " , x_train=x_train, y_train=y_train, scaler_option=scaler_option, path_to_save = '.', accuracy=accuracy)"
|
298 | 298 | ]
|
|
313 | 313 | ],
|
314 | 314 | "source": [
|
315 | 315 | "# You can load the saved model by using pickle package\n",
|
316 |
| - "model_dict = pickle.load(open('model.pkl', 'rb'))\n", |
| 316 | + "model_dict = pickle.load(open('model_1.pkl', 'rb'))\n", |
317 | 317 | "\n",
|
318 | 318 | "# Let's assume that we have a input as follows\n",
|
319 | 319 | "x_to_predict = [[4.5, 2.4, 1.2, 4.2]]\n",
|
|
564 | 564 | ],
|
565 | 565 | "source": [
|
566 | 566 | "# saving the trained model in a file\n",
|
567 |
| - "asc.train_and_save(model, \"trained_model\", model_type\n", |
| 567 | + "asc.train_and_save(model, \"model_2.pkl\", model_type\n", |
568 | 568 | " , input_cols=header_x, target_col=header_y\n",
|
569 | 569 | " , x_train=x_train, y_train=y_train, scaler_option=scaler_option, path_to_save = '.', MAE=MAE, R2=R2)"
|
570 | 570 | ]
|
|
595 | 595 | "name": "python",
|
596 | 596 | "nbconvert_exporter": "python",
|
597 | 597 | "pygments_lexer": "ipython3",
|
598 |
| - "version": "3.6.9" |
| 598 | + "version": "3.7.1" |
599 | 599 | }
|
600 | 600 | },
|
601 | 601 | "nbformat": 4,
|
|
0 commit comments