Commit c8901e95 authored by giwi97's avatar giwi97

K-NN Classification

parent 4cb6790b
......@@ -353,6 +353,29 @@
"X_testftr=featureExtraction1(X_testp)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"KNeighborsClassifier(n_jobs=-1, n_neighbors=11, weights='distance')"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.neighbors import KNeighborsClassifier\n",
"from sklearn.metrics import accuracy_score\n",
"knn_clf = KNeighborsClassifier(n_jobs=-1, weights='distance', n_neighbors=11)\n",
"knn_clf.fit(X_trainftr, y_train)"
]
},
{
"cell_type": "code",
"execution_count": null,
......
......@@ -353,6 +353,29 @@
"X_testftr=featureExtraction1(X_testp)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"KNeighborsClassifier(n_jobs=-1, n_neighbors=11, weights='distance')"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.neighbors import KNeighborsClassifier\n",
"from sklearn.metrics import accuracy_score\n",
"knn_clf = KNeighborsClassifier(n_jobs=-1, weights='distance', n_neighbors=11)\n",
"knn_clf.fit(X_trainftr, y_train)"
]
},
{
"cell_type": "code",
"execution_count": null,
......
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