{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Import" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.20.3\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/usr/local/lib/python2.7/dist-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.\n", " \"This module will be removed in 0.20.\", DeprecationWarning)\n" ] } ], "source": [ "import pandas as pd\n", "import os\n", "from sklearn.cross_validation import train_test_split\n", "from sklearn.metrics import accuracy_score\n", "from sklearn.svm import SVC\n", "from sklearn.metrics import confusion_matrix\n", "\n", "print pd.__version__" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
| \n", " | f1 | \n", "f2 | \n", "f3 | \n", "f4 | \n", "target | \n", "
|---|---|---|---|---|---|
| 0 | \n", "3.62160 | \n", "8.6661 | \n", "-2.8073 | \n", "-0.44699 | \n", "0 | \n", "
| 1 | \n", "4.54590 | \n", "8.1674 | \n", "-2.4586 | \n", "-1.46210 | \n", "0 | \n", "
| 2 | \n", "3.86600 | \n", "-2.6383 | \n", "1.9242 | \n", "0.10645 | \n", "0 | \n", "
| 3 | \n", "3.45660 | \n", "9.5228 | \n", "-4.0112 | \n", "-3.59440 | \n", "0 | \n", "
| 4 | \n", "0.32924 | \n", "-4.4552 | \n", "4.5718 | \n", "-0.98880 | \n", "0 | \n", "