mirror of
https://github.com/gsi-upm/sitc
synced 2024-11-05 07:31:41 +00:00
390 lines
80 KiB
Plaintext
390 lines
80 KiB
Plaintext
|
{
|
||
|
"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": [
|
||
|
"First, we are going to inspect the distribution of the samples per feature."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"from sklearn import datasets\n",
|
||
|
"iris = datasets.load_iris()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"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": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"First we are going to analyse the [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."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.text.Text at 0x7fe98cd3db38>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 11,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAA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y0liN7NDA0EWoGVm7WPurjACq6k7g0qlrkiQdMOzLSJIEGAiS\npGbFQEhySJIvzqoYSdJwVgyEqvo+sD3J8TOqR5I0kC4nlTcCn0tyHbCwe2ZVvai3qiRJM9clEN7W\nexWSpMF16dzuk0lOAJ5QVVclmQMO6b80SdIsdenc7ueAjwK/3Wb9EHBxn0VJkmavy2WnvwScCvwd\nQFXdChzTZ1GSpNnrEgjfrarv7Z5IcijjuDdbkrSGugTCJ5O8BTg8yXOAPwI+1m9ZkqRZ6xII5wDf\nAG4Bfh64HHhrn0VJkmavy1VGu5JsBa5lcqhoe3XsXjHJccD7gU3ALuB9VfXuJBuBDwMnAF8Bzqqq\nu/ftV5AkrYUuVxm9APhr4N3Ae4Dbkjy/4/rvB95YVU8Gfhz4pSRPYrLXcVVVnQRcDZy7L8VLktZO\nlxvT3gX8s6q6DSDJ44HLgI+v9sb23IS72vg9Sb4AHAdsAU5vi20FtuFDdyRpUF3OIezcHQbNl4Cd\n024oyWOBk4FPA5uqah4eCA0vY5WkgS27h5DkJW30r5JcDnyEyTmEM4Hrp9lIkoczubnt7LansPQc\nhJexStLAVjpk9MJF4/PsOcTzDeDwrhto9y18FPhAVV2ye31JNlXVfJJjga8vv4bzF41vboMkaY9t\nbdg/nZ6pvF8bSN4P/G1VvXHRvAuBHVV1YZI3Axur6gfOIfhMZY3VyJ6dO3QRakbWLqZ+pvKqgZDk\nh4F/BzyWRXsUXbq/TnIq8BdM7mGoNrwFuI7JIajHALczuez023t5v4GgURrZF3/oItSMrF1MHQhd\nrjK6GLiIyd3Ju6ZZeVV
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7fe9a8bfc198>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# Plot histogram, the default is 10 bins\n",
|
||
|
"plt.hist(iris.target, bins=10)\n",
|
||
|
"plt.xlabel('iris class')\n",
|
||
|
"plt.ylabel('Number of species')\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"metadata": {
|
||
|
"collapsed": true
|
||
|
},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"We see we have the same distribution of samples for each class.\n",
|
||
|
"Now we are going to see the distribution of the features"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)']\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# We remember the name of the features to see its index\n",
|
||
|
"print(iris.feature_names)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"['setosa' 'versicolor' 'virginica']\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# We remember the name of target names\n",
|
||
|
"print(iris.target_names)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"A [**scatter plot**](https://en.wikipedia.org/wiki/Scatter_plot) (*gráfico de dispersión*) display values for typically two variables for a set of data."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.text.Text at 0x7fe9a8d21630>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEPCAYAAABsj5JaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHipJREFUeJzt3X+cXXV95/HXG5LoCI9EUtPUkkBAAZOSNMRdBCIyVIhE\nY7JdrT+arbtuKDys2VDdRx+rriTRto8uW+v6A4KlpSbsJEBkMTBBdPw1D5lYmEhIoM6AsWHUgjLp\nslBZogv42T/umcmdmXvPufc7c++dSd7Px+M+5t7z/XE+5zvnMZ8553vOuYoIzMzM6nVCqwMwM7Op\nyQnEzMySOIGYmVkSJxAzM0viBGJmZkmcQMzMLElLE4ikeZK+Jen7kh6RtKFCnUskPSNpX/b6eCti\nNTOzkaa1eP0vAh+OiP2STgYelNQVEY+OqvediFjdgvjMzKyKlh6BRMTPImJ/9v45oB84tUJVNTUw\nMzMrNGnmQCQtAJYCD1QovlDSfkn3SFrU1MDMzKyiVp/CAiA7fXUHcE12JFLuQeC0iHhe0kpgF3B2\ns2M0M7OR1OpnYUmaBuwG7o2Iz9ZQ/3Hg9RHxdIUyP9jLzKxOEZE0TTAZTmH9HdBXLXlImlv2/nxK\nSW9M8hgSEZPqtWnTppbH4JiOnZgma1yOaerGNB4tPYUlaTmwFnhE0kNAAB8DTgciIm4C3inpA8AL\nwBHg3a2K18zMjmppAomIPcCJBXVuAG5oTkRmZlaryXAK65jW3t7e6hDGcEy1mYwxweSMyzHVZjLG\nNB4tn0SfSJLiWNoeM7NGk0RM4Ul0MzObgpxAzMwsiROImZklcQIxM7MkTiBmZpbECcTMzJI4gZiZ\nWRInEDMzS+IEYmZmSZxAzMwsiROImZklcQIxM7MkTiBmZpb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
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"# scatter makes a plot of x vs y\n",
|
||
|
"plt.scatter(iris.data[:,0], iris.target)\n",
|
||
|
"plt.ylabel(iris.feature_names[0])\n",
|
||
|
"plt.xlabel('species')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 12,
|
||
|
"metadata": {
|
||
|
"collapsed": false,
|
||
|
"scrolled": true
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X14VOWZP/DvkxcIBMIEIi8JkBmCWnG7Vn7XirwIARaq\ndksrogUmEnxrUQsIWC+rO5I0trVoUfFllcWaKBRQrC77U9yySDKAK/62aNW6ajeZRJsgihACkRBI\n7t8fGZLJ5IRzZubMmTMz3891zcXknDPPuc9D8uTkOec+txIREBFRYkqJdQBERBQ9HOSJiBIYB3ki\nogTGQZ6IKIFxkCciSmAc5ImIEpjhQV4plaKUOqCU2q6xbppSqtG//oBS6p/NDZOIiMKRFsK2ywF8\nBCCrl/VeEZkTeUhERGQWQ2fySqmRAK4GsOFcm5kSERERmcbodM0jAH4G4FzpsROVUu8ppV5TSo2L\nPDQiIoqU7iCvlPoegEMi8h46zta1ztj/BGC0iHwHwBMAXjU1SiIiCovSe3aNUupXAIoAnAHQD8BA\nAH8QkUXn+IwPwP8RkSNBy/mgHCKiMIhIWFPiumfyInKviIwWkTEA5gN4M3iAV0oNC3h/GTp+eRyB\nBhGx/Wv16tUxj4FxMs54jZFxmv+KRCh313SjlPpJx5gt6wHMU0rdBuA0gJMAfhRRVEREZIqQBnkR\nqQJQ5X//TMDyJwE8aW5oREQUKWa8aigsLIx1CIYwTnPFQ5zxEC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559j5MiRutvW1dUh\nN7frl59WHVorcJBPQla
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7fe98ccc57b8>"
|
||
|
]
|
||
|
},
|
||
|
"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": [
|
||
|
"As we can see, the Setosa class seems to be linear separable with these two features.\n",
|
||
|
"\n",
|
||
|
"Another nice visualisation is given below."
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {
|
||
|
"collapsed": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"<matplotlib.text.Text at 0x7fe98cde0f28>"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEPCAYAAAC+35gCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXd4VFX6+D9nZjItjZIQCL33DqEKAVFEVlQsYENxdwEV\nu/5s64plZfW7dhQsqOi6InZBpBN67whCKAlNegnJTNr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pajQaTRHQb8gAdEujHGKxWOjX7xpMplX5tuzBZEqnW7duZaKXRnPZYQ5yqUCUih1VSpmA1cA+\nEQnopVVKvQsMADKAe0RkfWnoVZ754IO36dKlBxkZx3G76xAWdoywsI18+eV/CQsLKzO9Nm3axIED\nB2jXrh1xcXFlpodGExJ0ltsASqvx9TCwBYjKv0EpNQBoKCKNlVJdgAlA11LSq9zSoEEDtm37nYkT\nP2Xx4hU0atSF++77lEaNGpWJPvv27WPgwBvZsSOFsLBYMjP3cs89d/P+++9gNlewTzHN5YN2TwVQ\n4tFTSqlawGfAv4DH8rc0lFITgPki8o3v91YgUUQO5ZPT0VOXKCJC69Yd+OOPKng8PTG8nm6czu95\n/vm/8/TT/6+sVdRUMEIWPfVDkLKDdfRUKHkLeBIo7I1fE9jr93u/r0xTTlizZg0pKQf9DAaAA5fr\nSt58892yVE2jKR46eiqAEj1dpdRA4JCIrFdKJQLFssRjxow5u56YmEhiYmJxqtOEiH379mE2VyPw\nGySWY8cOloVKmgpGUlISSUlJoa+4ghmEYChR95RS6lXgTiAXcACRwA8iMsxPJr976g+gt3ZPlR9S\nUlJo3rwtmZmjAf9Bhdt
|
||
|
"text/plain": [
|
||
|
"<matplotlib.figure.Figure at 0x7fe98ce060b8>"
|
||
|
]
|
||
|
},
|
||
|
"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": [
|
||
|
"Here we can also check that the Setosa class seems to be linear separable.\n",
|
||
|
"\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",
|
||
|
"version": "3.5.1"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 0
|
||
|
}
|