This commit is contained in:
Your Name
2021-02-08 11:17:02 +00:00
parent 7085b7ef54
commit 54ccb1423f
28 changed files with 136 additions and 52 deletions
+4 -1
View File
@@ -10,7 +10,10 @@
},
"outputs": [],
"source": [
"from sklearn.datasets import load_breast_cancer"
"from sklearn.datasets import load_breast_cancer\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -11,7 +11,10 @@
"outputs": [],
"source": [
"import pandas as pd\n",
"import altair as alt"
"import altair as alt\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -12,7 +12,10 @@
"source": [
"# Importing necessary packages\n",
"import pandas as pd\n",
"import altair as alt"
"import altair as alt\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -23,7 +23,10 @@
"# import libraries\n",
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+4 -1
View File
@@ -25,7 +25,10 @@
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression\n",
"from sklearn.metrics import roc_curve\n",
"from sklearn.metrics import auc"
"from sklearn.metrics import auc\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+3 -1
View File
@@ -25,7 +25,9 @@
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LogisticRegression\n",
"from sklearn.metrics import roc_curve\n",
"from sklearn.metrics import auc"
"from sklearn.metrics import auc\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+3 -1
View File
@@ -22,7 +22,9 @@
"source": [
"import pandas as pd\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LinearRegression\n"
"from sklearn.linear_model import LinearRegression\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+6 -3
View File
@@ -16,7 +16,10 @@
"\n",
"from sklearn.model_selection import train_test_split \n",
"\n",
"from sklearn.linear_model import LogisticRegression"
"from sklearn.linear_model import LogisticRegression\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -202,7 +205,7 @@
"# Plot the RoC \n",
"# Uncomment the following block of code to see the plot\n",
"\n",
"'''import matplotlib.pyplot as plt \n",
"import matplotlib.pyplot as plt \n",
"\n",
"%matplotlib inline \n",
"\n",
@@ -220,7 +223,7 @@
"\n",
"plt.title('Receiver Operating Characteristic') \n",
"\n",
"plt.show() '''"
"plt.show()"
]
}
],
+26 -5
View File
@@ -277,12 +277,33 @@
"outputs": [],
"source": [
"# visualize the result\n",
"#(\n",
"# results.loc[:,['params','mean_test_score']]\n",
"# .sort_values('mean_test_score', ascending=True)\n",
"# .plot.barh(x='params', xlim=(0.8))\n",
"#)"
"(\n",
" results.loc[:,['params','mean_test_score']]\n",
" .sort_values('mean_test_score', ascending=True)\n",
" .plot.barh(x='params', xlim=(0.8))\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
@@ -11,7 +11,10 @@
"outputs": [],
"source": [
"# Loading the necessary library files\n",
"import pandas as pd"
"import pandas as pd\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -1,18 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {},
"colab_type": "code",
"id": "45Bl5J8c07xl"
},
"outputs": [],
"source": [
"!pip install smote-variants"
]
},
{
"cell_type": "code",
"execution_count": null,
@@ -24,7 +11,10 @@
"outputs": [],
"source": [
"# Loading the necessary library files\n",
"import pandas as pd"
"import pandas as pd\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
@@ -10,7 +10,9 @@
},
"outputs": [],
"source": [
"import pandas as pd"
"import pandas as pd\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")"
]
},
{
+11 -2
View File
@@ -350,7 +350,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -394,7 +394,9 @@
"outputs": [],
"source": [
"headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}\n",
"ip_address = socket.gethostbyname(socket.gethostname())"
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080'\n",
"\n",
"ip_address"
]
},
{
@@ -425,6 +427,13 @@
"r = requests.post(f\"http://{ip_address}/api\", data=record, headers=headers)\n",
"r.text"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
+9 -2
View File
@@ -42,7 +42,7 @@
},
"outputs": [],
"source": [
"ip_address = socket.gethostbyname(socket.gethostname())\n",
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080'\n",
"ip_address"
]
},
@@ -99,7 +99,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -244,6 +244,13 @@
"r_not_empty = requests.post(f\"http://{ip_address}/empty\", data=not_empty_json, headers=headers)\n",
"r_not_empty.text"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
+3 -3
View File
@@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"file_url = '../dataset/breast-cancer-wisconsin.data'"
"file_url = '../Dataset/breast-cancer-wisconsin.data'"
]
},
{
@@ -304,7 +304,7 @@
},
"outputs": [],
"source": [
"ip_address = socket.gethostbyname(socket.gethostname())\n",
"ip_address = socket.gethostbyname(socket.gethostname()) + '8080'\n",
"ip_address"
]
},
@@ -377,7 +377,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
+5 -3
View File
@@ -25,7 +25,7 @@
},
"outputs": [],
"source": [
"file_url = '../dataset/breast-cancer-wisconsin.data'"
"file_url = '../Dataset/breast-cancer-wisconsin.data'"
]
},
{
@@ -378,7 +378,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -422,7 +422,9 @@
"outputs": [],
"source": [
"headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}\n",
"ip_address = socket.gethostbyname(socket.gethostname())"
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080' \n",
"\n",
"ip_address"
]
},
{