{ "metadata": { "name": "", "signature": "sha256:cfb34d1c50e9095a633d85dd5229c48fbfb6c528e4e69f20b2d25a017f7cfdb7" }, "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": [ "import time\n", "import platform\n", "print('Last updated: %s' %time.strftime('%d/%m/%Y'))\n", "print('Created using Python', platform.python_version())" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Last updated: 26/06/2014\n", "Created using Python 3.4.1\n" ] } ], "prompt_number": 1 }, { "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