mirror of
https://github.com/bvanroll/college-datascience.git
synced 2025-08-29 03:52:43 +00:00
fml
This commit is contained in:
@@ -97,15 +97,14 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"392\n",
|
||||
"392\n"
|
||||
"<class 'sklearn.neighbors.classification.KNeighborsClassifier'>\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -117,18 +116,6 @@
|
||||
"/home/beppe/.local/lib/python3.7/site-packages/sklearn/utils/validation.py:563: FutureWarning: Beginning in version 0.22, arrays of bytes/strings will be converted to decimal numbers if dtype='numeric'. It is recommended that you convert the array to a float dtype before using it in scikit-learn, for example by using your_array = your_array.astype(np.float64).\n",
|
||||
" FutureWarning)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',\n",
|
||||
" metric_params=None, n_jobs=None, n_neighbors=1, p=2,\n",
|
||||
" weights='uniform')"
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
@@ -160,7 +147,9 @@
|
||||
"xtrain, xtest, ytrain, ytest = train_test_split(setjen, target, random_state=0)\n",
|
||||
"\n",
|
||||
"knn = KNeighborsClassifier(n_neighbors=1)\n",
|
||||
"knn.fit(xtrain, ytrain)\n"
|
||||
"f = knn.fit(xtrain, ytrain)\n",
|
||||
"print(type(f))\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user