Complete Example of Machine Learning
Python and Artificial Intelligence
“Machine learning is the science of getting computers to learn without being explicitly programmed.” — Sebastian Thurn
For further information on artificial intelligence, first AI story.
In this story, I will walk you through a complete coding example of a machine learning application. This application will be for an online music store that needs a reliable way to predict what kind of music its users are interested in.
The steps to follow in developing an artificial, intelligence application, using python, was mentioned in my first story. I mention them again.
- Import the data
- Clean the data — remove duplicate data. If the data is text-based. Convert the data to numerical, values.
- Split the data into training and test sets — Make sure our model produces the correct result.
- Create a model — Select an algorithm to analyze the data. Decision trace, Neural networks… Each algorithm has pros and cons. What makes python such a popular language in AI is some libraries already exist that implemented many of the algorithms. The library I will use is pcikit-learn.
- Train the model.
- Make predictions.-When you…