Here’s what you need to know about machine learning languages, tools and frameworks.
Thanks to its role underpinning many of the recent advances in artificial intelligence, machine learning has become of mainstream interest to many technologists and developers.
Here we’ll explain what it is, how you can get started plus the best tools and languages you need to develop machine learning technology.
What is machine learning?
Machine learning is a subset of artificial intelligence defined by US computing pioneer Arthur Samuel in 1959 as a ‘field of study that gives computers the ability to learn without being explicitly programmed’.
Instead, computers are ‘trained’ to spot patterns or identify trends by feeding them large amounts of data. You may have also heard of ‘deep learning’ or ‘neural networks’, another subset within machine learning.
Practical examples of machine learning in action include speech recognition, the technology underpinning self-driving cars and web searches. Other uses exploit predictive abilities, like predicting when machines, trains or ships will need maintenance – before they break.
Machine learning: how to get started
As with getting to grips with almost any subject, first off you should open up your browser and do some research.
The route many tech specialists take when learning a new skill is to look for traditional training courses. However this may not be possible financially – and there are many more options out there, especially online.
“The best way to get started is talk to experts or other competent people, and join a community of others wanting to learn,” says Matt Jones, head of analytics at Tessella.
If you have a data science team within your company – go and talk to them, get mentoring and advice.
If not, go online and look at Topcoder and Kaggle, which both have huge communities of machine learning experts and run competitions where you can learn to solve specific problems, Jones advises.
There are also plenty of free online courses to choose from. Andrew Ng’s machine learning course on Coursera is one of the best, according to Raghu Ramanujan, head of data science at Twizoo.
He also recommends two textbooks: “Chris Bishop’s Pattern Recognition and Machine Learning is a classic, while Learning From Data by Abu-Mostafa et al provides a fantastic theoretical grounding.”
Another book worth reading is Peter Norvig’s ‘Artificial Intelligence: A Modern Approach’, according to Alex Lavin, software engineer at Numenta.
“It’s important to fundamentally understand the algorithms you’ll be using, otherwise every machine learning method is a black box and the best you can do is blindly throw them at problems… You’re going to fail, often, but that’s how to best learn machine learning techniques,” he adds.
It’s also important to step back and first answer the ‘why’ before the ‘how’, according to Jones.
“The key thing to do before jumping in is really think about what you want to achieve and how you define success. It can be a business problem, a personal challenge or an interest. But once you identify that, it can really help to focus efforts and decide the next step,” he explains.
Machine learning: best programming languages
“Python, without a doubt. Most machine learning and data analytics toolkits are in Python and it has a huge, helpful community,” says Lavin.
Both Jones and Ramanujan agree Python should be the go-to language for developers hoping to build machine learning platforms. It should be comfortable and familiar for most developers and means that many of them won’t need to learn a new language, says Jones.
“It’s highly readable and is easy to learn… libraries such as theano and Google’s TensorFlow that are used in bleeding edge ‘deep learning’ systems are also Python-based. You are unlikely to outgrow Python anytime soon,” Ramanujan says.
Jones suggests it’s worth checking out another language called ‘R’.
“R has more complete, complex and in-depth machine learning capabilities. It’s the way to go if you can. However, you aren’t pinned down to these things, these are lots of ML models that use Python,” he explains.
Machine learning: best tools
The tools you will need depend on the problems you are trying to solve and the data you are dealing with. However, “open source reigns supreme”, according to Lavin.
He recommends Scikit-learn for its broad range of machine learning and data analytics tools, plus mlpack for C++ developers, NLTK for natural language processing methods and NuPIC for streaming analytics.
For deep learning, it’s worth taking a look at Theano, Neon, Google TensorFlow and deeplearning4j, Lavin adds.
There are various other skills you’ll need to have, according to Ramanujan: data manipulation skills, basic statistical analysis and data visualisation, for example.
To implement large big data/machine learning pipelines you also need to be familiar with a distributed computing network like Apache Spark, he says.
A number of big technology companies have released their own machine learning toolkits which are well worth tinkering with, according to Jones. As well as Google TensorFlow, there is Amazon Machine Learning, IBM Watson and Facebook’s ‘FBLearner Flow’, all of which are open source and available for free.
“That removes that barrier of having to spend a huge amount of capital to invest in AI. Once you decide what you want to do, you really want to start experimenting with which work best for your needs,” he says.
Machine learning: how to set up a framework
The first and most important step is to understand the problem you are trying to solve, according to both Lavin and Ramanujan. This saves an awful lot of dissatisfaction and frustration further down the line.
It also involves an understanding of the relative strengths and weaknesses of the different machine learning methods described above, Ramanujan says.
There are basically six steps you need to follow when setting up a machine learning framework, Lavin says:
- Define the problem
- Analyse and prepare the data
- Select algorithms
- Run and evaluate the algorithms
- Improve the results with focused experiments
- Finalise results with fine tuning
- It is crucial that you really understand the data before starting to experiment with algorithms as otherwise you can have no realistic confidence in the resultant quality or reliability, he explains.
Lavin adds: “For the algorithms that are suitable for your problem and data, there are many criteria to consider: reliability, efficiency, scalability, and so on. Keep in mind any given method (e.g. deep learning) is not a hammer for every nail.
“I often see engineers are dissatisfied with their results because they immediately throw deep learning models at their data without first understanding the real problem.”
Lavin offers one last tip: if you plan to share or deploy this machine learning framework, document everything you do. This will become invaluable for you and other engineers further down the line.