Commit de72d7c1 authored by Almouhannad's avatar Almouhannad

Use constants class

parent 6097a6b2
test.ipynb
clf-test.ipynb
__pycache__/constants.cpython-311.pyc
......@@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
......@@ -18,18 +18,16 @@
"from sklearn.model_selection import train_test_split\n",
"\n",
"\n",
"DATASET_PATH = 'data/Symptom2Disease.csv'\n",
"TRAIN_SET_PATH = 'data/Preprocessed_Symptom2Disease_Train.csv'\n",
"TEST_SET_PATH = 'data/Preprocessed_Symptom2Disease_Test.csv'"
"from constants import CONSTANTS"
]
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv(DATASET_PATH)"
"df = pd.read_csv(CONSTANTS.DATASET_PATH)"
]
},
{
......@@ -41,7 +39,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
......@@ -50,7 +48,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 4,
"metadata": {},
"outputs": [
{
......@@ -123,7 +121,7 @@
"4 4 Psoriasis My nails have small dents or pits in them, and..."
]
},
"execution_count": 16,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
......@@ -141,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"outputs": [
{
......@@ -208,7 +206,7 @@
"4 My nails have small dents or pits in them, and... Psoriasis"
]
},
"execution_count": 17,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
......@@ -229,7 +227,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -259,7 +257,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 7,
"metadata": {},
"outputs": [
{
......@@ -293,7 +291,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 8,
"metadata": {},
"outputs": [
{
......@@ -360,7 +358,7 @@
"4 I've been quite exhausted and ill. My throat h... Common Cold"
]
},
"execution_count": 20,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
......@@ -380,7 +378,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 9,
"metadata": {},
"outputs": [
{
......@@ -441,7 +439,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -508,7 +506,7 @@
"4 i've been quite exhausted and ill. my throat h... common cold"
]
},
"execution_count": 22,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
......@@ -528,7 +526,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 11,
"metadata": {},
"outputs": [
{
......@@ -548,12 +546,12 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"train_df.to_csv(TRAIN_SET_PATH, index=False)\n",
"test_df.to_csv(TEST_SET_PATH, index=False)"
"train_df.to_csv(CONSTANTS.TRAIN_SET_PATH, index=False)\n",
"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