{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": false }, "source": [ "Exercises: Fisher's Iris Data\n", "===" ] }, { "cell_type": "code", "execution_count": 148, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#Load the Iris data set\n", "import sklearn.datasets\n", "iris = sklearn.datasets.load_iris()\n", "X = iris['data']\n", "Y = iris['target']\n", "feature_names = iris['feature_names']\n", "target_names = iris['target_names']" ] }, { "cell_type": "code", "execution_count": 144, "metadata": { "collapsed": false }, "outputs": [], "source": [ "#How many data cases are there?" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "#How many data cases are assigned to each target value?" ] }, { "cell_type": "code", "execution_count": 145, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#What is the average value for each of the features over the whole data set?" ] }, { "cell_type": "code", "execution_count": 146, "metadata": { "collapsed": true }, "outputs": [], "source": [ "#What is the average value of each of the features per type?" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.8" }, "name": "Day 1 Exercises.ipynb" }, "nbformat": 4, "nbformat_minor": 0 }