|
310 | 310 | "outputs": [], |
311 | 311 | "source": [ |
312 | 312 | "import matplotlib.pyplot as plt\n", |
313 | | - "import seaborn as sn\n", |
| 313 | + "import seaborn as sns\n", |
314 | 314 | "\n", |
315 | 315 | "rfc_acc = [\n", |
316 | 316 | " 0.842,\n", |
|
392 | 392 | "\n", |
393 | 393 | "fig = plt.figure(figsize=(10, 3))\n", |
394 | 394 | "ax2 = plt.subplot2grid((1, 4), (0, 3))\n", |
395 | | - "plot = sn.violinplot(\n", |
| 395 | + "plot = sns.violinplot(\n", |
396 | 396 | " data=df, x='Model', y='accuracy', ax=ax2, palette=colors, bw=0.1, linewidth=0.7\n", |
397 | 397 | ")\n", |
398 | 398 | "for i in range(dim):\n", |
399 | 399 | " ax2.axhline(np.average(allvals[i]), ls='--', color=colors[i], lw=0.8)\n", |
400 | 400 | "# ax2.axhline(np.percentile(allvals[i], 50), ls='--', color=colors[i], lw=.8)\n", |
401 | | - "# sn.swarmplot(x=\"model\", y=\"accuracy\", data=df, color=\"w\", alpha=.5, ax=ax2);\n", |
| 401 | + "# sns.swarmplot(x=\"model\", y=\"accuracy\", data=df, color=\"w\", alpha=.5, ax=ax2);\n", |
402 | 402 | "ax2.yaxis.tick_right()\n", |
403 | 403 | "ax2.set_ylabel('')\n", |
404 | 404 | "ax2.set_xticklabels(ax2.get_xticklabels(), rotation=40)\n", |
|
507 | 507 | "\n", |
508 | 508 | "fig = plt.figure(figsize=(10, 3))\n", |
509 | 509 | "ax2 = plt.subplot2grid((1, 4), (0, 3))\n", |
510 | | - "plot = sn.violinplot(data=df, x='Model', y='auc', ax=ax2, palette=colors, bw=0.1, linewidth=0.7)\n", |
| 510 | + "plot = sns.violinplot(data=df, x='Model', y='auc', ax=ax2, palette=colors, bw=0.1, linewidth=0.7)\n", |
511 | 511 | "for i in range(dim):\n", |
512 | 512 | " ax2.axhline(np.average(allvals[i]), ls='--', color=colors[i], lw=0.8)\n", |
513 | 513 | "\n", |
|
585 | 585 | }, |
586 | 586 | "outputs": [], |
587 | 587 | "source": [ |
588 | | - "import seaborn as sn\n", |
| 588 | + "import seaborn as sns\n", |
589 | 589 | "from sklearn.externals.joblib import load as loadpkl\n", |
590 | 590 | "\n", |
591 | | - "sn.set_style('white')\n", |
| 591 | + "sns.set_style('white')\n", |
592 | 592 | "\n", |
593 | 593 | "# Get the RFC\n", |
594 | 594 | "estimator = loadpkl(\n", |
|
667 | 667 | " df['Importance'] += [tree.feature_importances_[i]]\n", |
668 | 668 | "fig = plt.figure(figsize=(20, 6))\n", |
669 | 669 | "# plt.title(\"Feature importance plot\")\n", |
670 | | - "sn.boxplot(x='Feature', y='Importance', data=pd.DataFrame(df), linewidth=1, notch=True)\n", |
| 670 | + "sns.boxplot(x='Feature', y='Importance', data=pd.DataFrame(df), linewidth=1, notch=True)\n", |
671 | 671 | "plt.xlabel(f'Features selected ({len(features)})')\n", |
672 | 672 | "# plt.bar(range(nft), importances[indices],\n", |
673 | 673 | "# color=\"r\", yerr=std[indices], align=\"center\")\n", |
|
0 commit comments