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

138 lines
517 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",
"* [Conclusions](#Conclusions)\n",
"* [References](#References)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Conclusions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2016-03-28 10:26:20 +00:00
"To wrap up this series of notebooks, we include a comparison of the algorithms reviewed in this session on synthetic datasets, based on the sample code of [sklearn](http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#example-classification-plot-classifier-comparison-py).\n",
2016-03-15 12:55:14 +00:00
"\n",
"Particularly in high-dimensional spaces, data can more easily be separated linearly and the simplicity of classifiers such as naive Bayes and linear SVMs might lead to better generalization than is achieved by other classifiers.\n",
"\n",
"The plots show training points in solid colors and testing points semi-transparent. The lower right shows the classification accuracy on the test set.\n",
"\n",
"The [DummyClassifier](http://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html#sklearn.dummy.DummyClassifier) is a classifier that makes predictions using simple rules. It is useful as a simple baseline to compare with other (real) classifiers. \n",
"\n",
2016-03-28 10:26:20 +00:00
"We are going to import a function defined in the file [plotml.py](files/plotml.py) using the *magic command* **%run**."
2016-03-15 12:55:14 +00:00
]
},
{
"cell_type": "code",
"execution_count": 1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diAG7ZwrrJjH4WOt4r+v7r+cYeCStY7el+N7W\nTe99PFs2YPM0vQboX189yZR5KjHddPZ4q/X+7D6pYz23pOM2e26aTMG5scj7+hIblAwrMu+KtM6B\nmWkjgKeLLNtg/fbLL7/88ssvv/zyyy+/mu7lFMFmZmZmZs2jOzFgWqqhxB5VV4bYCw2AEMcsvZIY\naN2t4D1jQgj3FUx7Mf17ZcH0F4i9nYqlN70mbSe/zRnEXlwrEXt95afne9IhqYukXsQeaa+RUrUW\n8fs6pheaTuxFu189y2xF7NV6QwhhUW+8EMfQvAxoAxxQ8J4c8OeCaU9T975YRDFN7TeAB0MIwwtm\nX5zW8Z361lGP7unfGUv5/kUKvpduiimVJxOD9dnvZTqpzKkHbTFzib11t029C5uFpO7APsA/gQWS\neudfwFfERgW7F7wtAFeEEArTzE5P/x6UTVnbBJb62MmUaWcVpDsucDuxt+KxBdOPAf4bQnijyHuu\nKFImSihToRsL6v1cYo/i7HqGEntB/h3oVfA9/Zu4Lwq/p5JIWgnYA3g0hPDkUqwiX9f/EEJY1DM2\nhPAOsESv8IJ60kFSr/Q5HifWx/UL31NMyIz5K6mdYkrt/HqqgK0zi08HNpK0UT2rPAhoD9yY3b9p\nnQ8Tz2uF5/5iSqnfZmZmZmbWRBxgNTMzMzNrHjOAbo1YfhAxgPRBkXnDiQ/O1yqYXiwN5tT075d1\nTO9dMD1QPJ3tB4XblLSW4hisU4jB40nEHm97E4OxhSamYG0pLiH2Ts2P83iPpGMldc0sMyhTtkL5\nAGjhPhobQlhQMC2f8rNwXxSqb3sfEgNwhdsrVX6/NOYYKUrSFpIeljSTGGSZSPxeNqH293InMfB0\nFjBF0lNp3Mj++QVCCNX
"text/plain": [
"<matplotlib.figure.Figure at 0x7f36f561f198>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
2016-03-15 12:55:14 +00:00
"source": [
"# display plots in the notebook \n",
"#%matplotlib inline\n",
"\n",
"# Run in a separate window to make it bigger\n",
2016-03-28 10:26:20 +00:00
"%matplotlib inline\n",
2016-03-15 12:55:14 +00:00
"%run plotml\n",
"plot_classifiers()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## References"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"* [Classifier comparison¶](http://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#example-classification-plot-classifier-comparison-py)\n",
"* [DummyClassifier ](http://scikit-learn.org/stable/modules/generated/sklearn.dummy.DummyClassifier.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Licence\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
}