{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# import awswrangler as wr\n", "import pandas as pd\n", "import numpy as np\n", "# import boto3\n", "# from sagemaker import get_execution_role\n", "import datetime\n", "import string\n", "import random\n", "from pycaret.classification import *" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "data = pd.read_csv('data/data_feature_eng.csv')\n", "# print(data)\n", "# m_setup = setup(data=data, target='label', normalize=True, \n", "# feature_interaction=False, \n", "# feature_ratio=False,\n", "# trigonometry_features=False,\n", "# use_gpu=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Transformation Pipeline and Model Successfully Loaded\n" ] } ], "source": [ "# plot_model(tuned_dt, plot='auc')\n", "mdl = load_model('tuned_xgboost_0207')" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1.0" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# plot_model(mdl, plot='auc')\n", "# evaluate_model(mdl)\n", "new_prediction = predict_model(mdl, data=data)\n", "from pycaret.utils import check_metric\n", "check_metric(new_prediction['label'], new_prediction['label'], metric = 'Accuracy')" ] } ], "metadata": { "interpreter": { "hash": "916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1" }, "kernelspec": { "display_name": "Python 3.8.10 64-bit", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.12" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }