Solution to problem Sheet 4 for Emerging Technologies module. The module is taught to undergraduate students at GMIT in the Department of Computer Science and Applied Physics. The lecturer is Ian McLoughlin.
The Jupiter file includes two solutions:
The first solution adapted from Tensorflow website: https://www.tensorflow.org/get_started/estimator
The second solution completed using Keras libraries. This solution was originally adapted from salmanahmad4u and then step by step reworked during labs and lectures of Emerging Technologies module with the lecturer. Reworked code adapted from: https://github.com/emerging-technologies/keras-iris/blob/master/iris_nn.py
These problems relate to the Python package Tensorflow. We will again use the famous iris data set. Save your work as a single Jupyter notebook file in a GitHub repository. Include any required data files, a README, and a gitignore file in the repository.
Use Tensorflow to create a model to predict the species of Iris from a flower's sepal width, sepal length, petal width, and petal length.
Split the data set into a training set and a testing set. You should investigate the best way to do this, and list any online references used in your notebook. If you wish to, you can write some code to randomly separate the data on the fly.
Use the testing set to train your model.
Use the testing set to test your model, clearly calculating and displaying the error rate.
Install : Anaconda
Install numpy
conda install numpy
cd to the repository folder use:
$ jupyter notebook
to start jupyter notebook
Keras library was used for the second solutiuon model generation.
use:
easy_install keras
for keras instalation.