Newer
Older
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
Mikolaj Rybinski
committed
"metadata": {
"execution": {
Mikolaj Rybinski
committed
"iopub.execute_input": "2021-02-19T15:28:29.623362Z",
"iopub.status.busy": "2021-02-19T15:28:29.623147Z",
"iopub.status.idle": "2021-02-19T15:28:29.986151Z",
"shell.execute_reply": "2021-02-19T15:28:29.985621Z",
"shell.execute_reply.started": "2021-02-19T15:28:29.623307Z"
Mikolaj Rybinski
committed
}
},
"outputs": [
{
"data": {
"text/html": [
"<style>\n",
Mikolaj Rybinski
committed
"\n",
" @import url('http://fonts.googleapis.com/css?family=Source+Code+Pro');\n",
Mikolaj Rybinski
committed
"\n",
" @import url('http://fonts.googleapis.com/css?family=Kameron');\n",
" @import url('http://fonts.googleapis.com/css?family=Crimson+Text');\n",
Mikolaj Rybinski
committed
"\n",
" @import url('http://fonts.googleapis.com/css?family=Lato');\n",
" @import url('http://fonts.googleapis.com/css?family=Source+Sans+Pro');\n",
"\n",
Mikolaj Rybinski
committed
" @import url('http://fonts.googleapis.com/css?family=Lora');\n",
"\n",
"\n",
" body {\n",
" font-family: 'Lora', Consolas, sans-serif;\n",
Mikolaj Rybinski
committed
"\n",
" -webkit-print-color-adjust: exact important !;\n",
Mikolaj Rybinski
committed
"\n",
"\n",
"\n",
Mikolaj Rybinski
committed
"\n",
" .alert-block {\n",
" width: 95%;\n",
" margin: auto;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" .rendered_html code\n",
" {\n",
" color: black;\n",
" background: #eaf0ff;\n",
Mikolaj Rybinski
committed
" background: #f5f5f5;\n",
" padding: 1pt;\n",
" font-family: 'Source Code Pro', Consolas, monocco, monospace;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" p {\n",
" line-height: 140%;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" strong code {\n",
" background: red;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" .rendered_html strong code\n",
" {\n",
" background: #f5f5f5;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" .CodeMirror pre {\n",
" font-family: 'Source Code Pro', monocco, Consolas, monocco, monospace;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" .cm-s-ipython span.cm-keyword {\n",
" font-weight: normal;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" strong {\n",
" background: #f5f5f5;\n",
" margin-top: 4pt;\n",
" margin-bottom: 4pt;\n",
" padding: 2pt;\n",
" border: 0.5px solid #a0a0a0;\n",
" font-weight: bold;\n",
" color: darkred;\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
"\n",
Mikolaj Rybinski
committed
" # font-size: 10pt;\n",
Mikolaj Rybinski
committed
"\n",
" li {\n",
" line-height: 145%;\n",
" }\n",
"\n",
" div.output_area pre {\n",
" background: #fff9d8 !important;\n",
" padding: 5pt;\n",
Mikolaj Rybinski
committed
"\n",
" -webkit-print-color-adjust: exact;\n",
"\n",
Mikolaj Rybinski
committed
"\n",
"\n",
"\n",
" h1, h2, h3, h4 {\n",
" font-family: Kameron, arial;\n",
"\n",
" }\n",
Mikolaj Rybinski
committed
"\n",
" div#maintoolbar {display: none !important;}\n",
Mikolaj Rybinski
committed
" /*\n",
Mikolaj Rybinski
committed
" div#site {\n",
" border-top: 20px solid #1F407A;\n",
" border-right: 20px solid #1F407A;\n",
" margin-bottom: 0;\n",
" padding-bottom: 0;\n",
" }\n",
Mikolaj Rybinski
committed
" div#toc-wrapper {\n",
" border-left: 20px solid #1F407A;\n",
" border-top: 20px solid #1F407A;\n",
"\n",
" }\n",
"\n",
" body {\n",
" margin-botton:10px;\n",
" }\n",
Mikolaj Rybinski
committed
" */\n",
"</style>\n",
" <script>\n",
"IPython.OutputArea.prototype._should_scroll = function(lines) {\n",
" return false;\n",
"}\n",
" </script>\n",
"\n",
"\n",
"<footer id=\"attribution\" style=\"float:left; color:#1F407A; background:#fff; font-family: helvetica;\">\n",
" Copyright (C) 2019-2021 Scientific IT Services of ETH Zurich,\n",
" <p>\n",
" Contributing Authors:\n",
" Dr. Tarun Chadha,\n",
" Dr. Franziska Oschmann,\n",
" Dr. Mikolaj Rybinski,\n",
" Dr. Uwe Schmitt.\n",
" </p<\n",
"</footer>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# IGNORE THIS CELL WHICH CUSTOMIZES LAYOUT AND STYLING OF THE NOTEBOOK !\n",
"%matplotlib inline\n",
"%config InlineBackend.figure_format = 'retina'\n",
"import warnings\n",
Mikolaj Rybinski
committed
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"warnings.filterwarnings(\"ignore\", category=FutureWarning)\n",
"warnings.filterwarnings = lambda *a, **kw: None\n",
Mikolaj Rybinski
committed
"from IPython.core.display import HTML\n",
"\n",
"HTML(open(\"custom.html\", \"r\").read())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 6: An overview of classifiers, Part 2\n",
"\n",
"<span style=\"font-size: 150%;\">Decision trees, ensemble methods and summary</span>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's repeat our helper functions from previous part:"
]
},
{
"cell_type": "code",
"execution_count": 2,
Mikolaj Rybinski
committed
"metadata": {
"execution": {
Mikolaj Rybinski
committed
"iopub.execute_input": "2021-02-19T15:28:29.988023Z",
"iopub.status.busy": "2021-02-19T15:28:29.987769Z",
"iopub.status.idle": "2021-02-19T15:28:30.017001Z",
"shell.execute_reply": "2021-02-19T15:28:30.016408Z",
"shell.execute_reply.started": "2021-02-19T15:28:29.988001Z"
Loading
Loading full blame...