From 40d2cbf17753282f5e210b1793e4ddf024d9e438 Mon Sep 17 00:00:00 2001 From: Mikolaj Rybinski <mikolaj.rybinski@id.ethz.ch> Date: Fri, 3 May 2019 10:43:15 +0200 Subject: [PATCH] styling update + minor misc text --- 05_classifiers_overview.ipynb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/05_classifiers_overview.ipynb b/05_classifiers_overview.ipynb index 6957d36..cfcc4e8 100644 --- a/05_classifiers_overview.ipynb +++ b/05_classifiers_overview.ipynb @@ -120,6 +120,7 @@ "%config InlineBackend.figure_format = 'retina'\n", "import warnings\n", "warnings.filterwarnings('ignore', category=FutureWarning)\n", + "warnings.filterwarnings = lambda *a, **kw: None\n", "from IPython.core.display import HTML; HTML(open(\"custom.html\", \"r\").read())" ] }, @@ -1662,10 +1663,10 @@ "K(x, y) = e^{-\\gamma ||x - y||}\n", "$$\n", "\n", - "It is a Gaussian-shaped similarity measure that returns `1` for the same points and declines exponentially to `0` with distance increasing between points.\n", + "It is a Gaussian-shaped similarity measure that returns `1` for the same points and declines exponentially to `0` with distance increasing between points, with a rate controlled by $\\gamma$ parameter.\n", "\n", "\n", - "Using the so called **kernel trick**, SVC uses such similarity measure (kernel) as if applying mapping $\\phi$ without actually applying it, followed by a linear SVM.\n", + "Using the so called **kernel trick**, SVC uses such similarity measure (kernel) as if applying mapping $\\phi$, without actually applying it, followed by a linear SVM.\n", "\n", "\n", "<table>\n", @@ -1750,7 +1751,7 @@ "source": [ "## Exercise section\n", "\n", - "Play with different kernels and different gamma parameters of the `SVC` classifier. Which built-in kernels do work? Which gamma value to pick?" + "Play with different valuse of `kernel` and `gamma` parameters of the `SVC` classifier. Which built-in kernels do work? Which gamma value to pick?" ] }, { @@ -1886,6 +1887,14 @@ "source": [ "## Decision trees\n", "\n", + "Let's explain what decision tree by looking at a decision tree for an email spam classification problem. It used 57 features, such as percentages of specific words or characters, and uninterrupted capital letters average, max and total lengths.\n", + "\n", + "<table>\n", + " <tr><td><img src=\"decision_tree-spam.png\" width=600px></td></tr>\n", + " <tr><td><center><sub>Source: Hastie, T., Tibshirani, R. and Friedman, J. H. (2009), <em>The elements of statistical learning data mining, inference, and prediction</em>.</sub></center></td></tr>\n", + "</table>\n", + "\n", + "\n", "**TODO**\n", "\n", "- simple example incl. plot\n", -- GitLab