Demystifying the magic of AI

Demystifying the magic of AI

What do you think of when you hear or see the word ‘AI’? I am sure many would think of some robot doing intelligent tasks or super computers that can predict the future. Is this correct??Well, the answer is ‘yes’ and ‘no’. Artificial Intelligence is a field which is still evolving and there many things that are yet to be unraveled.

AI/ML is a buzzword nowadays and it is highly likely that you already know that it means Artificial Intelligence/Machine Learning. Though terms AI and ML are often used interchangeably, they are not the same, to be precise Machine Learning is a subclass of AI.?

AI/ML has fascinating applications. Watching AI/ML models work is like watching a magic show, you become curious and you want to know how the magician performed this trick. The same curiosity triggered me to learn more about AI/ML.

In this article series, I will attempt to demystify the magic of AI. Each article will provide a brief on what I have learnt. Let’s begin our journey by understanding when and when not to use AI/ML.

Overview of AI, ML and Deep Learning

No alt text provided for this image

AI: Machine Learning and Deep Learning are the subsets of AI. The main goal of AI is to create models that have human-like intelligence to solve certain problems which cannot be solved by traditional software programming approach.

Machine Learning: Machine learning is a field of AI that is based on algorithms which can improve through experience. Machine Learning models are built using training data in order to make predictions or decisions.

Deep Learning: It is sub-field of Machine Learning. Deep learning uses multiple layers of neurons called ‘artificial neural network’ to train the model. In human brain, there is a large network of neurons, and this network is used to pass the information. Using this intuition artificial neural networks are designed. The main advantage of Deep learning is that we don’t have to do feature extraction, the model itself learns to extract the important features from the input data, which is not possible when model is created using a Machine Learning algorithm.

When not to use AI/ML?

The most important question that you should ask yourself when you are presented with a problem statement is “Can you solve this problem without AI/ML?”. If the answer is ‘yes’, then without thinking much go for software programming approach. The reason behind this is that machine learning models are trained using some sample dataset and when the models are presented with unseen data, their performance may degrade significantly as AI/ML models can never be 100% accurate due to their dependency on training data to learn the rules for prediction. It is not always possible to have all the training data available with you while training the model. Also, sometimes AI/ML models would require a lot of computing resources which would increase the design cost. If your input dataset is huge, model may also take a lot of time to train.

The traditional software applications are rule-based. We define certain rules that are followed by the application to produce the output. However, that is not the case for AI/ML models. There are no rules defined instead these models are used to create the rules based on the training data.

For example, consider you want to predict velocity of an object set in free fall at a certain height. You have made required observations at different height positions and prepared the training dataset. You can now choose to train a machine learning model and use it to predict the velocity at any point during the free fall or you can simply use the free fall formula to calculate the velocity. Both approaches work, but for most practical settings such problems are best solved with rule-based methods.

Thus, to solve any problem, where the rules are already known or possible to derive/define, you don’t need to use AI/ML models. You can easily create a software application based on these rules. It will save both time and cost.

When to prefer for AI/ML models?

AI/ML models come into picture when you are not able to solve problem using logic-based algorithms which are nothing but a set of rules that guide the application to produce the desired output.

Consider a simple example where you want to predict the price of a house. You have all the information with you that will affect the price of the house such as area of house in square feet, number of floors, number of rooms, garage size, overall quality of the house and age of the house.

These variables defining the house price are called features. ?Using these features, you want to build a software application that will predict house price. One way to do this is to write a linear equation with these features as variables, however as number of features increase the equation becomes more and more complex.

Consider H(x) = w0 + w1x1+w2x2+… where w0, w1, .. are the parameters and x1, x2,.. are the features. We have to find the values of w1, w2,.. that will decide the impact of these features on the output value. For example, consider x1?= area of house and x2 = age of the house. Now, the equation will be H(x) = w0 + w1x1 + w2x2.

We know that area is directly proportional to the price of the house and age of house is inversely proportional that is when area increases price increases and when age increase price decreases respectively. w1 should have positive value that is when x1 (area of house) increases w1x1 increases and w2 should have negative value that is when x2 (age of the house) increases w2x2 decreases. But how can we find the values of w1 and w2?

The simple solution to this problem is Machine Learning. You can use ML algorithms like multi-variable linear regression to train the model. The model itself will establish relationship among all the features based on input data provided and find the values of all the parameters that will help to correctly predict the output.

The important factor here is the training dataset. It should have sufficient features with correct values and it should be large enough so that ML model could generalize in order to produce the output.

As an example, I have implemented house price prediction model using sklearn linear regression. I have used this Kaggle dataset. You can refer to my notebook on github here.???????

References

  1. Machine Learning explained: MIT Sloan
  2. What is machine learning?
  3. Predicting house prices: Towards Data Science
  4. Predicting house prices using linear regression
  5. Single layer neural network vs. sklearn linear regression
  6. Zero to mastery: Machine Learning
  7. Discovering laws of physics with Machine Learning
  8. Free fall calculator

要查看或添加评论,请登录

Tejashri Gadre的更多文章

  • Logistic Regression

    Logistic Regression

    What is logistic regression/ Classification? Logistic regression is a type of statistical analysis also known as ‘logit…

  • Linear regression

    Linear regression

    Linear regression is a fundamental technique in statistics and machine learning. It is used for predicting continuous…

    1 条评论

社区洞察

其他会员也浏览了