Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We’ll use NumPy heavily in this book because we’ll be doing some linear algebra. Don’t worry about linear algebra—we just want to do the same math operation on lots of different data points. If we represent our data as a matrix, we can do simple math without a bunch of messy loops. Before we get into any machine learning algorithms, you should make sure you have Python working and NumPy properly installed. NumPy is a separate module for Python that doesn’t come with most distributions of Python, so you’ll need to install it after you’ve installed Python. Start a Python shell by opening a command prompt in Windows or a terminal in Linux and Mac OS. At the command line, type python for Linux and Mac or c:\Python27\python.exe in Windows. From this point on, anytime you see these symbols
>>>