24.07.2016 Views

www.allitebooks.com

Learning%20Data%20Mining%20with%20Python

Learning%20Data%20Mining%20with%20Python

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2<br />

Loading the dataset<br />

The dataset we are going to use is called Ionosphere, which is the recording of many<br />

high-frequency antennas. The aim of the antennas is to determine whether there is a<br />

structure in the ionosphere and a region in the upper atmosphere. Those that have a<br />

structure are deemed good, while those that do not are deemed bad. The aim of this<br />

application is to build a data mining classifier that can determine whether an image<br />

is good or bad.<br />

(Image Credit: https://<strong>www</strong>.flickr.<strong>com</strong>/photos/geckzilla/16149273389/)<br />

This can be downloaded from the UCL Machine Learning data repository, which<br />

contains a large number of datasets for different data mining applications. Go to<br />

http://archive.ics.uci.edu/ml/datasets/Ionosphere and click on Data<br />

Folder. Download the ionosphere.data and ionosphere.names files to a folder<br />

on your <strong>com</strong>puter. For this example, I'll assume that you have put the dataset in a<br />

directory called Data in your home folder.<br />

The location of your home folder depends on your operating system.<br />

For Windows, it is usually at C:\Documents and Settings\<br />

username. For Mac or Linux machines, it is usually at /home/<br />

username. You can get your home folder by running this python code:<br />

import os<br />

print(os.path.expanduser("~"))<br />

[ 29 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!