Commit de72d7c1 authored by Almouhannad's avatar Almouhannad

Use constants class

parent 6097a6b2
test.ipynb test.ipynb
clf-test.ipynb clf-test.ipynb
__pycache__/constants.cpython-311.pyc
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -18,18 +18,16 @@ ...@@ -18,18 +18,16 @@
"from sklearn.model_selection import train_test_split\n", "from sklearn.model_selection import train_test_split\n",
"\n", "\n",
"\n", "\n",
"DATASET_PATH = 'data/Symptom2Disease.csv'\n", "from constants import CONSTANTS"
"TRAIN_SET_PATH = 'data/Preprocessed_Symptom2Disease_Train.csv'\n",
"TEST_SET_PATH = 'data/Preprocessed_Symptom2Disease_Test.csv'"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"df = pd.read_csv(DATASET_PATH)" "df = pd.read_csv(CONSTANTS.DATASET_PATH)"
] ]
}, },
{ {
...@@ -41,7 +39,7 @@ ...@@ -41,7 +39,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -50,7 +48,7 @@ ...@@ -50,7 +48,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -123,7 +121,7 @@ ...@@ -123,7 +121,7 @@
"4 4 Psoriasis My nails have small dents or pits in them, and..." "4 4 Psoriasis My nails have small dents or pits in them, and..."
] ]
}, },
"execution_count": 16, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -141,7 +139,7 @@ ...@@ -141,7 +139,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 17, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -208,7 +206,7 @@ ...@@ -208,7 +206,7 @@
"4 My nails have small dents or pits in them, and... Psoriasis" "4 My nails have small dents or pits in them, and... Psoriasis"
] ]
}, },
"execution_count": 17, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -229,7 +227,7 @@ ...@@ -229,7 +227,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -259,7 +257,7 @@ ...@@ -259,7 +257,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 19, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -293,7 +291,7 @@ ...@@ -293,7 +291,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -360,7 +358,7 @@ ...@@ -360,7 +358,7 @@
"4 I've been quite exhausted and ill. My throat h... Common Cold" "4 I've been quite exhausted and ill. My throat h... Common Cold"
] ]
}, },
"execution_count": 20, "execution_count": 8,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -380,7 +378,7 @@ ...@@ -380,7 +378,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 21, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -441,7 +439,7 @@ ...@@ -441,7 +439,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 22, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -508,7 +506,7 @@ ...@@ -508,7 +506,7 @@
"4 i've been quite exhausted and ill. my throat h... common cold" "4 i've been quite exhausted and ill. my throat h... common cold"
] ]
}, },
"execution_count": 22, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -528,7 +526,7 @@ ...@@ -528,7 +526,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 23, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -548,12 +546,12 @@ ...@@ -548,12 +546,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 24, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"train_df.to_csv(TRAIN_SET_PATH, index=False)\n", "train_df.to_csv(CONSTANTS.TRAIN_SET_PATH, index=False)\n",
"test_df.to_csv(TEST_SET_PATH, index=False)" "test_df.to_csv(CONSTANTS.TEST_SET_PATH, index=False)"
] ]
} }
], ],
......
This diff is collapsed.
class CONSTANTS:
DATASET_PATH = 'data/Symptom2Disease.csv'
TRAIN_SET_PATH = 'data/Preprocessed_Symptom2Disease_Train.csv'
TEST_SET_PATH = 'data/Preprocessed_Symptom2Disease_Test.csv'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment