Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
df = pd.read_csv(
'http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',
names = ['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)', 'class']
)
# store feature matrix in "X"
X = df.drop('class', axis=1).values
levels = {'Iris-setosa': 0, 'Iris-versicolor': 1, 'Iris-virginica':2}
@dimi-tree
dimi-tree / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console