Machine Learning

Let's start with a basic question: what is machine learning, and why should we use it?

We can define ML as a branch of data science that can efficiently solve prediction problems. Let's assume that we have data on the customers of an e-commerce website over the last three months, and that data contains the purchase history of a particular product (c_id, p_id, age, gender, nationality, purchased[yes/no]).

Our objective is to use the dataset to identify a customer who would be likely to purchase the product, based on their purchase history. We might think that a good idea would be to take the purchase column into account and to assume that those who have purchased the product previously would be most likely to purchase it again. However, a better business solution would take all parameters into account, including the region from which the most purchases happen, the age group of the customer, and their gender as well. Based upon the permutation of all of these fields, a business owner can get a better idea of the kind of customer who is most influenced by the product and the marketing team can therefore design more specific, targeted campaigns.

We can do this in two different ways. The first solution would be to write software in the programming language of our choice and to write logic that gives a specific weight to each of the parameters discussed. The logic would then be able to tell us who all the potential buyers are. The downside of this approach, however, is that a significant amount of time would be required to draft the logic and if new parameters are added (such as the profession of the customer), the logic would need to change. Furthermore, the logic written would solve only one specific business problem. This is the traditional approach adopted before machine learning was developed, and is still used by various businesses.

The second solution would be to use ML. Based on the customer dataset, we can train an ML model and make it predict whether a customer is a potential buyer or not. Training the model involves feeding all the training data to an ML library that would take all the parameters into account and learn which are the common attributes of customers who purchased the product, and which are the attributes of the customers who didn't purchase the product. Whatever is learned by the model is persisted in the memory and the obtained model is said to be trained. If the model is presented with the data of a new customer, it would use its training and make a prediction based upon the learned attributes that usually lead to a purchase. The same business problem that used to have to be solved with a computer program and hardcoded logic is now solved with a mathematical ML model. This is one of the many cases in which we can use ML.

It is important to remember that if the problem at hand is a prediction problem, ML can be applied to obtain a good prediction. However, if the objective of the problem is to automate a manual task, ML would not be helpful; we would need to use a traditional programming approach. ML solves prediction problems by using mathematical models.

Artificial intelligence (AI) is another word that we are likely to come across very often. Let's now try to answer another question: What is artificial intelligence and how is it different than machine learning?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.90.141