Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Last active February 3, 2018 14:57
Show Gist options
  • Save NMZivkovic/2eed44f0b94c664bd5afce15dffa3d9d to your computer and use it in GitHub Desktop.
Save NMZivkovic/2eed44f0b94c664bd5afce15dffa3d9d to your computer and use it in GitHub Desktop.
# Import `tensorflow` and `pandas`
import tensorflow as tf
import pandas as pd
COLUMN_NAMES = [
'SepalLength',
'SepalWidth',
'PetalLength',
'PetalWidth',
'Species'
]
# Import training dataset
training_dataset = pd.read_csv('iris_training.csv', names=COLUMN_NAMES, header=0)
train_x = training_dataset.iloc[:, 0:4]
train_y = training_dataset.iloc[:, 4]
# Import testing dataset
test_dataset = pd.read_csv('iris_test.csv', names=COLUMN_NAMES, header=0)
test_x = test_dataset.iloc[:, 0:4]
test_y = test_dataset.iloc[:, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment