{ "metadata": { "name": "", "signature": "sha256:7417613f49b14e98fba46fa1e285f4e3d46728b4798e853cfb103caef077b452" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[Sebastian Raschka](http://sebastianraschka.com) \n", "\n", "- [Open in IPython nbviewer](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/python_data_entry_point.ipynb?create=1) \n", "\n", "- [Link to this IPython notebook on Github](https://github.com/rasbt/python_reference/blob/master/tutorials/python_data_entry_point.ipynb) \n", "\n", "- [Link to the GitHub Repository pattern_classification](http://nbviewer.ipython.org/github/rasbt/pattern_classification/blob/master/python_howtos/)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%load_ext watermark" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "%watermark -a 'Sebastian Raschka' -v -d -p numpy,scipy,matplotlib,scikit-learn" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Sebastian Raschka 04/07/2014 \n", "\n", "CPython 3.4.1\n", "IPython 2.1.0\n", "\n", "numpy 1.8.1\n", "scipy 0.14.0\n", "matplotlib 1.3.1\n", "scikit-learn 0.15.0b1\n" ] } ], "prompt_number": 5 }, { "cell_type": "markdown", "metadata": {}, "source": [ "[More information](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/ipython_magic/watermark.ipynb) about the `watermark` magic command extension." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
$[bash]> conda create -n myenv python=3\n", "$[bash]> source activate myenv\n", "$[bash]> conda install -n myenv numpy scipy matplotlib scikit-learn\n", "\n", "When we start \"python\" in your current shell session now, it will use the Python distribution in the virtual environment \"myenv\" that we have just created. To un-attach the virtual environment, you can just use\n", "
$[bash]> source deactivate myenv\n", "\n", "**Note:** environments will be created in ROOT_DIR/envs by default, you can use the `-p` instead of the `-n` flag in the conda commands above in order to specify a custom path.\n", "\n", "**I find this procedure very convenient, especially if you are working with different distributions and versions of Python with different modules and packages installed and it is extremely useful for testing your own modules.**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
1,14.23,1.71,2.43,15.6,127,2.8,3.06,.28,2.29,5.64,1.04,3.92,1065\n", "1,13.2,1.78,2.14,11.2,100,2.65,2.76,.26,1.28,4.38,1.05,3.4,1050\n", "[...]\n", "2,12.37,.94,1.36,10.6,88,1.98,.57,.28,.42,1.95,1.05,1.82,520\n", "2,12.33,1.1,2.28,16,101,2.05,1.09,.63,.41,3.27,1.25,1.67,680\n", "[...]\n", "3,12.86,1.35,2.32,18,122,1.51,1.25,.21,.94,4.1,.76,1.29,630\n", "3,12.88,2.99,2.4,20,104,1.3,1.22,.24,.83,5.4,.74,1.42,530" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
predicted class | \n", "\t\t||||
class 1 | \n", "\t\tclass 2 | \n", "\t\tclass 3 | \n", "\t||
actual class | \n", "\t\tclass 1 | \n", "\t\tTrue positives | \n", "\t\t||
class 2 | \n", "\t\tTrue positives | \n", "\t\t|||
class 3 | \n", "\t\tTrue positives | \n", "\t