In [1]:
import pandas as pd
In [2]:
import numpy as np
In [3]:
from sklearn import datasets
In [7]:
iris = datasets.load_iris()
iris_X = iris.data
type(iris_X)
Out[7]:
numpy.ndarray
In [8]:
iris_y = iris.target
type(iris_y)
Out[8]:
numpy.ndarray
In [6]:
np.unique(iris_y)
Out[6]:
array([0, 1, 2])
In [9]:
np.random.seed(0)
In [10]:
indices = np.random.permutation(len(iris_X))
print(indices)
[114 62 33 107 7 100 40 86 76 71 134 51 73 54 63 37 78 90
45 16 121 66 24 8 126 22 44 97 93 26 137 84 27 127 132 59
18 83 61 92 112 2 141 43 10 60 116 144 119 108 69 135 56 80
123 133 106 146 50 147 85 30 101 94 64 89 91 125 48 13 111 95
20 15 52 3 149 98 6 68 109 96 12 102 120 104 128 46 11 110
124 41 148 1 113 139 42 4 129 17 38 5 53 143 105 0 34 28
55 75 35 23 74 31 118 57 131 65 32 138 14 122 19 29 130 49
136 99 82 79 115 145 72 77 25 81 140 142 39 58 88 70 87 36
21 9 103 67 117 47]
In [11]:
iris_X_train = iris_X[indices[:-10]]
iris_y_train = iris_y[indices[:-10]]
iris_X_test = iris_X[indices[-10:]]
iris_y_test = iris_y[indices[-10:]]
In [52]:
iris_y_train
Out[52]:
array([2, 1, 0, 2, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0,
0, 2, 0, 0, 1, 1, 0, 2, 1, 0, 2, 2, 1, 0, 1, 1, 1, 2, 0, 2, 0, 0, 1,
2, 2, 2, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 0, 2, 1, 1, 1, 1, 2, 0,
0, 2, 1, 0, 0, 1, 0, 2, 1, 0, 1, 2, 1, 0, 2, 2, 2, 2, 0, 0, 2, 2, 0,
2, 0, 2, 2, 0, 0, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 1, 0, 0, 1, 0, 2,
1, 2, 1, 0, 2, 0, 2, 0, 0, 2, 0, 2, 1, 1, 1, 2, 2, 1, 1, 0, 1, 2, 2,
0, 1])
In [53]:
type(iris_y_train)
Out[53]:
numpy.ndarray
In [18]:
# Create and fit a nearest-neighbor classifier
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier()
knn.fit(iris_X_train, iris_y_train)
Out[18]:
KNeighborsClassifier(algorithm='auto', leaf_size=30, metric='minkowski',
metric_params=None, n_jobs=1, n_neighbors=5, p=2,
weights='uniform')
In [20]:
knn.predict(iris_X_test)
Out[20]:
array([1, 2, 1, 0, 0, 0, 2, 1, 2, 0])
In [21]:
iris_y_test
Out[21]:
array([1, 1, 1, 0, 0, 0, 2, 1, 2, 0])
In [24]:
boston=pd.read_csv('https://vincentarelbundock.github.io/Rdatasets/csv/MASS/Boston.csv')
In [26]:
boston=boston.drop('Unnamed: 0',1)
In [36]:
boston.columns
Out[36]:
Index(['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax',
'ptratio', 'black', 'lstat', 'medv'],
dtype='object')
In [35]:
boston.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 506 entries, 0 to 505
Data columns (total 14 columns):
crim 506 non-null float64
zn 506 non-null float64
indus 506 non-null float64
chas 506 non-null int64
nox 506 non-null float64
rm 506 non-null float64
age 506 non-null float64
dis 506 non-null float64
rad 506 non-null int64
tax 506 non-null int64
ptratio 506 non-null float64
black 506 non-null float64
lstat 506 non-null float64
medv 506 non-null float64
dtypes: float64(11), int64(3)
memory usage: 55.4 KB
In [27]:
boston.head()
Out[27]:
crim
zn
indus
chas
nox
rm
age
dis
rad
tax
ptratio
black
lstat
medv
0
0.00632
18.0
2.31
0
0.538
6.575
65.2
4.0900
1
296
15.3
396.90
4.98
24.0
1
0.02731
0.0
7.07
0
0.469
6.421
78.9
4.9671
2
242
17.8
396.90
9.14
21.6
2
0.02729
0.0
7.07
0
0.469
7.185
61.1
4.9671
2
242
17.8
392.83
4.03
34.7
3
0.03237
0.0
2.18
0
0.458
6.998
45.8
6.0622
3
222
18.7
394.63
2.94
33.4
4
0.06905
0.0
2.18
0
0.458
7.147
54.2
6.0622
3
222
18.7
396.90
5.33
36.2
In [39]:
boston2=boston[['crim', 'zn', 'indus', 'chas', 'nox', 'rm', 'age', 'dis', 'rad', 'tax','ptratio', 'black', 'lstat']]
In [40]:
boston2.head()
Out[40]:
crim
zn
indus
chas
nox
rm
age
dis
rad
tax
ptratio
black
lstat
0
0.00632
18.0
2.31
0
0.538
6.575
65.2
4.0900
1
296
15.3
396.90
4.98
1
0.02731
0.0
7.07
0
0.469
6.421
78.9
4.9671
2
242
17.8
396.90
9.14
2
0.02729
0.0
7.07
0
0.469
7.185
61.1
4.9671
2
242
17.8
392.83
4.03
3
0.03237
0.0
2.18
0
0.458
6.998
45.8
6.0622
3
222
18.7
394.63
2.94
4
0.06905
0.0
2.18
0
0.458
7.147
54.2
6.0622
3
222
18.7
396.90
5.33
In [41]:
boston_X=boston2.values
In [54]:
boston_Y=boston['medv'].values
In [55]:
np.random.seed(7)
In [56]:
indices = np.random.permutation(len(boston_X))
print(indices)
[357 337 327 13 418 403 479 173 65 466 388 227 442 109 256 472 301 303
32 294 476 503 202 245 147 416 306 504 213 289 361 300 89 455 268 118
497 450 319 240 90 376 138 101 459 429 313 359 155 367 296 271 410 364
436 358 115 464 51 270 494 263 60 340 164 204 420 132 322 308 82 440
354 237 168 471 30 22 344 31 453 52 480 372 243 236 56 363 2 58
368 228 261 206 74 399 302 413 408 80 451 26 355 460 120 346 457 159
249 50 378 293 14 328 489 114 145 3 447 59 422 165 221 98 435 40
248 41 264 193 205 79 28 217 347 244 281 57 397 62 380 111 84 242
200 146 188 129 305 96 318 417 469 141 454 426 362 162 216 324 238 406
81 487 314 187 425 298 179 438 53 395 139 267 278 66 424 259 365 220
99 277 148 15 163 283 46 86 37 414 384 330 172 73 274 104 212 253
16 310 91 88 427 140 194 102 258 174 170 246 157 70 133 280 498 371
222 342 350 352 492 232 18 177 386 20 55 284 423 360 34 181 184 150
207 239 292 369 295 97 235 396 452 154 122 113 441 341 171 108 78 94
61 336 465 125 478 394 485 421 273 409 24 321 430 500 126 499 491 178
434 377 223 351 93 69 36 160 11 144 353 127 381 9 463 176 231 210
128 143 241 7 254 370 334 8 156 27 266 64 255 467 153 48 208 287
1 269 265 326 333 95 462 490 316 116 45 161 385 117 288 77 488 63
401 389 230 297 186 338 199 456 121 468 433 307 461 158 85 225 262 331
412 76 390 375 87 505 182 105 449 49 382 5 17 234 404 495 106 134
405 226 214 190 443 320 282 29 169 180 100 197 209 135 473 431 198 373
166 387 136 285 335 131 39 215 43 54 477 299 458 304 35 315 309 276
124 142 110 323 332 393 439 107 446 12 272 47 203 445 119 21 402 83
130 483 329 229 496 286 123 33 475 4 411 19 219 379 501 419 356 149
224 247 474 151 482 317 291 233 10 279 71 252 92 481 349 415 374 400
192 257 484 339 493 195 343 137 260 38 201 470 290 448 189 251 112 437
183 152 312 325 191 44 444 275 6 250 311 75 0 428 391 383 432 68
486 167 392 218 42 366 345 72 23 398 185 348 103 407 211 67 502 25
196 175]
In [57]:
boston_X_train = boston_X[indices[:-30]]
boston_Y_train = boston_Y[indices[:-30]]
boston_X_test = boston_X[indices[-30:]]
boston_Y_test = boston_Y[indices[-30:]]
In [58]:
boston_Y_train
Out[58]:
array([ 21.7, 18.5, 22.2, 20.4, 8.8, 8.3, 21.4, 23.6, 23.5,
19. , 10.2, 31.6, 18.4, 19.4, 44. , 23.2, 22. , 33.1,
13.2, 21.7, 16.7, 23.9, 42.3, 18.5, 14.6, 7.5, 33.4,
22. , 28.1, 24.8, 19.9, 24.8, 28.7, 14.1, 43.5, 20.4,
18.3, 13.4, 21. , 22. , 22.6, 13.9, 13.3, 26.5, 20. ,
9.5, 21.6, 22.6, 15.6, 23.1, 27.1, 25.2, 15. , 21.9,
9.6, 22.7, 18.3, 21.4, 20.5, 21.1, 24.5, 31. , 18.7,
18.7, 22.7, 50. , 16.7, 23. , 20.4, 22.8, 24.8, 10.5,
18.2, 31.5, 23.8, 19.6, 12.7, 15.2, 31.2, 14.5, 17.8,
25. , 23. , 50. , 23.7, 25.1, 24.7, 16.8, 34.7, 23.3,
50. , 46.7, 43.1, 24.4, 24.1, 6.3, 26.4, 16.3, 17.2,
28. , 15.2, 16.6, 20.6, 16.4, 22. , 17.2, 13.5, 23.3,
26.2, 19.7, 13.1, 23.9, 18.2, 19.3, 7. , 18.5, 13.8,
33.4, 12.6, 19.6, 20.8, 25. , 21.7, 43.8, 13.4, 34.9,
24.5, 26.6, 36.5, 31.1, 22.6, 20.3, 18.4, 28.7, 23.1,
17.6, 35.4, 31.6, 8.5, 22.2, 10.4, 22.8, 23.9, 22.2,
32.9, 15.6, 29.8, 14.3, 28.4, 21.4, 23.1, 10.4, 20.1,
14.4, 14.9, 10.2, 20.8, 50. , 23.3, 25. , 23.7, 11.9,
23.9, 20.6, 23.8, 32. , 8.3, 22.5, 37.2, 8.4, 23.4,
13.1, 17.8, 50. , 29.1, 19.4, 11.7, 30.1, 27.5, 26.7,
33.2, 33.1, 17.8, 19.9, 50. , 50. , 20. , 22.5, 21. ,
7. , 8.8, 19.8, 23.1, 23.4, 32.4, 20.1, 22.4, 42.8,
23.1, 16.1, 22. , 23.6, 10.9, 14. , 29.1, 18.6, 36. ,
22.6, 17.4, 24.3, 41.3, 24.2, 18.4, 45.4, 21.2, 50. ,
27.5, 16.5, 22.9, 18.6, 20.1, 41.7, 20.2, 24.6, 10.5,
13.6, 35.4, 32.2, 13.4, 25. , 13.5, 36.2, 26.4, 21.5,
22.5, 23.3, 27.9, 50. , 28.6, 38.7, 24. , 12.5, 16.1,
17. , 20.5, 18.7, 17.1, 32.7, 19.1, 19.8, 21.2, 20.6,
16. , 19.5, 19.9, 21.4, 14.6, 12.7, 21.2, 14.2, 35.2,
27.5, 15.6, 23.1, 14.5, 16.8, 15.7, 17.5, 13.6, 29.9,
11.7, 13.3, 30.1, 24.1, 25. , 20.9, 20. , 27. , 18.9,
11.8, 30.1, 16.2, 10.9, 18.9, 20.2, 23.2, 31.7, 21.7,
18. , 15.6, 20.1, 27.1, 21.9, 50. , 20.7, 16.5, 13.1,
14.8, 30.7, 33. , 20.9, 19.1, 19.4, 14.4, 24.4, 23.2,
21.6, 20.7, 22.8, 23. , 22.2, 28.4, 19.5, 8.1, 17.8,
21.2, 19.3, 50. , 7.2, 19.2, 22.3, 20.8, 15.2, 25. ,
7.2, 11.5, 24.3, 20.3, 50. , 20.6, 34.9, 12.7, 20.3,
19.1, 14.3, 28.2, 17.7, 24.3, 26.6, 50. , 48.8, 17.1,
17.9, 20. , 15.1, 15. , 22.2, 11.9, 37.9, 19.5, 13. ,
19.4, 11.3, 28.7, 17.5, 29. , 8.5, 23.1, 19.5, 15.6,
5. , 37.6, 23.7, 37. , 15.4, 23.8, 46. , 21. , 22.3,
39.8, 27.5, 30.3, 20. , 18.1, 29.8, 14.1, 34.6, 13.8,
50. , 7.4, 17.4, 22. , 21.1, 19.6, 30.8, 25. , 24.7,
18.9, 12. , 29. , 14.9, 36.1, 18.9, 16.2, 20.3, 33.2,
18.8, 13.4, 21.7, 18.5, 19.4, 13.8, 12.8, 20.4, 14.9,
21.7, 24.4, 16.6, 48.5, 11.8, 19.3, 19.6, 12.1, 22.9,
19.2, 21.8, 22.6, 31.5, 19.7, 20.1, 17.3, 13.1, 13.3,
36.2, 17.2, 18.2, 23. , 10.2, 22.4, 8.4, 17.8, 15.4,
44.8, 20.5, 13.8, 19.6, 25. , 19.8, 37.3, 48.3, 15. ,
35.1, 21.7, 29.6, 22.9, 23.7, 26.6, 7.2, 13.8, 5.6,
36.4, 50. , 20.6, 19. , 21.8, 50. , 23.9, 17.1, 33.8,
24.7, 24.1, 19.9, 28.5, 14.1, 34.9, 24.8, 18.8, 8.7,
32.5, 15.3, 19.4, 24.6, 30.5, 21.2, 10.8, 32. ])
In [60]:
# Create and fit a nearest-neighbor classifier
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier()
knn.fit(boston_X_train, boston_Y_train)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-60-eff8b139d8bf> in <module>()
2 from sklearn.neighbors import KNeighborsClassifier
3 knn = KNeighborsClassifier()
----> 4 knn.fit(boston_X_train, boston_Y_train)
C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\neighbors\base.py in fit(self, X, y)
790 self.outputs_2d_ = True
791
--> 792 check_classification_targets(y)
793 self.classes_ = []
794 self._y = np.empty(y.shape, dtype=np.int)
C:\Users\Dell\Anaconda3\lib\site-packages\sklearn\utils\multiclass.py in check_classification_targets(y)
171 if y_type not in ['binary', 'multiclass', 'multiclass-multioutput',
172 'multilabel-indicator', 'multilabel-sequences']:
--> 173 raise ValueError("Unknown label type: %r" % y)
174
175
ValueError: Unknown label type: array([[ 21.7],
[ 18.5],
[ 22.2],
[ 20.4],
[ 8.8],
[ 8.3],
[ 21.4],
[ 23.6],
[ 23.5],
[ 19. ],
[ 10.2],
[ 31.6],
[ 18.4],
[ 19.4],
[ 44. ],
[ 23.2],
[ 22. ],
[ 33.1],
[ 13.2],
[ 21.7],
[ 16.7],
[ 23.9],
[ 42.3],
[ 18.5],
[ 14.6],
[ 7.5],
[ 33.4],
[ 22. ],
[ 28.1],
[ 24.8],
[ 19.9],
[ 24.8],
[ 28.7],
[ 14.1],
[ 43.5],
[ 20.4],
[ 18.3],
[ 13.4],
[ 21. ],
[ 22. ],
[ 22.6],
[ 13.9],
[ 13.3],
[ 26.5],
[ 20. ],
[ 9.5],
[ 21.6],
[ 22.6],
[ 15.6],
[ 23.1],
[ 27.1],
[ 25.2],
[ 15. ],
[ 21.9],
[ 9.6],
[ 22.7],
[ 18.3],
[ 21.4],
[ 20.5],
[ 21.1],
[ 24.5],
[ 31. ],
[ 18.7],
[ 18.7],
[ 22.7],
[ 50. ],
[ 16.7],
[ 23. ],
[ 20.4],
[ 22.8],
[ 24.8],
[ 10.5],
[ 18.2],
[ 31.5],
[ 23.8],
[ 19.6],
[ 12.7],
[ 15.2],
[ 31.2],
[ 14.5],
[ 17.8],
[ 25. ],
[ 23. ],
[ 50. ],
[ 23.7],
[ 25.1],
[ 24.7],
[ 16.8],
[ 34.7],
[ 23.3],
[ 50. ],
[ 46.7],
[ 43.1],
[ 24.4],
[ 24.1],
[ 6.3],
[ 26.4],
[ 16.3],
[ 17.2],
[ 28. ],
[ 15.2],
[ 16.6],
[ 20.6],
[ 16.4],
[ 22. ],
[ 17.2],
[ 13.5],
[ 23.3],
[ 26.2],
[ 19.7],
[ 13.1],
[ 23.9],
[ 18.2],
[ 19.3],
[ 7. ],
[ 18.5],
[ 13.8],
[ 33.4],
[ 12.6],
[ 19.6],
[ 20.8],
[ 25. ],
[ 21.7],
[ 43.8],
[ 13.4],
[ 34.9],
[ 24.5],
[ 26.6],
[ 36.5],
[ 31.1],
[ 22.6],
[ 20.3],
[ 18.4],
[ 28.7],
[ 23.1],
[ 17.6],
[ 35.4],
[ 31.6],
[ 8.5],
[ 22.2],
[ 10.4],
[ 22.8],
[ 23.9],
[ 22.2],
[ 32.9],
[ 15.6],
[ 29.8],
[ 14.3],
[ 28.4],
[ 21.4],
[ 23.1],
[ 10.4],
[ 20.1],
[ 14.4],
[ 14.9],
[ 10.2],
[ 20.8],
[ 50. ],
[ 23.3],
[ 25. ],
[ 23.7],
[ 11.9],
[ 23.9],
[ 20.6],
[ 23.8],
[ 32. ],
[ 8.3],
[ 22.5],
[ 37.2],
[ 8.4],
[ 23.4],
[ 13.1],
[ 17.8],
[ 50. ],
[ 29.1],
[ 19.4],
[ 11.7],
[ 30.1],
[ 27.5],
[ 26.7],
[ 33.2],
[ 33.1],
[ 17.8],
[ 19.9],
[ 50. ],
[ 50. ],
[ 20. ],
[ 22.5],
[ 21. ],
[ 7. ],
[ 8.8],
[ 19.8],
[ 23.1],
[ 23.4],
[ 32.4],
[ 20.1],
[ 22.4],
[ 42.8],
[ 23.1],
[ 16.1],
[ 22. ],
[ 23.6],
[ 10.9],
[ 14. ],
[ 29.1],
[ 18.6],
[ 36. ],
[ 22.6],
[ 17.4],
[ 24.3],
[ 41.3],
[ 24.2],
[ 18.4],
[ 45.4],
[ 21.2],
[ 50. ],
[ 27.5],
[ 16.5],
[ 22.9],
[ 18.6],
[ 20.1],
[ 41.7],
[ 20.2],
[ 24.6],
[ 10.5],
[ 13.6],
[ 35.4],
[ 32.2],
[ 13.4],
[ 25. ],
[ 13.5],
[ 36.2],
[ 26.4],
[ 21.5],
[ 22.5],
[ 23.3],
[ 27.9],
[ 50. ],
[ 28.6],
[ 38.7],
[ 24. ],
[ 12.5],
[ 16.1],
[ 17. ],
[ 20.5],
[ 18.7],
[ 17.1],
[ 32.7],
[ 19.1],
[ 19.8],
[ 21.2],
[ 20.6],
[ 16. ],
[ 19.5],
[ 19.9],
[ 21.4],
[ 14.6],
[ 12.7],
[ 21.2],
[ 14.2],
[ 35.2],
[ 27.5],
[ 15.6],
[ 23.1],
[ 14.5],
[ 16.8],
[ 15.7],
[ 17.5],
[ 13.6],
[ 29.9],
[ 11.7],
[ 13.3],
[ 30.1],
[ 24.1],
[ 25. ],
[ 20.9],
[ 20. ],
[ 27. ],
[ 18.9],
[ 11.8],
[ 30.1],
[ 16.2],
[ 10.9],
[ 18.9],
[ 20.2],
[ 23.2],
[ 31.7],
[ 21.7],
[ 18. ],
[ 15.6],
[ 20.1],
[ 27.1],
[ 21.9],
[ 50. ],
[ 20.7],
[ 16.5],
[ 13.1],
[ 14.8],
[ 30.7],
[ 33. ],
[ 20.9],
[ 19.1],
[ 19.4],
[ 14.4],
[ 24.4],
[ 23.2],
[ 21.6],
[ 20.7],
[ 22.8],
[ 23. ],
[ 22.2],
[ 28.4],
[ 19.5],
[ 8.1],
[ 17.8],
[ 21.2],
[ 19.3],
[ 50. ],
[ 7.2],
[ 19.2],
[ 22.3],
[ 20.8],
[ 15.2],
[ 25. ],
[ 7.2],
[ 11.5],
[ 24.3],
[ 20.3],
[ 50. ],
[ 20.6],
[ 34.9],
[ 12.7],
[ 20.3],
[ 19.1],
[ 14.3],
[ 28.2],
[ 17.7],
[ 24.3],
[ 26.6],
[ 50. ],
[ 48.8],
[ 17.1],
[ 17.9],
[ 20. ],
[ 15.1],
[ 15. ],
[ 22.2],
[ 11.9],
[ 37.9],
[ 19.5],
[ 13. ],
[ 19.4],
[ 11.3],
[ 28.7],
[ 17.5],
[ 29. ],
[ 8.5],
[ 23.1],
[ 19.5],
[ 15.6],
[ 5. ],
[ 37.6],
[ 23.7],
[ 37. ],
[ 15.4],
[ 23.8],
[ 46. ],
[ 21. ],
[ 22.3],
[ 39.8],
[ 27.5],
[ 30.3],
[ 20. ],
[ 18.1],
[ 29.8],
[ 14.1],
[ 34.6],
[ 13.8],
[ 50. ],
[ 7.4],
[ 17.4],
[ 22. ],
[ 21.1],
[ 19.6],
[ 30.8],
[ 25. ],
[ 24.7],
[ 18.9],
[ 12. ],
[ 29. ],
[ 14.9],
[ 36.1],
[ 18.9],
[ 16.2],
[ 20.3],
[ 33.2],
[ 18.8],
[ 13.4],
[ 21.7],
[ 18.5],
[ 19.4],
[ 13.8],
[ 12.8],
[ 20.4],
[ 14.9],
[ 21.7],
[ 24.4],
[ 16.6],
[ 48.5],
[ 11.8],
[ 19.3],
[ 19.6],
[ 12.1],
[ 22.9],
[ 19.2],
[ 21.8],
[ 22.6],
[ 31.5],
[ 19.7],
[ 20.1],
[ 17.3],
[ 13.1],
[ 13.3],
[ 36.2],
[ 17.2],
[ 18.2],
[ 23. ],
[ 10.2],
[ 22.4],
[ 8.4],
[ 17.8],
[ 15.4],
[ 44.8],
[ 20.5],
[ 13.8],
[ 19.6],
[ 25. ],
[ 19.8],
[ 37.3],
[ 48.3],
[ 15. ],
[ 35.1],
[ 21.7],
[ 29.6],
[ 22.9],
[ 23.7],
[ 26.6],
[ 7.2],
[ 13.8],
[ 5.6],
[ 36.4],
[ 50. ],
[ 20.6],
[ 19. ],
[ 21.8],
[ 50. ],
[ 23.9],
[ 17.1],
[ 33.8],
[ 24.7],
[ 24.1],
[ 19.9],
[ 28.5],
[ 14.1],
[ 34.9],
[ 24.8],
[ 18.8],
[ 8.7],
[ 32.5],
[ 15.3],
[ 19.4],
[ 24.6],
[ 30.5],
[ 21.2],
[ 10.8],
[ 32. ]])
In [ ]:
Content source: decisionstats/pythonfordatascience
Similar notebooks: