01.11.2020 Views

Machine Learning in Python Essential Techniques for Predictive Analysis by Michael Bowles (z-lib.org).epub

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PHYSICAL CHARACTERISTICS OF THE ROCKS

VERSUS MINES DATA SET

The first thing to do with a new data set is to determine its size and

shape. Listing 2-1 shows code for determining the size and shape of

the “Rocks versus Mines” data set from the UC Irvine Data

Repository: the rocks versus mines data. Later in this chapter, you’ll

learn more about this data set, and the book will use it for example

purposes as the algorithms are introduced. The process for

determining the number of rows and columns is pretty simple in this

case. The file is comma delimited, with the data for one experiment

occupying one line of text. This makes it a simple matter to read a

line, split it on the comma delimiters, and stack the resulting lists into

an outer list containing the whole data set.

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

Saved successfully!

Ooh no, something went wrong!