<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Lecture 8.1
Machine Learning
We will review some of the basic methods in machine learning. 
The text for this is Introduction to Machine Learning by Anreas Muller and Sarah Guido. It focuses on using tools from Python, and not so much on theoretical aspects.
A good source for theoretical development is the book The Elements of Statistical Learning by Hastie, Tibshirani and Friedmna, available online at http
Step1:  Now go back to your Jupyter Hub file list, to access the code examples.
Some things to be careful about.
The preamble seems buggy, so you might want to comment out this first line in the examples
<ASSISTANT_TASK:>
Python Code:
%%bash
git clone https://github.com/amueller/introduction_to_ml_with_python.git
Explanation: Lecture 8.1
Machine Learning
We will review some of the basic methods in machine learning. 
The text for this is Introduction to Machine Learning by Anreas Muller and Sarah Guido. It focuses on using tools from Python, and not so much on theoretical aspects.
A good source for theoretical development is the book The Elements of Statistical Learning by Hastie, Tibshirani and Friedmna, available online at http://statweb.stanford.edu/~tibs/ElemStatLearn
The software tools come from scikit-learn at http://scikit-learn.org
A video about the tools is available here http://bit.ly/advanced_machine_learning_scikit-learn
Code examples are here: https://github.com/amueller/introduction_to_ml_with_python
What is machine learning
It's about extracting knowledge from data.
Think of presenting a collection of data to a computer that runs some algorithm. The point is to extract useful features from the data (e.g. where are the buildings in this image) or make a decision based on the data (e.g. this email is spam). Machine learning involves an algorithm that learns "on its own" how identify important features or make classification decisions.
Supervised versus unsupervised learning. Discuss.
Questions to ask when attempting to use machine learning:
- what questions and I trying to answer? Does the collected data possibly answer that question?
- What's the best way to phrase the quesiton as a machine learning problem?
- do I have enough data to represent the problem I want to solve?
- what features can I extract from the data, and will this aid in answering the questions?
- how do I measure success of the algorithm?
- how will the machine learning solution interact with the bigger picture of how I make decisions, inform my research, run my business?
Loading software tools
We will need Python, pandas, matplotlib, numpy, scipy, and sklearn
I think all of these are already available in Syzygy, so you just have to import them from within your Jupyter notebook. 
Loading the examples from book
You can clone the examples directly into your Jupyter Hub, using a git clone command.
I like doing this directly, as in the %%bash command below. You could also do this in the terminal, if you like. (NOTE: This command takes a while, so be patient.)
End of explanation
from scipy.misc import imread
Explanation: Now go back to your Jupyter Hub file list, to access the code examples.
Some things to be careful about.
The preamble seems buggy, so you might want to comment out this first line in the examples:
from preamble import *
They forgot the display command, so you need to enter this code in the example note books.
from IPython.display import display
End of explanation
<END_TASK>