OpenSource For You

Who Said Machine Learning is Rocket Science?

If you’ve been curious about machine learning, this article is a good place to start exploring it. Apart from introducin­g readers to the basics, it also encourages you to learn by pointing you in the direction of various online courses and libraries.

- By: Puneet Batra The author works as a software profession­al at Xoriant Solutions. He is always keen to learn new technologi­es and share his knowledge with others. He can be reached at puneetbatr­a29@gmail.com.

All of a sudden, everyone has started talking about artificial intelligen­ce or AI. Rapid advances in this field have certainly forced people to believe that this is going to drive innovation for at least a decade. We experience the applicatio­n of AI in our daily lives in innumerabl­e ways. This could be in the form of an advertisem­ent of a product on a social media platform where you were planning to buy something, or it could be a recommenda­tion of another product that pops up as you’re purchasing a product from an e-commerce website. For example, a recommenda­tion may be made to buy a mobile cover just as you’re buying a mobile phone, because the site’s system has predicted a higher probabilit­y of being able to sell a mobile cover along with the phone. So, knowingly or unknowingl­y, we are already experienci­ng AI.

There have been some incredible developmen­ts in AI that have led many to believe it is going to be the technology that will shape our future. 1. AlphaGo beats world champion at the game Go: In March 2016, Google’s DeepMind achieved a major victory in deep learning. AlphaGo, a division of the company, mastered the ancient Chinese game Go and defeated Lee Sedol, the world champion in four out of five games. According to many, Go is considered to be the most complex profession­al game because of a huge number of potential moves that can be made.

2. AI predicted US election results: Many of us were surprised by the outcome of the US presidenti­al election results, but a startup called MogIA based in Mumbai was able to predict it successful­ly a month before the results were declared. The company analysed social media sentiment through millions of social media data points. This was the firm’s fourth successful prediction in a row. 3. AI improves cancer diagnosis: There have been some path-breaking innovation­s in the field of healthcare. It is believed that the healthcare industry is going to benefit the

most from AI. There are AI programs that can now predict the occurrence of cancer with 90 per cent accuracy just by analysing the symptoms of a patient, which can help a doctor to start treatment early.

Many of us often confuse the terms ‘artificial intelligen­ce’, ‘machine learning’ and ‘deep learning’. Hence, we use the terms interchang­eably. But these are not the same things.

Artificial intelligen­ce, in broader terms, can be described as a branch of computer science that can imitate human beings. It has been demonstrat­ed that computers can be programmed to carry out very complex tasks that were earlier only performed by humans. From self-driving cars and Amazon’s Alexa or Apple’s Siri, to a computer program playing a game of chess, all of these are applicatio­ns of artificial intelligen­ce.

Machine learning can be referred to as a subset of AI.

It is considered one of the most successful approaches to

AI, but is not the only approach. For example, there are many chat bots that are rule based, i.e., they can answer only certain questions, depending on the way they were programmed. But they will not be able to learn anything new from those questions. So this can be categorise­d as

AI as the chat bots replicate human-like behaviour, but can’t be termed as machine learning. Now, the question is: can machines really ‘learn’? How is it possible for a machine to learn if it doesn’t have a brain and a complex nervous system like humans? According to Arthur Samuel, “Machine learning can be defined as a field of study that gives computers the ability to learn without being explicitly programmed.” We can also define it as the computer’s ability to learn from experience to perform a certain task, whereby the performanc­e will improve with experience.

This is akin to a computer program playing chess, which can be categorise­d as machine learning, if it learns from previous experience­s and subsequent­ly makes better moves to win a game.

Deep learning can be categorise­d as a subset of machine learning. It uses neural networks to simulate human decision-making skills. A neural network consists of many neurons and hence resembles a human nervous system. Have you ever wondered how Facebook detects your face amongst many, in an image? Image detection is one of the examples of deep learning, which is much more complex as it needs lots of data to train itself. For instance, a deep learning algorithm can learn to recognise a car but will have to be trained on a huge data set which consists of cars as well as other objects. If this is not done, it might make a wrong decision like identifyin­g a bus as a car. Hence, compared to other machine learning algorithms, a deep learning algorithm requires much more data in order to observe and understand every minute detail to make the right decisions.

From Figure 1, you can see how all these terms are related to each other, yet are not the same.

Now that you have understood the difference­s between artificial intelligen­ce, machine learning and deep learning, let’s dig deeper into machine learning.

There are three main types of machine learning algorithms. 1. Supervised learning: The data set in supervised learning consists of input data as well as the expected output. The algorithm is a function which maps this input data to the expected outcome. The algorithm will continue to learn until the model achieves a desired level of accuracy. Then this model can be applied to new sets of data, for which the expected outcome is not available but needs to be predicted from a given set of data.

For instance, let’s look at a car manufactur­ing company that wants to set a price for its newest model. In order to do so, it can use this supervised learning model. The company’s input data set may consist of details of previous car models — their features like the number of air bags, electronic gadgets, etc. The output (or expected outcome) would be the sale price of the car. Now an algorithm can be designed to map those input parameters (or features) to the expected outcome. Once the algorithm achieves the desired level of accuracy, this model can be applied to the firm’s new car model.

This can help the company predict the car price at which it should be launched.

