Skip to content

Commit

Permalink
update api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Jul 4, 2018
1 parent 6f7f7b0 commit a24bd8e
Showing 1 changed file with 67 additions and 9 deletions.
76 changes: 67 additions & 9 deletions docs/sources/user_guide/plotting/plot_confusion_matrix.ipynb
Expand Up @@ -174,18 +174,69 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: '../../api_modules/mlxtend.plotting/plot_confusion_matrix.md'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-25-12b4305b8001>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'../../api_modules/mlxtend.plotting/plot_confusion_matrix.md'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'r'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0ms\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '../../api_modules/mlxtend.plotting/plot_confusion_matrix.md'"
"name": "stdout",
"output_type": "stream",
"text": [
"## plot_confusion_matrix\n",
"\n",
"*plot_confusion_matrix(conf_mat, hide_spines=False, hide_ticks=False, figsize=None, cmap=None, colorbar=False, show_absolute=True, show_normed=False)*\n",
"\n",
"Plot a confusion matrix via matplotlib.\n",
"**Parameters**\n",
"\n",
"- `conf_mat` : array-like, shape = [n_classes, n_classes]\n",
"\n",
" Confusion matrix from evaluate.confusion matrix.\n",
"\n",
"- `hide_spines` : bool (default: False)\n",
"\n",
" Hides axis spines if True.\n",
"\n",
"- `hide_ticks` : bool (default: False)\n",
"\n",
" Hides axis ticks if True\n",
"\n",
"- `figsize` : tuple (default: (2.5, 2.5))\n",
"\n",
" Height and width of the figure\n",
"\n",
"- `cmap` : matplotlib colormap (default: `None`)\n",
"\n",
" Uses matplotlib.pyplot.cm.Blues if `None`\n",
"\n",
"- `colorbar` : bool (default: False)\n",
"\n",
" Shows a colorbar if True\n",
"\n",
"- `show_absolute` : bool (default: True)\n",
"\n",
" Shows absolute confusion matrix coefficients if True.\n",
" At least one of `show_absolute` or `show_normed`\n",
" must be True.\n",
"\n",
"- `show_normed` : bool (default: False)\n",
"\n",
" Shows normed confusion matrix coefficients if True.\n",
" The normed confusion matrix coefficients give the\n",
" proportion of training examples per class that are\n",
" assigned the correct label.\n",
" At least one of `show_absolute` or `show_normed`\n",
" must be True.\n",
"**Returns**\n",
"\n",
"- `fig, ax` : matplotlib.pyplot subplot objects\n",
"\n",
" Figure and axis elements of the subplot.\n",
"**Examples**\n",
"\n",
"For usage examples, please see\n",
" [http://rasbt.github.io/mlxtend/user_guide/plotting/plot_confusion_matrix/](http://rasbt.github.io/mlxtend/user_guide/plotting/plot_confusion_matrix/)\n",
"\n",
"\n"
]
}
],
Expand All @@ -194,6 +245,13 @@
" s = f.read() \n",
"print(s)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit a24bd8e

Please sign in to comment.