Animikh Aich is a Deep Learning enthusiast, currently working as a Computer Vision Engineer. His work includes three International Conference publications and several projects based on Computer Vision and Machine Learning.
Read it in 20 Mins
Is by Doing
The advancements in Science and Technology are making every step of our daily life more comfortable. Today, the use of Machine learning systems, which is an integral part of Artificial Intelligence, has spiked and is seen playing a remarkable role in every user’s life.
For instance, the widely popular, Virtual Personal Assistant being used for playing a music track or setting an alarm, face detection or voice recognition applications are awesome examples of the machine learning systems that we see every day. Here is an article on linear discriminant analysis for better understanding.
Machine learning, a subset of artificial intelligence, is the ability of a system to learn or predict the user’s needs and perform an expected task without human intervention. The inputs for the desired predictions are taken from user’s previously performed tasks or from relative examples. These are an example of practical machine learning with Python that makes prediction better.
Wonder why one should choose Machine Learning? Simply put, machine learning makes complex tasks much easier. It makes the impossible possible!
The following scenarios explain why we should opt for machine learning:
To state simply, machine learning is all about predictions – a machine learning, thinking and predicting what’s next. Here comes the question – what will a machine learn, how will a machine analyze, what will it predict.
You have to understand two terms clearly before trying to get answers to these questions:
Data is what that is fed to the machine. For example, if you are trying to design a machine that can predict the weather over the next few days, then you should input the past ‘data’ that comprise maximum and minimum air temperatures, the speed of the wind, amount of rainfall, etc. All these come under ‘data’ that your machine will learn, and then analyse later.
If we observe carefully, there will always be some pattern or the other in the input data we have. For example, the maximum and minimum ranges of temperatures may fall in the same bracket; or speeds of the wind may be slightly similar for a given season, etc. But, machine learning helps analyse such patterns very deeply. And then it predicts the outcomes of the problem we have designed it for.
While data is the ‘food’ to the machine, an algorithm is like its digestive system. An algorithm works on the data. It crushes it; analyses it; permutates it; finds the gaps and fills in the blanks.
Algorithms are the methods used by machines to work on the data input to them. Learners must check if these concepts are being covered in the best data science courses they are enrolled in.
Depending on the functionality expected from the machine, algorithms range from very basic to highly complex. You should be wise in making a selection of an algorithm that suits your ML needs. Careful consideration and testing are needed before finalizing an algorithm for a purpose.
For example, linear regression works well for simple ML functions such as speech analysis. In case, accuracy is your first choice, then slightly higher level functionalities such as Neural networks will do.
This concept is called ‘The Explainability- Accuracy Tradeoff’. The following diagram explains this better:
Besides, with regards to commonly used machine learning algorithms, you need to remember the following aspects very clearly:No algorithm is an all-in-one solution to any type of problem; an algorithm that fits a scenario is not destined to fit in another one.
As we learnt, an algorithm churns the given data and finds a pattern among them. Thus, all machine learning algorithms, especially the ones used for supervised learning, follow one similar principle:
If the input variables or the data is X and you expect the machine to give a prediction or output Y, the machine will work on as per learning a target function ‘f’, whose pattern is not known to us.
Thus, Y= f(X) fits well for every supervised machine learning algorithm. This is otherwise also called Predictive Modeling or Predictive Analysis, which ultimately provides us with the best ever prediction possible with utmost accuracy.
Diving further into machine learning, we will first discuss the types of algorithms it has. Machine learning algorithms can be classified as:
A brief description of the types of algorithms is given below:
In this method, to get the output for a new set of user’s input, a model is trained to predict the results by using an old set of inputs and its relative known set of outputs. In other words, the system uses the examples used in the past.
A data scientist trains the system on identifying the features and variables it should analyze. After training, these models compare the new results to the old ones and update their data accordingly to improve the prediction pattern.
An example: If there is a basket full of fruits, based on the earlier specifications like color, shape and size given to the system, the model will be able to classify the fruits.
There are 2 techniques in supervised machine learning and a technique to develop a model is chosen based on the type of data it has to work on.
Supervised algorithms use either of the following techniques to develop a model based on the type of data.
In summary, the regression technique is to be used when predictable data is in quantity and Classification technique is to be used when predictable data is about predicting a label.
Some of the machine learning algorithms which use supervised learning method are:
We shall discuss some of these algorithms in detail as we move ahead in this post.
This method does not involve training the model based on old data, I.e. there is no “teacher” or “supervisor” to provide the model with previous examples.
The system is not trained by providing any set of inputs and relative outputs. Instead, the model itself will learn and predict the output based on its own observations.
For example, consider a basket of fruits which are not labeled/given any specifications this time. The model will only learn and organize them by comparing Color, Size and shape.
We are discussing these techniques used in unsupervised learning as under:
Neural networks are into a wide range of applications such as coastal engineering, hydrology and medicine where they are being used in identifying certain types of cancers.
Some of the most common algorithms in unsupervised learning are:
We shall discuss some of these algorithms in detail as we move ahead in this post.
In case of semi-supervised algorithms, as the name goes, it is a mix of both supervised and unsupervised algorithms. Here both labelled and unlabelled examples exist, and in many scenarios of semi-supervised learning, the count of unlabelled examples is more than that of labelled ones.
Classification and regression form typical examples for semi-supervised algorithms.
The algorithms under semi-supervised learning are mostly extensions of other methods, and the machines that are trained in the semi-supervised method make assumptions when dealing with unlabelled data.
Google Photos are the best example of this model of learning. You must have observed that at first, you define the user name in the picture and teach the features of the user by choosing a few photos. Then the algorithm sorts the rest of the pictures accordingly and asks you in case it gets any doubts during classification.
Comparing with the previous supervised and unsupervised types of learning models, we can make the following inferences for semi-supervised learning:
In this type of learning, the machine learns from the feedback it has received. It constantly learns and upgrades its existing skills by taking the feedback from the environment it is in.
Markov’s Decision process is the best example of reinforcement learning.
In this mode of learning, the machine learns iteratively the correct output. Based on the reward obtained from each iteration,the machine knows what is right and what is wrong. This iteration keeps going till the full range of probable outputs are covered.
The steps involved in reinforcement learning are as shown below:
In this section, let us discuss the following most widely used machine learning algorithms in detail:
When implementing algorithms in real time, you need to keep in mind three main aspects: Space, Time, and Output.
Besides, you should clearly understand the aim of your algorithm:
The following table will show you certain real-time scenarios and help you to understand which algorithm is best suited to each scenario:
|Real time scenario||Best suited algorithm||Why this algorithm is the best fit?|
|Simple straightforward data set with no complex computations||Linear Regression|
|Classifying already labeled data into sub-labels||Logistic Regression|
|Sorting unlabelled data into groups||K-Means clustering algorithm|
|Supervised text classification (analyzing reviews, comments, etc.)||Naive Bayes|
|Linear Support Vector Machine algorithm|
|Image classification||Convolutional neural network|
|Stock market predictions||Recurrent neural network|
Till now you have learned in detail about various algorithms of machine learning, their features, selection and application in real time.
When implementing the algorithm in real time, you can do it in any programming language that works well for machine learning.
All that you need to do is use the standard libraries of the programming language that you have chosen and work on them, or program everything from scratch.
Need more help? You can check these links for more clarity on coding machine learning algorithms in various programming languages.
How To Get Started With Machine Learning Algorithms in R
How to Run Your First Classifier in Weka
Machine Learning Algorithm Recipes in scikit-learn
Machine learning is slowly making strides into as many fields in our daily life as possible. Some businesses are making it strict to have transparent algorithms that do not affect their business privacy or data security. They are even framing regulations and performing audit trails to check if there is any discrepancy in the above-said data policies.
The point to note here is that a machine working on machine learning principles and algorithms give output after processing the data through many nonlinear computations. If one needs to understand how a machine predicts, perhaps it can be possible only through another machine learning algorithm!
Currently, the role of Machine learning and Artificial Intelligence in human life is intertwined. With the advent of evolving technologies, AI and ML have marked their existence in all possible aspects.
Machine learning finds a plethora of applications in several domains of our day to day life. An exhaustive list of fields where machine learning is currently in use now is shown in the diagram here. An explanation for the same follows further below:
Machine learning is already making a difference in the way businesses are offering their services to us, the customers. Voice-based search and preferences based ads are just basic functionalities of how machine learning is changing the face of businesses.
ML has already made an inseparable mark in our lives. With more advancement in various fields, ML will be an integral part of all AI systems. ML algorithms are going to be made continuously learning with the day-to-day updating information.
With the rapid rate at which ongoing research is happening in this field, there will be more powerful machine learning algorithms to make the way we live even more sophisticated!
From 2013- 2017, the patents in the field of machine learning has recorded a growth of 34%, according to IFI Claims Patent Services (Patent Analytics). Also, 60% of the companies in the world are using machine learning for various purposes.
A peek into the future trends and growth of machine learning through the reports of Predictive Analytics and Machine Learning (PAML) market shows a 21% CAGR by 2021.
Ultimately, machine learning should be designed as an aid that would support mankind. The notion that automation and machine learning are threats to jobs and human workforce is pretty prevalent. It should always be remembered that machine learning is just a technology that has evolved to ease the life of humans by reducing the needed manpower and to offer increased efficiency at lower costs that too in a shorter time span. The onus of using machine learning in a responsible manner lies in the hands of those who work on/with it.
However, stay tuned to an era of artificial intelligence and machine learning that makes the impossible possible and makes you witness the unseen! Want to execute what you have learned in this blog, enroll in KnowledgeHut practical machine learning with Python and work with data science projects that deal with complex machine learning algorithms.
AI is likely to be the best thing or the worst thing to happen to humanity. – Stephen Hawking