1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-22 14:32:28 +00:00
sitc/ml1/2_3_0_Visualisation.ipynb

388 lines
81 KiB
Plaintext
Raw Normal View History

2016-03-15 12:55:14 +00:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![](files/images/EscUpmPolit_p.gif \"UPM\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Course Notes for Learning Intelligent Systems"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Department of Telematic Engineering Systems, Universidad Politécnica de Madrid, © 2016 Carlos A. Iglesias"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## [Introduction to Machine Learning](2_0_0_Intro_ML.ipynb)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Table of Contents\n",
"* [Visualisation](#Visualisation)\n",
"* [Exploratory visualisation](#Exploratory-visualisation)\n",
"* [References](#References)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Visualisation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The goal of this notebook is to learn how to analyse a dataset. We will cover other tasks such as cleaning or munging (changing the format) the dataset in other sessions."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exploratory visualisation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"This section covers different ways to inspect the distribution of samples per feature.\n",
"\n",
"First of all, let's take a see how many samples of each class we have, using a [histogram](https://en.wikipedia.org/wiki/Histogram). \n",
"\n",
"A histogram is a graphical representation of the distribution of numerical data. It is an estimate of the probability distribution of a continuous variable (quantitative variable). \n",
"\n",
"For building a histogram, we need first to 'bin' the range of values—that is, divide the entire range of values into a series of intervals—and then count how many values fall into each interval. \n",
"\n",
"In our case, since the values are not continuous and we have only three values, we do not need to bin them."
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 4,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from sklearn import datasets\n",
"iris = datasets.load_iris()"
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 6,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
2016-03-28 10:26:20 +00:00
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/lib/python3/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n",
" warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n",
"/usr/lib/python3/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.\n",
" warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')\n"
]
}
],
2016-03-15 12:55:14 +00:00
"source": [
"# library for displaying plots\n",
"import matplotlib.pyplot as plt\n",
"# display plots in the notebook\n",
"# if this is not set, you will not see the graphic here\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 7,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.text.Text at 0x7f04f62a1a90>"
2016-03-15 12:55:14 +00:00
]
},
2016-03-28 10:26:20 +00:00
"execution_count": 7,
2016-03-15 12:55:14 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2016-03-28 10:26:20 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEPCAYAAABCyrPIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAE7NJREFUeJzt3X+0J3V93/Hna/kVQH5pKmg2QNZEOPGYgmnQBI6sijWR\nyiZWwERTVEwbj62cQ45HoChY0hJqsJXaetRsm8VUfoQkgEIiJbi0mIDEhUIUERC1ICwm/FrAKLDv\n/vH97O7luvfeubs7M/fuPh/nzLnznZnvzPt+z9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F7gEuAD4O3J3kVzqu/xng1Kp6GfCLwHuTHMrkqOPaqjoEuA44\nfUuKlyRtO10app0PvKaq7gZI8hLgKuDP53pje27Cg238iSR3AEuBFcDRbbFVwGp86I4kjarLNYR1\nG8Kg+Sawbr4bSnIwcBhwI7B/Va2FjaHhbaySNLIZjxCSvLmN/k2Sq4FLmVxDOB64eT4bSfI8Jo3b\nTmlHCtOvQXgbqySNbLZTRm+aMr6WTad4vgfs3nUDrd3CZcBnquqKDetLsn9VrU1yAPDQzGs4e8r4\n8jZIkjZZ3Yatk443DG35BpILgb+rqlOnTDsPeLiqzkvyAWC/qvqRawiTI4kxDx7WsGzZu7nnnjUj\n1qCFKAkL48A29P03rO4W2H6R+b5rzovKSX4K+DfAwVOX79L9dZIjgbcBtye5hckndQZwHnBpkncB\n3wZOmG/hkqRtq8tdRpcDK5m0Tl4/n5VX1ZeYuWfUY+azLklSv7oEwj9U1QW9VyJJGlWXQPhYkrOA\na4AfbJhYVZ5Yl6TtSJdAeDnwm8Br2XTKqNprSdJ2oksgHA8sm9oFtiRp+9OlpfLfAvv2XYgkaVxd\njhD2Bb6e5Gaeew1hztt
2016-03-15 12:55:14 +00:00
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.figure.Figure at 0x7f04f626b710>"
2016-03-15 12:55:14 +00:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Plot histogram, the default is 10 bins\n",
"plt.hist(iris.target, bins=10)\n",
"plt.xlabel('Number of species')\n",
"plt.ylabel('iris class')\n"
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"We see we have the same distribution of samples for every class.\n",
"The next step is to see the distribution of the features"
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 8,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)']\n"
]
}
],
"source": [
2016-03-28 10:26:20 +00:00
"# This is a reminder of the name and index of each feature\n",
2016-03-15 12:55:14 +00:00
"print(iris.feature_names)"
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 9,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['setosa' 'versicolor' 'virginica']\n"
]
}
],
"source": [
2016-03-28 10:26:20 +00:00
"# A reminder of feature names and indexes\n",
2016-03-15 12:55:14 +00:00
"print(iris.target_names)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"A [**scatter plot**](https://en.wikipedia.org/wiki/Scatter_plot) (*gráfico de dispersión*) displays the value of typically two variables for a set of data."
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 10,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.text.Text at 0x7f04f62a1630>"
2016-03-15 12:55:14 +00:00
]
},
2016-03-28 10:26:20 +00:00
"execution_count": 10,
2016-03-15 12:55:14 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2016-03-28 10:26:20 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEPCAYAAABsj5JaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHpFJREFUeJzt3X+UXWV97/H3B8LoCCuB1BSVxAQUMClJQ+hFJCJjlUg0\nJrf+Qsut1obCUnND9a6uq17zQ3vv6qJa6w8IyhVJ7CTEyMXIDKKj4qw6UZwIBFJnwNgQf4AyaVOs\nFLRAv/ePszM5M3PO3uc8M+ecmeTzWuus7LOf59n7u59zcr6zn+fsfRQRmJmZ1eu4Vg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GNwNysvpiEt3M3M7PmquVK9AeA9wJ3A8NXn0fEvzQ2\ntPp4Et3MrH7jmUSv5V5Yv4qIO1I2bmZmR6+8CwmXZItvAY4HbgV+e7g8Iu5peHR18BmImVn9GnId\niKRv57SLiPjDlB02ihOImVn9GnohoaQzImJ/0bpWcwIxM6tfoy8kvKXCui+l7MzMzI4eVSfRJb0E\n+D1ghqQ3lBVNp3RTRTMzO4blfQvrbGAFcDLw+rL1vwb+vJFBmZnZ5FfLHMjLIuJ7TYonmedAzMzq\n1+hJ9E8Doyv9CviBfw/EzGxqa/Qk+rOAxcC+7LEImA2slvSJlJ2Wk3SjpEcl3Z9T51OS9knaI2nx\nePdpZmbjV0sCWQS8MiI+HRGfBl4NvAT4I2DZBMRwE/CaaoWSlgMviogzgauAz0zAPo9aBw8eZPfu\n3Rw8eLBi+eDgIFu2bGFwcLDutkXlqXFt3bqVVatWsXXr1rrKisp37drFhg0b2LVrV8W2eX3R3d3N\nFVdcQXd3d8W2eeV52y2
2016-03-15 12:55:14 +00:00
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.figure.Figure at 0x7f05193cde10>"
2016-03-15 12:55:14 +00:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# scatter makes a plot of x vs y\n",
"plt.scatter(iris.data[:,0], iris.target)\n",
2016-03-28 10:26:20 +00:00
"plt.ylabel(iris.feature_names[0])\n",
"plt.xlabel('species')"
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 11,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
{
"data": {
2016-03-28 10:26:20 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X18VOWZ8PHfnRcIBOIEUCEBMyFoK27Xyj6rIggBFlZt\n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YfIyspixIgR3HHHHaxfv77rs/n5+dx6662kpaWRlZVFZmYm\n9fX1NDQ0MGDAAC666KKubaVbycAnnniCVatWMXLkSIwxXHjhhWRmZrJx40a++MUvMn36dNLT07nr\nrrv45JNP+P3vf39S3D/72c9YtmwZw4cPZ/jw4Sxbtoynnnqqa316ejrl5eVkZmYycOBAx/rLig7y\n/ZAmKqlo5efkQ1vYwjbIy8lzdD/z5s3rGrzXr1/P/Pnzqa+v5+jRo4waNYphw4aRm5vLzTff3KM0\n35gxY3q08+CDD9LR0cH555/P5z73OZ544omT9rV//36OHDnC2LFjT1oXXkLQGMOYMWNoaGiIuO0Z\nZ5zR9XVBQQGNjSd++Z166qlkZmb2oRecoT/V/ZAmKqloLV+ynKI/F50Y6Nug6M9FLF+y3NH9XH31\n1VRWVtLQ0MBzzz1HIBBgzJgxZGVl8eGHH3LgwAEOHjxIU1MTr732Wtfnwmu9nnbaaaxevZqGhgZ+\n/OMfc+utt3bNwx83YsQIsrKyelSVOi4vL4/6+p7Xqt555x1Gjx5tuW19fT15eSd++UWqQ+sGHeT7\nITdKuKnUVOgvZOujWwk
2016-03-15 12:55:14 +00:00
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.figure.Figure at 0x7f05193a9c50>"
2016-03-15 12:55:14 +00:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Plot the distribution of the dataset\n",
"names = set(iris.target)\n",
"\n",
"# x and y are all the samples from column 0 (sepal_length) and 1 (sepal_width) respectively\n",
"x,y = iris.data[:,0], iris.data[:,1]\n",
"\n",
"for name in names:\n",
" cond = iris.target == name\n",
" plt.plot(x[cond], y[cond], linestyle='none', marker='o', label=iris.target_names[name])\n",
"\n",
"plt.legend(numpoints=1)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"As we can see, the Setosa class seems to be linearly separable with these two features.\n",
2016-03-15 12:55:14 +00:00
"\n",
"Another nice visualisation is given below."
]
},
{
"cell_type": "code",
2016-03-28 10:26:20 +00:00
"execution_count": 13,
2016-03-15 12:55:14 +00:00
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.text.Text at 0x7f04f5a176a0>"
2016-03-15 12:55:14 +00:00
]
},
2016-03-28 10:26:20 +00:00
"execution_count": 13,
2016-03-15 12:55:14 +00:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
2016-03-28 10:26:20 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEPCAYAAAC+35gCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4VNX2sN89M5mWRkkIhN5770UIiGJFxAI2LPdeRMWu\nn+16xXLl6s8uig0VvV4RuyDSCUjvTRBCSSBg6BCSmbSZ9f1xBphkEhjIJCHMfp/nPDmzzzr7rFNy\n1tlrr722EhE0Go1GowkGU0UroNFoNJrKgzYaGo1GowkabTQ0Go1GEzTaaGg0Go0maLTR0Gg0Gk3Q\naKOh0Wg0mqApc6OhlEpVSq1TSq1RSi0vQeYdpVSKUmqtUqpDWeuk0Wg05Y1SqpZSavI57PeRUqrF\nGWTuVkrdeu7anYU+ZT1OQym1A+gsIkdK2H45MFpErlRKdQfeFpEeZaqURqPRnCcopcwi4qloPYKl\nPNxT6gzHuQb4AkBElgGxSqmEctBLo9FoygSl1Fil1L1+v59TSj2qlNrg+327UupnpdQcYLYyeF8p\ntUkpNUMp9atSaqhPdp5SqpNv/bhS6iWfV2axUirer/5HfOuNlVKzfDIrlVINlVKRSqnZvt/rlFKD\nz/XcysNoCDBDKbVCKfWPYrbXBnb7/d7jK9NoNJrKyjfAjX6/bwSWYrwPT9ARGCoi/YGhQD0RaQWM\nAHqWUG8ksFhEOgC/A8W9U78C3vXJ9AL+AtzAEBHpAgwAXj/XE7Oc645nQW8R+ctnEWcppTaLyMJy\nOK5Go9FUCCKyVikVr5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JSI1iqlL\nu6fOU1JTU2nZsj05OaM
2016-03-15 12:55:14 +00:00
"text/plain": [
2016-03-28 10:26:20 +00:00
"<matplotlib.figure.Figure at 0x7f04f5a9c4a8>"
2016-03-15 12:55:14 +00:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"x_index = 0\n",
"y_index = 1\n",
"formatter = plt.FuncFormatter(lambda i, *args: iris.target_names[int(i)])\n",
"plt.scatter(iris.data[:, x_index], iris.data[:, y_index], s=40,\n",
"c=iris.target)\n",
"plt.colorbar(ticks=[0, 1, 2], format=formatter)\n",
"plt.xlabel(iris.feature_names[x_index])\n",
"plt.ylabel(iris.feature_names[y_index])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"This alternate visualisation also suggests that the Setosa class seems to be linearly separable.\n",
2016-03-15 12:55:14 +00:00
"\n",
"Students interested in practicing advanced visualisations can check [Advanced visualisation notebook](2_3_1_Advanced_Visualisation.ipynb).\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# References"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* [Feature selection](http://scikit-learn.org/stable/modules/feature_selection.html)\n",
"* [Classification probability](http://scikit-learn.org/stable/auto_examples/classification/plot_classification_probability.html)\n",
"* [Mastering Pandas](http://proquest.safaribooksonline.com/book/programming/python/9781783981960), Femi Anthony, Packt Publishing, 2015.\n",
"* [Matplotlib web page](http://matplotlib.org/index.html)\n",
"* [Using matlibplot in IPython](http://ipython.readthedocs.org/en/stable/interactive/plotting.html)\n",
"* [Seaborn Tutorial](https://stanford.edu/~mwaskom/software/seaborn/tutorial.html)\n",
"* [Iris dataset visualisation notebook](https://www.kaggle.com/benhamner/d/uciml/iris/python-data-visualizations/notebook)\n",
"* [Tutorial plotting with Seaborn](https://stanford.edu/~mwaskom/software/seaborn/tutorial/axis_grids.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Licence\n",
"\n",
"The notebook is freely licensed under under the [Creative Commons Attribution Share-Alike license](https://creativecommons.org/licenses/by/2.0/). \n",
"\n",
"© 2016 Carlos A. Iglesias, Universidad Politécnica de Madrid."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
2016-03-28 10:26:20 +00:00
"version": "3.5.1+"
2016-03-15 12:55:14 +00:00
}
},
"nbformat": 4,
"nbformat_minor": 0
}