Commit 8e9a1361 authored by Udara Rangika's avatar Udara Rangika

models trained

parent 75db35fc
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -35,9 +35,146 @@ ...@@ -35,9 +35,146 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Student_ID</th>\n",
" <th>Assessment_Scores</th>\n",
" <th>Text_Complexity</th>\n",
" <th>Word_Count</th>\n",
" <th>Text_Features</th>\n",
" <th>Progress_Over_Time</th>\n",
" <th>Language_Complexity</th>\n",
" <th>Contextual_Clues</th>\n",
" <th>Feedback</th>\n",
" <th>NLP_Features</th>\n",
" <th>Proficiency_Level</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>91</td>\n",
" <td>13</td>\n",
" <td>350</td>\n",
" <td>8</td>\n",
" <td>22</td>\n",
" <td>5</td>\n",
" <td>6</td>\n",
" <td>5</td>\n",
" <td>0.4</td>\n",
" <td>Advanced</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>66</td>\n",
" <td>13</td>\n",
" <td>219</td>\n",
" <td>7</td>\n",
" <td>11</td>\n",
" <td>3</td>\n",
" <td>9</td>\n",
" <td>9</td>\n",
" <td>0.3</td>\n",
" <td>Intermediate</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>74</td>\n",
" <td>5</td>\n",
" <td>246</td>\n",
" <td>4</td>\n",
" <td>27</td>\n",
" <td>6</td>\n",
" <td>9</td>\n",
" <td>8</td>\n",
" <td>0.7</td>\n",
" <td>Intermediate</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>90</td>\n",
" <td>7</td>\n",
" <td>299</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" <td>9</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>0.8</td>\n",
" <td>Intermediate</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>79</td>\n",
" <td>15</td>\n",
" <td>102</td>\n",
" <td>6</td>\n",
" <td>18</td>\n",
" <td>8</td>\n",
" <td>5</td>\n",
" <td>9</td>\n",
" <td>0.8</td>\n",
" <td>Basic</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Student_ID Assessment_Scores Text_Complexity Word_Count Text_Features \\\n",
"0 1 91 13 350 8 \n",
"1 2 66 13 219 7 \n",
"2 3 74 5 246 4 \n",
"3 4 90 7 299 8 \n",
"4 5 79 15 102 6 \n",
"\n",
" Progress_Over_Time Language_Complexity Contextual_Clues Feedback \\\n",
"0 22 5 6 5 \n",
"1 11 3 9 9 \n",
"2 27 6 9 8 \n",
"3 8 9 4 4 \n",
"4 18 8 5 9 \n",
"\n",
" NLP_Features Proficiency_Level \n",
"0 0.4 Advanced \n",
"1 0.3 Intermediate \n",
"2 0.7 Intermediate \n",
"3 0.8 Intermediate \n",
"4 0.8 Basic "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"df = pd.read_csv('data/dataset.csv')\n", "df = pd.read_csv('data/dataset.csv')\n",
"df.head()" "df.head()"
...@@ -52,7 +189,7 @@ ...@@ -52,7 +189,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -82,7 +219,7 @@ ...@@ -82,7 +219,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -97,9 +234,20 @@ ...@@ -97,9 +234,20 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Random Forest Classifier Trained\n",
"XGBoost Classifier Trained\n",
"Support Vector Machine Trained\n",
"KNN Classifier Trained\n"
]
}
],
"source": [ "source": [
"# Random Forest Classifier\n", "# Random Forest Classifier\n",
"rfc = RandomForestClassifier(\n", "rfc = RandomForestClassifier(\n",
...@@ -134,11 +282,37 @@ ...@@ -134,11 +282,37 @@
"knn.fit(X, Y)\n", "knn.fit(X, Y)\n",
"print(\"KNN Classifier Trained\")" "print(\"KNN Classifier Trained\")"
] ]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"P_rfc = rfc.predict(X_test)\n",
"P_xgb = xgb.predict(X_test)\n",
"P_svc = svc.predict(X_test)\n",
"P_knn = knn.predict(X_test)"
]
} }
], ],
"metadata": { "metadata": {
"kernelspec": {
"display_name": "project",
"language": "python",
"name": "python3"
},
"language_info": { "language_info": {
"name": "python" "codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
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