Compare commits

..

No commits in common. "31ef106e8d123fa4040f01ca23744f4225b2e196" and "de18a51aa26063039516fce58c2e5586ffc48498" have entirely different histories.

3 changed files with 7 additions and 8 deletions

View File

@ -52,7 +52,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 218, "execution_count": 64,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -72,7 +72,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 219, "execution_count": 68,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -98,7 +98,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 220, "execution_count": 69,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -109,8 +109,7 @@
"0 1 0.643141\n", "0 1 0.643141\n",
"1 2 0.720241\n", "1 2 0.720241\n",
"2 3 0.710570\n", "2 3 0.710570\n",
"3 4 0.676896\n", "3 4 0.676896\n"
"4 5 0.664856\n"
] ]
} }
], ],
@ -122,7 +121,7 @@
"valid_X = validNorm[predictors]\n", "valid_X = validNorm[predictors]\n",
"valid_y = validNorm['MEDV']\n", "valid_y = validNorm['MEDV']\n",
"\n", "\n",
"for k in range(1,6):\n", "for k in range(1,5):\n",
" knn = KNeighborsRegressor(n_neighbors=k).fit(train_X, train_y)\n", " knn = KNeighborsRegressor(n_neighbors=k).fit(train_X, train_y)\n",
" results.append({\n", " results.append({\n",
" 'k': k,\n", " 'k': k,\n",
@ -495,7 +494,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 221, "execution_count": 197,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -518,7 +517,7 @@
"# iv.\n", "# iv.\n",
"print(weather_freq)\n", "print(weather_freq)\n",
"print(traf_freq)\n", "print(traf_freq)\n",
"print(2/3 * 0/3 * 3/12)" "print(((3 / 12) * ((2 / 3) * (0 / 3))) / (((3 / 12) * ((2 / 3) * (0 / 3))) + ((9 / 12) * ((3 / 9) * (2 / 9)))))\n"
] ]
}, },
{ {

Binary file not shown.

Binary file not shown.