You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1548 lines
52 KiB

  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [
  8. {
  9. "name": "stderr",
  10. "output_type": "stream",
  11. "text": [
  12. "D:\\Anaconda3\\envs\\py36\\lib\\site-packages\\sklearn\\externals\\six.py:31: DeprecationWarning: The module is deprecated in version 0.21 and will be removed in version 0.23 since we've dropped support for Python 2.7. Please rely on the official version of six (https://pypi.org/project/six/).\n",
  13. " \"(https://pypi.org/project/six/).\", DeprecationWarning)\n"
  14. ]
  15. }
  16. ],
  17. "source": [
  18. "import sys\n",
  19. "import warnings\n",
  20. "warnings.filterwarnings(\"ignore\")\n",
  21. "sys.path.append(\"../..\")\n",
  22. "from chemocommons import *"
  23. ]
  24. },
  25. {
  26. "cell_type": "code",
  27. "execution_count": 2,
  28. "metadata": {},
  29. "outputs": [],
  30. "source": [
  31. "def load_print(name):\n",
  32. " models = load(name + \".joblib\")[0]\n",
  33. " model_pd = pd.DataFrame(models.cv_results_)\n",
  34. " print(models.best_score_)\n",
  35. " print(models.best_params_)\n",
  36. " display(model_pd.filter(like=\"mean_test\"))"
  37. ]
  38. },
  39. {
  40. "cell_type": "code",
  41. "execution_count": 4,
  42. "metadata": {},
  43. "outputs": [
  44. {
  45. "name": "stdout",
  46. "output_type": "stream",
  47. "text": [
  48. "0.6679306608884074\n",
  49. "{'labelset_size': 8}\n"
  50. ]
  51. },
  52. {
  53. "data": {
  54. "text/html": [
  55. "<div>\n",
  56. "<style scoped>\n",
  57. " .dataframe tbody tr th:only-of-type {\n",
  58. " vertical-align: middle;\n",
  59. " }\n",
  60. "\n",
  61. " .dataframe tbody tr th {\n",
  62. " vertical-align: top;\n",
  63. " }\n",
  64. "\n",
  65. " .dataframe thead th {\n",
  66. " text-align: right;\n",
  67. " }\n",
  68. "</style>\n",
  69. "<table border=\"1\" class=\"dataframe\">\n",
  70. " <thead>\n",
  71. " <tr style=\"text-align: right;\">\n",
  72. " <th></th>\n",
  73. " <th>mean_test_hamming loss</th>\n",
  74. " <th>mean_test_aiming</th>\n",
  75. " <th>mean_test_coverage</th>\n",
  76. " <th>mean_test_accuracy</th>\n",
  77. " <th>mean_test_absolute true</th>\n",
  78. " </tr>\n",
  79. " </thead>\n",
  80. " <tbody>\n",
  81. " <tr>\n",
  82. " <th>0</th>\n",
  83. " <td>-0.051171</td>\n",
  84. " <td>0.731166</td>\n",
  85. " <td>0.711425</td>\n",
  86. " <td>0.689002</td>\n",
  87. " <td>0.636511</td>\n",
  88. " </tr>\n",
  89. " <tr>\n",
  90. " <th>1</th>\n",
  91. " <td>-0.050796</td>\n",
  92. " <td>0.738344</td>\n",
  93. " <td>0.714649</td>\n",
  94. " <td>0.695269</td>\n",
  95. " <td>0.644637</td>\n",
  96. " </tr>\n",
  97. " <tr>\n",
  98. " <th>2</th>\n",
  99. " <td>-0.051129</td>\n",
  100. " <td>0.743843</td>\n",
  101. " <td>0.720439</td>\n",
  102. " <td>0.700062</td>\n",
  103. " <td>0.648971</td>\n",
  104. " </tr>\n",
  105. " <tr>\n",
  106. " <th>3</th>\n",
  107. " <td>-0.051504</td>\n",
  108. " <td>0.742994</td>\n",
  109. " <td>0.720018</td>\n",
  110. " <td>0.700342</td>\n",
  111. " <td>0.650596</td>\n",
  112. " </tr>\n",
  113. " <tr>\n",
  114. " <th>4</th>\n",
  115. " <td>-0.051463</td>\n",
  116. " <td>0.749233</td>\n",
  117. " <td>0.726592</td>\n",
  118. " <td>0.706256</td>\n",
  119. " <td>0.656555</td>\n",
  120. " </tr>\n",
  121. " <tr>\n",
  122. " <th>5</th>\n",
  123. " <td>-0.052004</td>\n",
  124. " <td>0.745693</td>\n",
  125. " <td>0.718067</td>\n",
  126. " <td>0.702116</td>\n",
  127. " <td>0.655471</td>\n",
  128. " </tr>\n",
  129. " <tr>\n",
  130. " <th>6</th>\n",
  131. " <td>-0.051254</td>\n",
  132. " <td>0.758893</td>\n",
  133. " <td>0.728705</td>\n",
  134. " <td>0.713332</td>\n",
  135. " <td>0.667931</td>\n",
  136. " </tr>\n",
  137. " <tr>\n",
  138. " <th>7</th>\n",
  139. " <td>-0.051963</td>\n",
  140. " <td>0.756681</td>\n",
  141. " <td>0.730930</td>\n",
  142. " <td>0.712045</td>\n",
  143. " <td>0.662514</td>\n",
  144. " </tr>\n",
  145. " <tr>\n",
  146. " <th>8</th>\n",
  147. " <td>-0.053379</td>\n",
  148. " <td>0.750614</td>\n",
  149. " <td>0.721802</td>\n",
  150. " <td>0.705489</td>\n",
  151. " <td>0.659805</td>\n",
  152. " </tr>\n",
  153. " </tbody>\n",
  154. "</table>\n",
  155. "</div>"
  156. ],
  157. "text/plain": [
  158. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  159. "0 -0.051171 0.731166 0.711425 \n",
  160. "1 -0.050796 0.738344 0.714649 \n",
  161. "2 -0.051129 0.743843 0.720439 \n",
  162. "3 -0.051504 0.742994 0.720018 \n",
  163. "4 -0.051463 0.749233 0.726592 \n",
  164. "5 -0.052004 0.745693 0.718067 \n",
  165. "6 -0.051254 0.758893 0.728705 \n",
  166. "7 -0.051963 0.756681 0.730930 \n",
  167. "8 -0.053379 0.750614 0.721802 \n",
  168. "\n",
  169. " mean_test_accuracy mean_test_absolute true \n",
  170. "0 0.689002 0.636511 \n",
  171. "1 0.695269 0.644637 \n",
  172. "2 0.700062 0.648971 \n",
  173. "3 0.700342 0.650596 \n",
  174. "4 0.706256 0.656555 \n",
  175. "5 0.702116 0.655471 \n",
  176. "6 0.713332 0.667931 \n",
  177. "7 0.712045 0.662514 \n",
  178. "8 0.705489 0.659805 "
  179. ]
  180. },
  181. "metadata": {},
  182. "output_type": "display_data"
  183. }
  184. ],
  185. "source": [
  186. "load_print(\"rakeld-lgb\")"
  187. ]
  188. },
  189. {
  190. "cell_type": "code",
  191. "execution_count": 3,
  192. "metadata": {},
  193. "outputs": [
  194. {
  195. "name": "stdout",
  196. "output_type": "stream",
  197. "text": [
  198. "0.6787648970747562\n",
  199. "{'classifier': LabelPowerset(classifier=LGBMClassifier(boosting_type='gbdt', class_weight=None,\n",
  200. " colsample_bytree=1.0,\n",
  201. " importance_type='split',\n",
  202. " learning_rate=0.1, max_depth=-1,\n",
  203. " min_child_samples=20,\n",
  204. " min_child_weight=0.001,\n",
  205. " min_split_gain=0.0, n_estimators=60,\n",
  206. " n_jobs=-1, num_leaves=31,\n",
  207. " objective=None, random_state=None,\n",
  208. " reg_alpha=0.0, reg_lambda=0.0,\n",
  209. " silent=True, subsample=1.0,\n",
  210. " subsample_for_bin=200000,\n",
  211. " subsample_freq=0),\n",
  212. " require_dense=[True, True]), 'classifier__classifier': LGBMClassifier(boosting_type='gbdt', class_weight=None, colsample_bytree=1.0,\n",
  213. " importance_type='split', learning_rate=0.1, max_depth=-1,\n",
  214. " min_child_samples=20, min_child_weight=0.001, min_split_gain=0.0,\n",
  215. " n_estimators=60, n_jobs=-1, num_leaves=31, objective=None,\n",
  216. " random_state=None, reg_alpha=0.0, reg_lambda=0.0, silent=True,\n",
  217. " subsample=1.0, subsample_for_bin=200000, subsample_freq=0), 'classifier__classifier__n_estimators': 60, 'clusterer': <skmultilearn.cluster.networkx.NetworkXLabelGraphClusterer object at 0x0000020EF6E95470>}\n"
  218. ]
  219. },
  220. {
  221. "data": {
  222. "text/html": [
  223. "<div>\n",
  224. "<style scoped>\n",
  225. " .dataframe tbody tr th:only-of-type {\n",
  226. " vertical-align: middle;\n",
  227. " }\n",
  228. "\n",
  229. " .dataframe tbody tr th {\n",
  230. " vertical-align: top;\n",
  231. " }\n",
  232. "\n",
  233. " .dataframe thead th {\n",
  234. " text-align: right;\n",
  235. " }\n",
  236. "</style>\n",
  237. "<table border=\"1\" class=\"dataframe\">\n",
  238. " <thead>\n",
  239. " <tr style=\"text-align: right;\">\n",
  240. " <th></th>\n",
  241. " <th>mean_test_hamming loss</th>\n",
  242. " <th>mean_test_aiming</th>\n",
  243. " <th>mean_test_coverage</th>\n",
  244. " <th>mean_test_accuracy</th>\n",
  245. " <th>mean_test_absolute true</th>\n",
  246. " </tr>\n",
  247. " </thead>\n",
  248. " <tbody>\n",
  249. " <tr>\n",
  250. " <th>0</th>\n",
  251. " <td>-0.054838</td>\n",
  252. " <td>0.754126</td>\n",
  253. " <td>0.714977</td>\n",
  254. " <td>0.707104</td>\n",
  255. " <td>0.667931</td>\n",
  256. " </tr>\n",
  257. " <tr>\n",
  258. " <th>1</th>\n",
  259. " <td>-0.056671</td>\n",
  260. " <td>0.751860</td>\n",
  261. " <td>0.716421</td>\n",
  262. " <td>0.705734</td>\n",
  263. " <td>0.665764</td>\n",
  264. " </tr>\n",
  265. " <tr>\n",
  266. " <th>2</th>\n",
  267. " <td>-0.052504</td>\n",
  268. " <td>0.762757</td>\n",
  269. " <td>0.725549</td>\n",
  270. " <td>0.716029</td>\n",
  271. " <td>0.674973</td>\n",
  272. " </tr>\n",
  273. " <tr>\n",
  274. " <th>3</th>\n",
  275. " <td>-0.052671</td>\n",
  276. " <td>0.768617</td>\n",
  277. " <td>0.732146</td>\n",
  278. " <td>0.720935</td>\n",
  279. " <td>0.678765</td>\n",
  280. " </tr>\n",
  281. " <tr>\n",
  282. " <th>4</th>\n",
  283. " <td>-0.052921</td>\n",
  284. " <td>0.765258</td>\n",
  285. " <td>0.727310</td>\n",
  286. " <td>0.716363</td>\n",
  287. " <td>0.673348</td>\n",
  288. " </tr>\n",
  289. " <tr>\n",
  290. " <th>5</th>\n",
  291. " <td>-0.054713</td>\n",
  292. " <td>0.762468</td>\n",
  293. " <td>0.725527</td>\n",
  294. " <td>0.713991</td>\n",
  295. " <td>0.670639</td>\n",
  296. " </tr>\n",
  297. " </tbody>\n",
  298. "</table>\n",
  299. "</div>"
  300. ],
  301. "text/plain": [
  302. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  303. "0 -0.054838 0.754126 0.714977 \n",
  304. "1 -0.056671 0.751860 0.716421 \n",
  305. "2 -0.052504 0.762757 0.725549 \n",
  306. "3 -0.052671 0.768617 0.732146 \n",
  307. "4 -0.052921 0.765258 0.727310 \n",
  308. "5 -0.054713 0.762468 0.725527 \n",
  309. "\n",
  310. " mean_test_accuracy mean_test_absolute true \n",
  311. "0 0.707104 0.667931 \n",
  312. "1 0.705734 0.665764 \n",
  313. "2 0.716029 0.674973 \n",
  314. "3 0.720935 0.678765 \n",
  315. "4 0.716363 0.673348 \n",
  316. "5 0.713991 0.670639 "
  317. ]
  318. },
  319. "metadata": {},
  320. "output_type": "display_data"
  321. }
  322. ],
  323. "source": [
  324. "load_print(\"lgb\")"
  325. ]
  326. },
  327. {
  328. "cell_type": "code",
  329. "execution_count": 8,
  330. "metadata": {},
  331. "outputs": [
  332. {
  333. "name": "stdout",
  334. "output_type": "stream",
  335. "text": [
  336. "0.685807150595883\n",
  337. "{'classifier': LabelPowerset(classifier=XGBClassifier(base_score=0.5, booster='gbtree',\n",
  338. " colsample_bylevel=1, colsample_bytree=1,\n",
  339. " gamma=0, learning_rate=0.1,\n",
  340. " max_delta_step=0, max_depth=3,\n",
  341. " min_child_weight=1, missing=nan,\n",
  342. " n_estimators=100, n_jobs=1, nthread=None,\n",
  343. " objective='binary:logistic',\n",
  344. " random_state=0, reg_alpha=0,\n",
  345. " reg_lambda=1, scale_pos_weight=1,\n",
  346. " seed=None, silent=True, subsample=1),\n",
  347. " require_dense=[True, True]), 'classifier__classifier': XGBClassifier(base_score=0.5, booster='gbtree', colsample_bylevel=1,\n",
  348. " colsample_bytree=1, gamma=0, learning_rate=0.1, max_delta_step=0,\n",
  349. " max_depth=3, min_child_weight=1, missing=nan, n_estimators=100,\n",
  350. " n_jobs=1, nthread=None, objective='binary:logistic',\n",
  351. " random_state=0, reg_alpha=0, reg_lambda=1, scale_pos_weight=1,\n",
  352. " seed=None, silent=True, subsample=1), 'classifier__classifier__n_estimators': 100, 'clusterer': <skmultilearn.cluster.networkx.NetworkXLabelGraphClusterer object at 0x0000022C23FCBC50>}\n"
  353. ]
  354. },
  355. {
  356. "data": {
  357. "text/html": [
  358. "<div>\n",
  359. "<style scoped>\n",
  360. " .dataframe tbody tr th:only-of-type {\n",
  361. " vertical-align: middle;\n",
  362. " }\n",
  363. "\n",
  364. " .dataframe tbody tr th {\n",
  365. " vertical-align: top;\n",
  366. " }\n",
  367. "\n",
  368. " .dataframe thead th {\n",
  369. " text-align: right;\n",
  370. " }\n",
  371. "</style>\n",
  372. "<table border=\"1\" class=\"dataframe\">\n",
  373. " <thead>\n",
  374. " <tr style=\"text-align: right;\">\n",
  375. " <th></th>\n",
  376. " <th>mean_test_hamming loss</th>\n",
  377. " <th>mean_test_aiming</th>\n",
  378. " <th>mean_test_coverage</th>\n",
  379. " <th>mean_test_accuracy</th>\n",
  380. " <th>mean_test_absolute true</th>\n",
  381. " </tr>\n",
  382. " </thead>\n",
  383. " <tbody>\n",
  384. " <tr>\n",
  385. " <th>0</th>\n",
  386. " <td>-0.054005</td>\n",
  387. " <td>0.756121</td>\n",
  388. " <td>0.718032</td>\n",
  389. " <td>0.711532</td>\n",
  390. " <td>0.674431</td>\n",
  391. " </tr>\n",
  392. " <tr>\n",
  393. " <th>1</th>\n",
  394. " <td>-0.056130</td>\n",
  395. " <td>0.754018</td>\n",
  396. " <td>0.710210</td>\n",
  397. " <td>0.705289</td>\n",
  398. " <td>0.668472</td>\n",
  399. " </tr>\n",
  400. " <tr>\n",
  401. " <th>2</th>\n",
  402. " <td>-0.051671</td>\n",
  403. " <td>0.771786</td>\n",
  404. " <td>0.733765</td>\n",
  405. " <td>0.725071</td>\n",
  406. " <td>0.684724</td>\n",
  407. " </tr>\n",
  408. " <tr>\n",
  409. " <th>3</th>\n",
  410. " <td>-0.053004</td>\n",
  411. " <td>0.770585</td>\n",
  412. " <td>0.728312</td>\n",
  413. " <td>0.719735</td>\n",
  414. " <td>0.677140</td>\n",
  415. " </tr>\n",
  416. " <tr>\n",
  417. " <th>4</th>\n",
  418. " <td>-0.051254</td>\n",
  419. " <td>0.773041</td>\n",
  420. " <td>0.737692</td>\n",
  421. " <td>0.726976</td>\n",
  422. " <td>0.685807</td>\n",
  423. " </tr>\n",
  424. " <tr>\n",
  425. " <th>5</th>\n",
  426. " <td>-0.052213</td>\n",
  427. " <td>0.773230</td>\n",
  428. " <td>0.730722</td>\n",
  429. " <td>0.720592</td>\n",
  430. " <td>0.674973</td>\n",
  431. " </tr>\n",
  432. " </tbody>\n",
  433. "</table>\n",
  434. "</div>"
  435. ],
  436. "text/plain": [
  437. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  438. "0 -0.054005 0.756121 0.718032 \n",
  439. "1 -0.056130 0.754018 0.710210 \n",
  440. "2 -0.051671 0.771786 0.733765 \n",
  441. "3 -0.053004 0.770585 0.728312 \n",
  442. "4 -0.051254 0.773041 0.737692 \n",
  443. "5 -0.052213 0.773230 0.730722 \n",
  444. "\n",
  445. " mean_test_accuracy mean_test_absolute true \n",
  446. "0 0.711532 0.674431 \n",
  447. "1 0.705289 0.668472 \n",
  448. "2 0.725071 0.684724 \n",
  449. "3 0.719735 0.677140 \n",
  450. "4 0.726976 0.685807 \n",
  451. "5 0.720592 0.674973 "
  452. ]
  453. },
  454. "metadata": {},
  455. "output_type": "display_data"
  456. }
  457. ],
  458. "source": [
  459. "load_print(\"xgb\")"
  460. ]
  461. },
  462. {
  463. "cell_type": "code",
  464. "execution_count": 5,
  465. "metadata": {},
  466. "outputs": [
  467. {
  468. "name": "stdout",
  469. "output_type": "stream",
  470. "text": [
  471. "0.6917659804983749\n"
  472. ]
  473. },
  474. {
  475. "data": {
  476. "text/html": [
  477. "<div>\n",
  478. "<style scoped>\n",
  479. " .dataframe tbody tr th:only-of-type {\n",
  480. " vertical-align: middle;\n",
  481. " }\n",
  482. "\n",
  483. " .dataframe tbody tr th {\n",
  484. " vertical-align: top;\n",
  485. " }\n",
  486. "\n",
  487. " .dataframe thead th {\n",
  488. " text-align: right;\n",
  489. " }\n",
  490. "</style>\n",
  491. "<table border=\"1\" class=\"dataframe\">\n",
  492. " <thead>\n",
  493. " <tr style=\"text-align: right;\">\n",
  494. " <th></th>\n",
  495. " <th>mean_test_hamming loss</th>\n",
  496. " <th>mean_test_aiming</th>\n",
  497. " <th>mean_test_coverage</th>\n",
  498. " <th>mean_test_accuracy</th>\n",
  499. " <th>mean_test_absolute true</th>\n",
  500. " </tr>\n",
  501. " </thead>\n",
  502. " <tbody>\n",
  503. " <tr>\n",
  504. " <th>0</th>\n",
  505. " <td>-0.051963</td>\n",
  506. " <td>0.768608</td>\n",
  507. " <td>0.731859</td>\n",
  508. " <td>0.722731</td>\n",
  509. " <td>0.683099</td>\n",
  510. " </tr>\n",
  511. " <tr>\n",
  512. " <th>1</th>\n",
  513. " <td>-0.052671</td>\n",
  514. " <td>0.771091</td>\n",
  515. " <td>0.735291</td>\n",
  516. " <td>0.724402</td>\n",
  517. " <td>0.684724</td>\n",
  518. " </tr>\n",
  519. " <tr>\n",
  520. " <th>2</th>\n",
  521. " <td>-0.052004</td>\n",
  522. " <td>0.769384</td>\n",
  523. " <td>0.734004</td>\n",
  524. " <td>0.724840</td>\n",
  525. " <td>0.685265</td>\n",
  526. " </tr>\n",
  527. " <tr>\n",
  528. " <th>3</th>\n",
  529. " <td>-0.052296</td>\n",
  530. " <td>0.772409</td>\n",
  531. " <td>0.734980</td>\n",
  532. " <td>0.724299</td>\n",
  533. " <td>0.682015</td>\n",
  534. " </tr>\n",
  535. " <tr>\n",
  536. " <th>4</th>\n",
  537. " <td>-0.050629</td>\n",
  538. " <td>0.776445</td>\n",
  539. " <td>0.739769</td>\n",
  540. " <td>0.731047</td>\n",
  541. " <td>0.691766</td>\n",
  542. " </tr>\n",
  543. " <tr>\n",
  544. " <th>5</th>\n",
  545. " <td>-0.052504</td>\n",
  546. " <td>0.772797</td>\n",
  547. " <td>0.736632</td>\n",
  548. " <td>0.726256</td>\n",
  549. " <td>0.685807</td>\n",
  550. " </tr>\n",
  551. " <tr>\n",
  552. " <th>6</th>\n",
  553. " <td>-0.051046</td>\n",
  554. " <td>0.772183</td>\n",
  555. " <td>0.737042</td>\n",
  556. " <td>0.728574</td>\n",
  557. " <td>0.690683</td>\n",
  558. " </tr>\n",
  559. " <tr>\n",
  560. " <th>7</th>\n",
  561. " <td>-0.052588</td>\n",
  562. " <td>0.769809</td>\n",
  563. " <td>0.733978</td>\n",
  564. " <td>0.723616</td>\n",
  565. " <td>0.683099</td>\n",
  566. " </tr>\n",
  567. " </tbody>\n",
  568. "</table>\n",
  569. "</div>"
  570. ],
  571. "text/plain": [
  572. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  573. "0 -0.051963 0.768608 0.731859 \n",
  574. "1 -0.052671 0.771091 0.735291 \n",
  575. "2 -0.052004 0.769384 0.734004 \n",
  576. "3 -0.052296 0.772409 0.734980 \n",
  577. "4 -0.050629 0.776445 0.739769 \n",
  578. "5 -0.052504 0.772797 0.736632 \n",
  579. "6 -0.051046 0.772183 0.737042 \n",
  580. "7 -0.052588 0.769809 0.733978 \n",
  581. "\n",
  582. " mean_test_accuracy mean_test_absolute true \n",
  583. "0 0.722731 0.683099 \n",
  584. "1 0.724402 0.684724 \n",
  585. "2 0.724840 0.685265 \n",
  586. "3 0.724299 0.682015 \n",
  587. "4 0.731047 0.691766 \n",
  588. "5 0.726256 0.685807 \n",
  589. "6 0.728574 0.690683 \n",
  590. "7 0.723616 0.683099 "
  591. ]
  592. },
  593. "metadata": {},
  594. "output_type": "display_data"
  595. }
  596. ],
  597. "source": [
  598. "load_print(\"rf\")"
  599. ]
  600. },
  601. {
  602. "cell_type": "code",
  603. "execution_count": 6,
  604. "metadata": {},
  605. "outputs": [
  606. {
  607. "name": "stdout",
  608. "output_type": "stream",
  609. "text": [
  610. "0.6820151679306609\n"
  611. ]
  612. },
  613. {
  614. "data": {
  615. "text/html": [
  616. "<div>\n",
  617. "<style scoped>\n",
  618. " .dataframe tbody tr th:only-of-type {\n",
  619. " vertical-align: middle;\n",
  620. " }\n",
  621. "\n",
  622. " .dataframe tbody tr th {\n",
  623. " vertical-align: top;\n",
  624. " }\n",
  625. "\n",
  626. " .dataframe thead th {\n",
  627. " text-align: right;\n",
  628. " }\n",
  629. "</style>\n",
  630. "<table border=\"1\" class=\"dataframe\">\n",
  631. " <thead>\n",
  632. " <tr style=\"text-align: right;\">\n",
  633. " <th></th>\n",
  634. " <th>mean_test_hamming loss</th>\n",
  635. " <th>mean_test_aiming</th>\n",
  636. " <th>mean_test_coverage</th>\n",
  637. " <th>mean_test_accuracy</th>\n",
  638. " <th>mean_test_absolute true</th>\n",
  639. " </tr>\n",
  640. " </thead>\n",
  641. " <tbody>\n",
  642. " <tr>\n",
  643. " <th>0</th>\n",
  644. " <td>-0.053171</td>\n",
  645. " <td>0.761168</td>\n",
  646. " <td>0.730875</td>\n",
  647. " <td>0.718863</td>\n",
  648. " <td>0.679848</td>\n",
  649. " </tr>\n",
  650. " <tr>\n",
  651. " <th>1</th>\n",
  652. " <td>-0.054046</td>\n",
  653. " <td>0.763624</td>\n",
  654. " <td>0.732578</td>\n",
  655. " <td>0.719095</td>\n",
  656. " <td>0.677140</td>\n",
  657. " </tr>\n",
  658. " <tr>\n",
  659. " <th>2</th>\n",
  660. " <td>-0.052129</td>\n",
  661. " <td>0.766423</td>\n",
  662. " <td>0.733292</td>\n",
  663. " <td>0.721833</td>\n",
  664. " <td>0.679307</td>\n",
  665. " </tr>\n",
  666. " <tr>\n",
  667. " <th>3</th>\n",
  668. " <td>-0.052796</td>\n",
  669. " <td>0.768797</td>\n",
  670. " <td>0.737566</td>\n",
  671. " <td>0.724200</td>\n",
  672. " <td>0.681473</td>\n",
  673. " </tr>\n",
  674. " <tr>\n",
  675. " <th>4</th>\n",
  676. " <td>-0.052963</td>\n",
  677. " <td>0.762721</td>\n",
  678. " <td>0.731272</td>\n",
  679. " <td>0.719931</td>\n",
  680. " <td>0.679307</td>\n",
  681. " </tr>\n",
  682. " <tr>\n",
  683. " <th>5</th>\n",
  684. " <td>-0.053588</td>\n",
  685. " <td>0.764103</td>\n",
  686. " <td>0.733494</td>\n",
  687. " <td>0.719947</td>\n",
  688. " <td>0.677140</td>\n",
  689. " </tr>\n",
  690. " <tr>\n",
  691. " <th>6</th>\n",
  692. " <td>-0.052296</td>\n",
  693. " <td>0.766197</td>\n",
  694. " <td>0.734312</td>\n",
  695. " <td>0.722655</td>\n",
  696. " <td>0.681473</td>\n",
  697. " </tr>\n",
  698. " <tr>\n",
  699. " <th>7</th>\n",
  700. " <td>-0.053004</td>\n",
  701. " <td>0.769971</td>\n",
  702. " <td>0.738212</td>\n",
  703. " <td>0.724853</td>\n",
  704. " <td>0.682015</td>\n",
  705. " </tr>\n",
  706. " </tbody>\n",
  707. "</table>\n",
  708. "</div>"
  709. ],
  710. "text/plain": [
  711. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  712. "0 -0.053171 0.761168 0.730875 \n",
  713. "1 -0.054046 0.763624 0.732578 \n",
  714. "2 -0.052129 0.766423 0.733292 \n",
  715. "3 -0.052796 0.768797 0.737566 \n",
  716. "4 -0.052963 0.762721 0.731272 \n",
  717. "5 -0.053588 0.764103 0.733494 \n",
  718. "6 -0.052296 0.766197 0.734312 \n",
  719. "7 -0.053004 0.769971 0.738212 \n",
  720. "\n",
  721. " mean_test_accuracy mean_test_absolute true \n",
  722. "0 0.718863 0.679848 \n",
  723. "1 0.719095 0.677140 \n",
  724. "2 0.721833 0.679307 \n",
  725. "3 0.724200 0.681473 \n",
  726. "4 0.719931 0.679307 \n",
  727. "5 0.719947 0.677140 \n",
  728. "6 0.722655 0.681473 \n",
  729. "7 0.724853 0.682015 "
  730. ]
  731. },
  732. "metadata": {},
  733. "output_type": "display_data"
  734. }
  735. ],
  736. "source": [
  737. "load_print(\"ext\")"
  738. ]
  739. },
  740. {
  741. "cell_type": "code",
  742. "execution_count": 7,
  743. "metadata": {},
  744. "outputs": [
  745. {
  746. "name": "stdout",
  747. "output_type": "stream",
  748. "text": [
  749. "0.27627302275189597\n"
  750. ]
  751. },
  752. {
  753. "data": {
  754. "text/html": [
  755. "<div>\n",
  756. "<style scoped>\n",
  757. " .dataframe tbody tr th:only-of-type {\n",
  758. " vertical-align: middle;\n",
  759. " }\n",
  760. "\n",
  761. " .dataframe tbody tr th {\n",
  762. " vertical-align: top;\n",
  763. " }\n",
  764. "\n",
  765. " .dataframe thead th {\n",
  766. " text-align: right;\n",
  767. " }\n",
  768. "</style>\n",
  769. "<table border=\"1\" class=\"dataframe\">\n",
  770. " <thead>\n",
  771. " <tr style=\"text-align: right;\">\n",
  772. " <th></th>\n",
  773. " <th>mean_test_hamming loss</th>\n",
  774. " <th>mean_test_aiming</th>\n",
  775. " <th>mean_test_coverage</th>\n",
  776. " <th>mean_test_accuracy</th>\n",
  777. " <th>mean_test_absolute true</th>\n",
  778. " </tr>\n",
  779. " </thead>\n",
  780. " <tbody>\n",
  781. " <tr>\n",
  782. " <th>0</th>\n",
  783. " <td>-0.192266</td>\n",
  784. " <td>0.403452</td>\n",
  785. " <td>0.880906</td>\n",
  786. " <td>0.391886</td>\n",
  787. " <td>0.159263</td>\n",
  788. " </tr>\n",
  789. " <tr>\n",
  790. " <th>1</th>\n",
  791. " <td>-0.113676</td>\n",
  792. " <td>0.456220</td>\n",
  793. " <td>0.712893</td>\n",
  794. " <td>0.437593</td>\n",
  795. " <td>0.244312</td>\n",
  796. " </tr>\n",
  797. " <tr>\n",
  798. " <th>2</th>\n",
  799. " <td>-0.089591</td>\n",
  800. " <td>0.416683</td>\n",
  801. " <td>0.540008</td>\n",
  802. " <td>0.398033</td>\n",
  803. " <td>0.276273</td>\n",
  804. " </tr>\n",
  805. " <tr>\n",
  806. " <th>3</th>\n",
  807. " <td>-0.085174</td>\n",
  808. " <td>0.310618</td>\n",
  809. " <td>0.356415</td>\n",
  810. " <td>0.294579</td>\n",
  811. " <td>0.229686</td>\n",
  812. " </tr>\n",
  813. " <tr>\n",
  814. " <th>4</th>\n",
  815. " <td>-0.082757</td>\n",
  816. " <td>0.281455</td>\n",
  817. " <td>0.296060</td>\n",
  818. " <td>0.266410</td>\n",
  819. " <td>0.230769</td>\n",
  820. " </tr>\n",
  821. " <tr>\n",
  822. " <th>5</th>\n",
  823. " <td>-0.083840</td>\n",
  824. " <td>0.249558</td>\n",
  825. " <td>0.259314</td>\n",
  826. " <td>0.236164</td>\n",
  827. " <td>0.208017</td>\n",
  828. " </tr>\n",
  829. " <tr>\n",
  830. " <th>6</th>\n",
  831. " <td>-0.086341</td>\n",
  832. " <td>0.225153</td>\n",
  833. " <td>0.235614</td>\n",
  834. " <td>0.211119</td>\n",
  835. " <td>0.182015</td>\n",
  836. " </tr>\n",
  837. " <tr>\n",
  838. " <th>7</th>\n",
  839. " <td>-0.088007</td>\n",
  840. " <td>0.214247</td>\n",
  841. " <td>0.228927</td>\n",
  842. " <td>0.198330</td>\n",
  843. " <td>0.160888</td>\n",
  844. " </tr>\n",
  845. " <tr>\n",
  846. " <th>8</th>\n",
  847. " <td>-0.089049</td>\n",
  848. " <td>0.230462</td>\n",
  849. " <td>0.261571</td>\n",
  850. " <td>0.215525</td>\n",
  851. " <td>0.166847</td>\n",
  852. " </tr>\n",
  853. " <tr>\n",
  854. " <th>9</th>\n",
  855. " <td>-0.089174</td>\n",
  856. " <td>0.228774</td>\n",
  857. " <td>0.261796</td>\n",
  858. " <td>0.214017</td>\n",
  859. " <td>0.163597</td>\n",
  860. " </tr>\n",
  861. " </tbody>\n",
  862. "</table>\n",
  863. "</div>"
  864. ],
  865. "text/plain": [
  866. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  867. "0 -0.192266 0.403452 0.880906 \n",
  868. "1 -0.113676 0.456220 0.712893 \n",
  869. "2 -0.089591 0.416683 0.540008 \n",
  870. "3 -0.085174 0.310618 0.356415 \n",
  871. "4 -0.082757 0.281455 0.296060 \n",
  872. "5 -0.083840 0.249558 0.259314 \n",
  873. "6 -0.086341 0.225153 0.235614 \n",
  874. "7 -0.088007 0.214247 0.228927 \n",
  875. "8 -0.089049 0.230462 0.261571 \n",
  876. "9 -0.089174 0.228774 0.261796 \n",
  877. "\n",
  878. " mean_test_accuracy mean_test_absolute true \n",
  879. "0 0.391886 0.159263 \n",
  880. "1 0.437593 0.244312 \n",
  881. "2 0.398033 0.276273 \n",
  882. "3 0.294579 0.229686 \n",
  883. "4 0.266410 0.230769 \n",
  884. "5 0.236164 0.208017 \n",
  885. "6 0.211119 0.182015 \n",
  886. "7 0.198330 0.160888 \n",
  887. "8 0.215525 0.166847 \n",
  888. "9 0.214017 0.163597 "
  889. ]
  890. },
  891. "metadata": {},
  892. "output_type": "display_data"
  893. }
  894. ],
  895. "source": [
  896. "load_print(\"mtsvm\")"
  897. ]
  898. },
  899. {
  900. "cell_type": "code",
  901. "execution_count": 8,
  902. "metadata": {},
  903. "outputs": [
  904. {
  905. "name": "stdout",
  906. "output_type": "stream",
  907. "text": [
  908. "0.34615384615384615\n"
  909. ]
  910. },
  911. {
  912. "data": {
  913. "text/html": [
  914. "<div>\n",
  915. "<style scoped>\n",
  916. " .dataframe tbody tr th:only-of-type {\n",
  917. " vertical-align: middle;\n",
  918. " }\n",
  919. "\n",
  920. " .dataframe tbody tr th {\n",
  921. " vertical-align: top;\n",
  922. " }\n",
  923. "\n",
  924. " .dataframe thead th {\n",
  925. " text-align: right;\n",
  926. " }\n",
  927. "</style>\n",
  928. "<table border=\"1\" class=\"dataframe\">\n",
  929. " <thead>\n",
  930. " <tr style=\"text-align: right;\">\n",
  931. " <th></th>\n",
  932. " <th>mean_test_hamming loss</th>\n",
  933. " <th>mean_test_aiming</th>\n",
  934. " <th>mean_test_coverage</th>\n",
  935. " <th>mean_test_accuracy</th>\n",
  936. " <th>mean_test_absolute true</th>\n",
  937. " </tr>\n",
  938. " </thead>\n",
  939. " <tbody>\n",
  940. " <tr>\n",
  941. " <th>0</th>\n",
  942. " <td>-0.136345</td>\n",
  943. " <td>0.485662</td>\n",
  944. " <td>0.737899</td>\n",
  945. " <td>0.468970</td>\n",
  946. " <td>0.262730</td>\n",
  947. " </tr>\n",
  948. " <tr>\n",
  949. " <th>1</th>\n",
  950. " <td>-0.131344</td>\n",
  951. " <td>0.489424</td>\n",
  952. " <td>0.736121</td>\n",
  953. " <td>0.473084</td>\n",
  954. " <td>0.269231</td>\n",
  955. " </tr>\n",
  956. " <tr>\n",
  957. " <th>2</th>\n",
  958. " <td>-0.126677</td>\n",
  959. " <td>0.493743</td>\n",
  960. " <td>0.729229</td>\n",
  961. " <td>0.476266</td>\n",
  962. " <td>0.277356</td>\n",
  963. " </tr>\n",
  964. " <tr>\n",
  965. " <th>3</th>\n",
  966. " <td>-0.125177</td>\n",
  967. " <td>0.498480</td>\n",
  968. " <td>0.727127</td>\n",
  969. " <td>0.482583</td>\n",
  970. " <td>0.293066</td>\n",
  971. " </tr>\n",
  972. " <tr>\n",
  973. " <th>4</th>\n",
  974. " <td>-0.119635</td>\n",
  975. " <td>0.507124</td>\n",
  976. " <td>0.711405</td>\n",
  977. " <td>0.487808</td>\n",
  978. " <td>0.308234</td>\n",
  979. " </tr>\n",
  980. " <tr>\n",
  981. " <th>5</th>\n",
  982. " <td>-0.117051</td>\n",
  983. " <td>0.515903</td>\n",
  984. " <td>0.701708</td>\n",
  985. " <td>0.494554</td>\n",
  986. " <td>0.327194</td>\n",
  987. " </tr>\n",
  988. " <tr>\n",
  989. " <th>6</th>\n",
  990. " <td>-0.113676</td>\n",
  991. " <td>0.528539</td>\n",
  992. " <td>0.704826</td>\n",
  993. " <td>0.505869</td>\n",
  994. " <td>0.342904</td>\n",
  995. " </tr>\n",
  996. " <tr>\n",
  997. " <th>7</th>\n",
  998. " <td>-0.112176</td>\n",
  999. " <td>0.516847</td>\n",
  1000. " <td>0.687968</td>\n",
  1001. " <td>0.494629</td>\n",
  1002. " <td>0.327736</td>\n",
  1003. " </tr>\n",
  1004. " <tr>\n",
  1005. " <th>8</th>\n",
  1006. " <td>-0.108051</td>\n",
  1007. " <td>0.524865</td>\n",
  1008. " <td>0.675675</td>\n",
  1009. " <td>0.502960</td>\n",
  1010. " <td>0.346154</td>\n",
  1011. " </tr>\n",
  1012. " </tbody>\n",
  1013. "</table>\n",
  1014. "</div>"
  1015. ],
  1016. "text/plain": [
  1017. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  1018. "0 -0.136345 0.485662 0.737899 \n",
  1019. "1 -0.131344 0.489424 0.736121 \n",
  1020. "2 -0.126677 0.493743 0.729229 \n",
  1021. "3 -0.125177 0.498480 0.727127 \n",
  1022. "4 -0.119635 0.507124 0.711405 \n",
  1023. "5 -0.117051 0.515903 0.701708 \n",
  1024. "6 -0.113676 0.528539 0.704826 \n",
  1025. "7 -0.112176 0.516847 0.687968 \n",
  1026. "8 -0.108051 0.524865 0.675675 \n",
  1027. "\n",
  1028. " mean_test_accuracy mean_test_absolute true \n",
  1029. "0 0.468970 0.262730 \n",
  1030. "1 0.473084 0.269231 \n",
  1031. "2 0.476266 0.277356 \n",
  1032. "3 0.482583 0.293066 \n",
  1033. "4 0.487808 0.308234 \n",
  1034. "5 0.494554 0.327194 \n",
  1035. "6 0.505869 0.342904 \n",
  1036. "7 0.494629 0.327736 \n",
  1037. "8 0.502960 0.346154 "
  1038. ]
  1039. },
  1040. "metadata": {},
  1041. "output_type": "display_data"
  1042. }
  1043. ],
  1044. "source": [
  1045. "load_print(\"rakeld-nb\")"
  1046. ]
  1047. },
  1048. {
  1049. "cell_type": "code",
  1050. "execution_count": 9,
  1051. "metadata": {},
  1052. "outputs": [
  1053. {
  1054. "name": "stdout",
  1055. "output_type": "stream",
  1056. "text": [
  1057. "0.6457204767063922\n"
  1058. ]
  1059. },
  1060. {
  1061. "data": {
  1062. "text/html": [
  1063. "<div>\n",
  1064. "<style scoped>\n",
  1065. " .dataframe tbody tr th:only-of-type {\n",
  1066. " vertical-align: middle;\n",
  1067. " }\n",
  1068. "\n",
  1069. " .dataframe tbody tr th {\n",
  1070. " vertical-align: top;\n",
  1071. " }\n",
  1072. "\n",
  1073. " .dataframe thead th {\n",
  1074. " text-align: right;\n",
  1075. " }\n",
  1076. "</style>\n",
  1077. "<table border=\"1\" class=\"dataframe\">\n",
  1078. " <thead>\n",
  1079. " <tr style=\"text-align: right;\">\n",
  1080. " <th></th>\n",
  1081. " <th>mean_test_hamming loss</th>\n",
  1082. " <th>mean_test_aiming</th>\n",
  1083. " <th>mean_test_coverage</th>\n",
  1084. " <th>mean_test_accuracy</th>\n",
  1085. " <th>mean_test_absolute true</th>\n",
  1086. " </tr>\n",
  1087. " </thead>\n",
  1088. " <tbody>\n",
  1089. " <tr>\n",
  1090. " <th>0</th>\n",
  1091. " <td>-0.054255</td>\n",
  1092. " <td>0.686981</td>\n",
  1093. " <td>0.669008</td>\n",
  1094. " <td>0.649263</td>\n",
  1095. " <td>0.603467</td>\n",
  1096. " </tr>\n",
  1097. " <tr>\n",
  1098. " <th>1</th>\n",
  1099. " <td>-0.053754</td>\n",
  1100. " <td>0.697039</td>\n",
  1101. " <td>0.676634</td>\n",
  1102. " <td>0.658061</td>\n",
  1103. " <td>0.612134</td>\n",
  1104. " </tr>\n",
  1105. " <tr>\n",
  1106. " <th>2</th>\n",
  1107. " <td>-0.054171</td>\n",
  1108. " <td>0.707268</td>\n",
  1109. " <td>0.686119</td>\n",
  1110. " <td>0.667088</td>\n",
  1111. " <td>0.619177</td>\n",
  1112. " </tr>\n",
  1113. " <tr>\n",
  1114. " <th>3</th>\n",
  1115. " <td>-0.054421</td>\n",
  1116. " <td>0.701869</td>\n",
  1117. " <td>0.684243</td>\n",
  1118. " <td>0.665798</td>\n",
  1119. " <td>0.622969</td>\n",
  1120. " </tr>\n",
  1121. " <tr>\n",
  1122. " <th>4</th>\n",
  1123. " <td>-0.054588</td>\n",
  1124. " <td>0.719610</td>\n",
  1125. " <td>0.699175</td>\n",
  1126. " <td>0.682093</td>\n",
  1127. " <td>0.638678</td>\n",
  1128. " </tr>\n",
  1129. " <tr>\n",
  1130. " <th>5</th>\n",
  1131. " <td>-0.054838</td>\n",
  1132. " <td>0.730544</td>\n",
  1133. " <td>0.707185</td>\n",
  1134. " <td>0.688697</td>\n",
  1135. " <td>0.642470</td>\n",
  1136. " </tr>\n",
  1137. " <tr>\n",
  1138. " <th>6</th>\n",
  1139. " <td>-0.053838</td>\n",
  1140. " <td>0.730968</td>\n",
  1141. " <td>0.706819</td>\n",
  1142. " <td>0.689995</td>\n",
  1143. " <td>0.644637</td>\n",
  1144. " </tr>\n",
  1145. " <tr>\n",
  1146. " <th>7</th>\n",
  1147. " <td>-0.055588</td>\n",
  1148. " <td>0.727492</td>\n",
  1149. " <td>0.707426</td>\n",
  1150. " <td>0.689233</td>\n",
  1151. " <td>0.645720</td>\n",
  1152. " </tr>\n",
  1153. " <tr>\n",
  1154. " <th>8</th>\n",
  1155. " <td>-0.055838</td>\n",
  1156. " <td>0.730923</td>\n",
  1157. " <td>0.703821</td>\n",
  1158. " <td>0.687429</td>\n",
  1159. " <td>0.640845</td>\n",
  1160. " </tr>\n",
  1161. " </tbody>\n",
  1162. "</table>\n",
  1163. "</div>"
  1164. ],
  1165. "text/plain": [
  1166. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  1167. "0 -0.054255 0.686981 0.669008 \n",
  1168. "1 -0.053754 0.697039 0.676634 \n",
  1169. "2 -0.054171 0.707268 0.686119 \n",
  1170. "3 -0.054421 0.701869 0.684243 \n",
  1171. "4 -0.054588 0.719610 0.699175 \n",
  1172. "5 -0.054838 0.730544 0.707185 \n",
  1173. "6 -0.053838 0.730968 0.706819 \n",
  1174. "7 -0.055588 0.727492 0.707426 \n",
  1175. "8 -0.055838 0.730923 0.703821 \n",
  1176. "\n",
  1177. " mean_test_accuracy mean_test_absolute true \n",
  1178. "0 0.649263 0.603467 \n",
  1179. "1 0.658061 0.612134 \n",
  1180. "2 0.667088 0.619177 \n",
  1181. "3 0.665798 0.622969 \n",
  1182. "4 0.682093 0.638678 \n",
  1183. "5 0.688697 0.642470 \n",
  1184. "6 0.689995 0.644637 \n",
  1185. "7 0.689233 0.645720 \n",
  1186. "8 0.687429 0.640845 "
  1187. ]
  1188. },
  1189. "metadata": {},
  1190. "output_type": "display_data"
  1191. }
  1192. ],
  1193. "source": [
  1194. "load_print(\"rakeld-rf\")"
  1195. ]
  1196. },
  1197. {
  1198. "cell_type": "code",
  1199. "execution_count": 12,
  1200. "metadata": {},
  1201. "outputs": [
  1202. {
  1203. "name": "stdout",
  1204. "output_type": "stream",
  1205. "text": [
  1206. "louvain\n",
  1207. "lpa\n"
  1208. ]
  1209. }
  1210. ],
  1211. "source": [
  1212. "print(rf.best_estimator_.clusterer.method)\n",
  1213. "print(ext.best_estimator_.clusterer.method)"
  1214. ]
  1215. },
  1216. {
  1217. "cell_type": "code",
  1218. "execution_count": 6,
  1219. "metadata": {},
  1220. "outputs": [
  1221. {
  1222. "data": {
  1223. "text/html": [
  1224. "<div>\n",
  1225. "<style scoped>\n",
  1226. " .dataframe tbody tr th:only-of-type {\n",
  1227. " vertical-align: middle;\n",
  1228. " }\n",
  1229. "\n",
  1230. " .dataframe tbody tr th {\n",
  1231. " vertical-align: top;\n",
  1232. " }\n",
  1233. "\n",
  1234. " .dataframe thead th {\n",
  1235. " text-align: right;\n",
  1236. " }\n",
  1237. "</style>\n",
  1238. "<table border=\"1\" class=\"dataframe\">\n",
  1239. " <thead>\n",
  1240. " <tr style=\"text-align: right;\">\n",
  1241. " <th></th>\n",
  1242. " <th>mean_test_hamming loss</th>\n",
  1243. " <th>mean_test_aiming</th>\n",
  1244. " <th>mean_test_coverage</th>\n",
  1245. " <th>mean_test_accuracy</th>\n",
  1246. " <th>mean_test_absolute true</th>\n",
  1247. " </tr>\n",
  1248. " </thead>\n",
  1249. " <tbody>\n",
  1250. " <tr>\n",
  1251. " <th>0</th>\n",
  1252. " <td>-0.061672</td>\n",
  1253. " <td>0.731354</td>\n",
  1254. " <td>0.721935</td>\n",
  1255. " <td>0.690114</td>\n",
  1256. " <td>0.631636</td>\n",
  1257. " </tr>\n",
  1258. " <tr>\n",
  1259. " <th>1</th>\n",
  1260. " <td>-0.070089</td>\n",
  1261. " <td>0.685268</td>\n",
  1262. " <td>0.707798</td>\n",
  1263. " <td>0.653296</td>\n",
  1264. " <td>0.585590</td>\n",
  1265. " </tr>\n",
  1266. " <tr>\n",
  1267. " <th>2</th>\n",
  1268. " <td>-0.057005</td>\n",
  1269. " <td>0.719258</td>\n",
  1270. " <td>0.707640</td>\n",
  1271. " <td>0.678193</td>\n",
  1272. " <td>0.619718</td>\n",
  1273. " </tr>\n",
  1274. " <tr>\n",
  1275. " <th>3</th>\n",
  1276. " <td>-0.057713</td>\n",
  1277. " <td>0.679388</td>\n",
  1278. " <td>0.661604</td>\n",
  1279. " <td>0.641201</td>\n",
  1280. " <td>0.593716</td>\n",
  1281. " </tr>\n",
  1282. " <tr>\n",
  1283. " <th>4</th>\n",
  1284. " <td>-0.056796</td>\n",
  1285. " <td>0.710139</td>\n",
  1286. " <td>0.689836</td>\n",
  1287. " <td>0.668956</td>\n",
  1288. " <td>0.617010</td>\n",
  1289. " </tr>\n",
  1290. " <tr>\n",
  1291. " <th>5</th>\n",
  1292. " <td>-0.056671</td>\n",
  1293. " <td>0.703070</td>\n",
  1294. " <td>0.688213</td>\n",
  1295. " <td>0.661645</td>\n",
  1296. " <td>0.604009</td>\n",
  1297. " </tr>\n",
  1298. " <tr>\n",
  1299. " <th>6</th>\n",
  1300. " <td>-0.058130</td>\n",
  1301. " <td>0.694926</td>\n",
  1302. " <td>0.678766</td>\n",
  1303. " <td>0.654534</td>\n",
  1304. " <td>0.601300</td>\n",
  1305. " </tr>\n",
  1306. " <tr>\n",
  1307. " <th>7</th>\n",
  1308. " <td>-0.055588</td>\n",
  1309. " <td>0.703927</td>\n",
  1310. " <td>0.677259</td>\n",
  1311. " <td>0.662047</td>\n",
  1312. " <td>0.617010</td>\n",
  1313. " </tr>\n",
  1314. " <tr>\n",
  1315. " <th>8</th>\n",
  1316. " <td>-0.057630</td>\n",
  1317. " <td>0.692127</td>\n",
  1318. " <td>0.672466</td>\n",
  1319. " <td>0.650366</td>\n",
  1320. " <td>0.598050</td>\n",
  1321. " </tr>\n",
  1322. " <tr>\n",
  1323. " <th>9</th>\n",
  1324. " <td>-0.057796</td>\n",
  1325. " <td>0.674251</td>\n",
  1326. " <td>0.649890</td>\n",
  1327. " <td>0.634344</td>\n",
  1328. " <td>0.591549</td>\n",
  1329. " </tr>\n",
  1330. " </tbody>\n",
  1331. "</table>\n",
  1332. "</div>"
  1333. ],
  1334. "text/plain": [
  1335. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  1336. "0 -0.061672 0.731354 0.721935 \n",
  1337. "1 -0.070089 0.685268 0.707798 \n",
  1338. "2 -0.057005 0.719258 0.707640 \n",
  1339. "3 -0.057713 0.679388 0.661604 \n",
  1340. "4 -0.056796 0.710139 0.689836 \n",
  1341. "5 -0.056671 0.703070 0.688213 \n",
  1342. "6 -0.058130 0.694926 0.678766 \n",
  1343. "7 -0.055588 0.703927 0.677259 \n",
  1344. "8 -0.057630 0.692127 0.672466 \n",
  1345. "9 -0.057796 0.674251 0.649890 \n",
  1346. "\n",
  1347. " mean_test_accuracy mean_test_absolute true \n",
  1348. "0 0.690114 0.631636 \n",
  1349. "1 0.653296 0.585590 \n",
  1350. "2 0.678193 0.619718 \n",
  1351. "3 0.641201 0.593716 \n",
  1352. "4 0.668956 0.617010 \n",
  1353. "5 0.661645 0.604009 \n",
  1354. "6 0.654534 0.601300 \n",
  1355. "7 0.662047 0.617010 \n",
  1356. "8 0.650366 0.598050 \n",
  1357. "9 0.634344 0.591549 "
  1358. ]
  1359. },
  1360. "execution_count": 6,
  1361. "metadata": {},
  1362. "output_type": "execute_result"
  1363. }
  1364. ],
  1365. "source": [
  1366. "mlknn = load(\"mlknn.joblib\")\n",
  1367. "mlknn_pd = pd.DataFrame(mlknn.cv_results_)\n",
  1368. "mlknn_pd.filter(like=\"mean_test\")"
  1369. ]
  1370. },
  1371. {
  1372. "cell_type": "code",
  1373. "execution_count": null,
  1374. "metadata": {},
  1375. "outputs": [],
  1376. "source": [
  1377. "mlknn."
  1378. ]
  1379. },
  1380. {
  1381. "cell_type": "code",
  1382. "execution_count": 5,
  1383. "metadata": {},
  1384. "outputs": [
  1385. {
  1386. "data": {
  1387. "text/html": [
  1388. "<div>\n",
  1389. "<style scoped>\n",
  1390. " .dataframe tbody tr th:only-of-type {\n",
  1391. " vertical-align: middle;\n",
  1392. " }\n",
  1393. "\n",
  1394. " .dataframe tbody tr th {\n",
  1395. " vertical-align: top;\n",
  1396. " }\n",
  1397. "\n",
  1398. " .dataframe thead th {\n",
  1399. " text-align: right;\n",
  1400. " }\n",
  1401. "</style>\n",
  1402. "<table border=\"1\" class=\"dataframe\">\n",
  1403. " <thead>\n",
  1404. " <tr style=\"text-align: right;\">\n",
  1405. " <th></th>\n",
  1406. " <th>mean_test_hamming loss</th>\n",
  1407. " <th>mean_test_aiming</th>\n",
  1408. " <th>mean_test_coverage</th>\n",
  1409. " <th>mean_test_accuracy</th>\n",
  1410. " <th>mean_test_absolute true</th>\n",
  1411. " </tr>\n",
  1412. " </thead>\n",
  1413. " <tbody>\n",
  1414. " <tr>\n",
  1415. " <th>0</th>\n",
  1416. " <td>-0.136345</td>\n",
  1417. " <td>0.485662</td>\n",
  1418. " <td>0.737899</td>\n",
  1419. " <td>0.468970</td>\n",
  1420. " <td>0.262730</td>\n",
  1421. " </tr>\n",
  1422. " <tr>\n",
  1423. " <th>1</th>\n",
  1424. " <td>-0.131344</td>\n",
  1425. " <td>0.489424</td>\n",
  1426. " <td>0.736121</td>\n",
  1427. " <td>0.473084</td>\n",
  1428. " <td>0.269231</td>\n",
  1429. " </tr>\n",
  1430. " <tr>\n",
  1431. " <th>2</th>\n",
  1432. " <td>-0.126677</td>\n",
  1433. " <td>0.493743</td>\n",
  1434. " <td>0.729229</td>\n",
  1435. " <td>0.476266</td>\n",
  1436. " <td>0.277356</td>\n",
  1437. " </tr>\n",
  1438. " <tr>\n",
  1439. " <th>3</th>\n",
  1440. " <td>-0.125177</td>\n",
  1441. " <td>0.498480</td>\n",
  1442. " <td>0.727127</td>\n",
  1443. " <td>0.482583</td>\n",
  1444. " <td>0.293066</td>\n",
  1445. " </tr>\n",
  1446. " <tr>\n",
  1447. " <th>4</th>\n",
  1448. " <td>-0.119635</td>\n",
  1449. " <td>0.507124</td>\n",
  1450. " <td>0.711405</td>\n",
  1451. " <td>0.487808</td>\n",
  1452. " <td>0.308234</td>\n",
  1453. " </tr>\n",
  1454. " <tr>\n",
  1455. " <th>5</th>\n",
  1456. " <td>-0.117051</td>\n",
  1457. " <td>0.515903</td>\n",
  1458. " <td>0.701708</td>\n",
  1459. " <td>0.494554</td>\n",
  1460. " <td>0.327194</td>\n",
  1461. " </tr>\n",
  1462. " <tr>\n",
  1463. " <th>6</th>\n",
  1464. " <td>-0.113676</td>\n",
  1465. " <td>0.528539</td>\n",
  1466. " <td>0.704826</td>\n",
  1467. " <td>0.505869</td>\n",
  1468. " <td>0.342904</td>\n",
  1469. " </tr>\n",
  1470. " <tr>\n",
  1471. " <th>7</th>\n",
  1472. " <td>-0.112176</td>\n",
  1473. " <td>0.516847</td>\n",
  1474. " <td>0.687968</td>\n",
  1475. " <td>0.494629</td>\n",
  1476. " <td>0.327736</td>\n",
  1477. " </tr>\n",
  1478. " <tr>\n",
  1479. " <th>8</th>\n",
  1480. " <td>-0.108051</td>\n",
  1481. " <td>0.524865</td>\n",
  1482. " <td>0.675675</td>\n",
  1483. " <td>0.502960</td>\n",
  1484. " <td>0.346154</td>\n",
  1485. " </tr>\n",
  1486. " </tbody>\n",
  1487. "</table>\n",
  1488. "</div>"
  1489. ],
  1490. "text/plain": [
  1491. " mean_test_hamming loss mean_test_aiming mean_test_coverage \\\n",
  1492. "0 -0.136345 0.485662 0.737899 \n",
  1493. "1 -0.131344 0.489424 0.736121 \n",
  1494. "2 -0.126677 0.493743 0.729229 \n",
  1495. "3 -0.125177 0.498480 0.727127 \n",
  1496. "4 -0.119635 0.507124 0.711405 \n",
  1497. "5 -0.117051 0.515903 0.701708 \n",
  1498. "6 -0.113676 0.528539 0.704826 \n",
  1499. "7 -0.112176 0.516847 0.687968 \n",
  1500. "8 -0.108051 0.524865 0.675675 \n",
  1501. "\n",
  1502. " mean_test_accuracy mean_test_absolute true \n",
  1503. "0 0.468970 0.262730 \n",
  1504. "1 0.473084 0.269231 \n",
  1505. "2 0.476266 0.277356 \n",
  1506. "3 0.482583 0.293066 \n",
  1507. "4 0.487808 0.308234 \n",
  1508. "5 0.494554 0.327194 \n",
  1509. "6 0.505869 0.342904 \n",
  1510. "7 0.494629 0.327736 \n",
  1511. "8 0.502960 0.346154 "
  1512. ]
  1513. },
  1514. "execution_count": 5,
  1515. "metadata": {},
  1516. "output_type": "execute_result"
  1517. }
  1518. ],
  1519. "source": [
  1520. "rakeld = load(\"rakeld.joblib\")[0]\n",
  1521. "rakeld_pd = pd.DataFrame(rakeld.cv_results_)\n",
  1522. "rakeld_pd.filter(like=\"mean_test\")"
  1523. ]
  1524. }
  1525. ],
  1526. "metadata": {
  1527. "kernelspec": {
  1528. "display_name": "Python 3",
  1529. "language": "python",
  1530. "name": "python3"
  1531. },
  1532. "language_info": {
  1533. "codemirror_mode": {
  1534. "name": "ipython",
  1535. "version": 3
  1536. },
  1537. "file_extension": ".py",
  1538. "mimetype": "text/x-python",
  1539. "name": "python",
  1540. "nbconvert_exporter": "python",
  1541. "pygments_lexer": "ipython3",
  1542. "version": "3.7.3"
  1543. }
  1544. },
  1545. "nbformat": 4,
  1546. "nbformat_minor": 4
  1547. }