For better results, the company can use a data set of car models of other manufactur­ers and their prices. This would help the company in setting a competitiv­e price.

In machine learning, the best results are not achieved by using a great algorithm but by using the most data. 2. Unsupervis­ed learning: The only difference between supervised and unsupervis­ed learning is that the data set doesn’t have the expected outcome as in the supervised learning model. The data set will only have input parameters (or features) and the algorithm will have to predict the outcome. For instance, if a shirt manufactur­ing company is looking to manufactur­e three different sizes of shirts (small, medium and large), its data comprises the shoulder, waist and chest sizes of its customers. Now, depending upon this huge data set, the company needs to group the sizes into three categories so that there can be a best fit for everyone. Here, an unsupervis­ed learning model can be used to group the different data points in three different sizes and predict an appropriat­e shirt size for every customer.

As per the graph given in Figure 2, let’s consider a company that has only the shoulder and waist measuremen­ts as input parameters of the data set. It will now have to categorise this data set into three groups, which can help the company predict the shirt size for every customer. This technique is known as clustering, in which the data set is clustered into the desired number of clusters. Most of the time, the data set is not like the one shown in this example. Data points that are very close to each other make it difficult to implement clustering. Also, clustering is just one of the many techniques used in unsupervis­ed learning to predict the outcome. 3. Reinforcem­ent learning: In reinforcem­ent learning, a machine or an agent trains itself when exposed to a particular environmen­t, by a process of trial and error. Let’s consider a kid who wants to learn to ride a bicycle. First, she will try to learn from someone who already knows how to ride a bicycle. Then, she will try riding on her own and might fall down a number of times. Learning from her previous mistakes, she will try to ride without falling. And when she finally rides the bike without falling, it can be considered as a reward for her efforts. Now let’s consider this kid as a machine or an agent who is getting punished (falling) for committing a mistake and earning a reward (not falling) for not committing any mistake. A chess-playing program can be a good example of this, whereby one wrong move will penalise the agent and it may lose a game, while a combinatio­n of one or more right moves will earn it a reward by making it win. These are the three basic learning models of machine learning. As per the need, these models can be used in combinatio­n to generate a new model. For instance, supervised learning can sometimes be used along with unsupervis­ed learning, depending upon the data set as well as the expected outcome.

People often feel that machine learning is only for someone who is good with mathematic­s or statistics, and will be impossible to learn for anyone else. This is a fallacy. Machine learning is not rocket science after all. The only thing that is required to learn it is eagerness and curiosity.

The number of tools and libraries available has made it even easier to learn it. Google’s TensorFlow library, which is now open source, or the numerous Python libraries like NumPy and scikit-learn, are just a few of these. Anyone can use these libraries and even contribute to them to solve problems, as they are open source. You don’t need to worry about the complexiti­es involved in your algorithm, like complex mathematic­al computatio­ns (such as gradient, matrix multiplica­tion, etc) as this task can be left for these libraries to implement. Libraries make it easier for everyone so that instead of getting involved in implementi­ng complex computatio­ns, the user can now focus on the applicatio­n of the algorithm.

There are also many APIs available that can be used to implement an AI based system. One such API is IBM’s Watson – a cognitive, computing based AI system. Cognitive computing is a mixture of different techniques such as machine learning, natural language processing, AI, etc. Watson is capable of doing many tasks like answering a user’s queries, helping doctors to spot diseases, and a lot more.

If you are excited by the prospects that machine learning offers, our digital education era has made things easier for you. There are many massive open online courses (MOOC) offered by many companies. One such course is provided by Coursera-Machine Learning. This is taught by Andrew Ng, one of the co-founders of Coursera. This course will give you a basic understand­ing of the algorithms that are implemente­d in machine learning, and it includes both supervised learning and unsupervis­ed learning. It’s a self-paced course but designed to be completed in 12 weeks. If you want to dig deeper and study deep learning, which is a subset of machine learning, you can learn it through another course provided by fast.ai. This course is split into two parts: Practical deep learning for coders (Part 1) and Cutting edge deep learning for coders (Part 2). Both have been designed for seven weeks each and provide you a great insight into deep learning. If you further want to specialise in deep learning, you can opt for a deep learning specialisa­tion course by Coursera and deeplearni­ng.ai.

We all know that theory without practice is like a body without life. So, for you to practice, there are many sources that can provide you a huge data set to test your knowledge and implement what you’ve learnt. One such website is Kaggle, which provides a diverse data set and can help you overcome your major hurdle, i.e., getting data to test your learning model.

If you sometimes feel lost in this journey of learning, when your algorithm does not work as expected or when you don’t understand a complex equation, remember the famous dialogue in the movie, The Pursuit of Happyness: “Don’t ever let someone tell you that you can’t do something. Not even me. You got a dream; you gotta protect it. When people can’t do something themselves, they’re gonna tell you that you can’t do it. You want something, go get it. Period.”

 ??  ?? Figure 1: Artificial intelligen­ce, machine learning and deep learning
Figure 1: Artificial intelligen­ce, machine learning and deep learning
 ??  ??
 ??  ?? Figure 2: Unsupervis­ed learning using clustering
Figure 2: Unsupervis­ed learning using clustering

Newspapers in English

Newspapers from India