Machine Learning - a basic introduction with step by step implementation
Machine Learning - a basic introduction with step by step implementation
Hi Guys, in this article, the rudiments in understanding the Machine Learning and the steps to implement it, has been discussed.
I hope this would give you a better understanding of Machine Learning concepts.
Let's get started, and begin with the very basic question,
What is Machine Learning?
In Machine Learning, data is gathered to train a machine learning model, so it can understand patterns within the data. Once the model has been trained, it can be used it to predict the results of out-of-sample data, or data in which the results are unknown. collectively, this is how machine learning is achieved.
One of the most important concepts to know in ML is being able to distinguish Supervised and Unsupervised Learning. In Supervised Learning, we have a set of training data, or labelled data, in which we know the structure and outcome of it. We take this data and train a machine learning model, so it can understand patterns in the data. Once the model has been trained, we can use it to predict the results of out-of-sample data.
Supervised Learning ML algorithms: Linear Regression, Logistic Regression, Decision trees, Random Forest, K-Nearest Neighbours and so on.
Conversely, if we are given a set of data that is unstructured or unlabelled, then we can apply unsupervised machine learning models to find patterns that exist within that data.
Unsupervised Learning ML algorithms: K-Means clustering, Hierarchical clustering, DBSCAN, etc.
Steps to implement Machine Learning:
Data Collection - The very first step in ML as well as Data Science is Data Collection. The data relevant to the problem has to be captured. The more the data you capture, the more is the accuracy.
Data Pre-processing - Data Munging, Data Wrangling and Data Cleaning are the other terms which refers to Data Pre-Processing. The collected data has to be processed or cleaned in such a way that there is not any discrepancy in the dataset. The basic Pre-Processing techniques includes the treatment of missing value, conversion of cases, removal of punctuation and etc. The pre-processing techniques may include different types of techniques for different types of analysis. The conversion of raw dataset from the client, into an error-less dataset is being the goal of this step.
Exploratory Data Analysis - This is the phase where a series of rigorous actions will be applied to have a better understanding of the data. As the name itself suggests, this is a process of analysing through exploring the dataset to have a better understanding of the data. The crux of the dataset is explored and mapped towards the requirements in this step. In general, the process of narrowing down from the broader perspective begins from this phase. The essence of this phase might include the exploration of distribution of the dataset, correlation analysis and finalising the key predictor variables for the model.
Model Selection - A Machine Learning Algorithm which perfectly fits the requirements is selected in this phase. The selected algorithm is trained with the training dataset to generate the model. Machine Learning algorithms can be classified as Regression and Classification algorithms. A regression algorithm deals with the continuous value while a classification algorithm deals with the categorical value. In my future articles, I will explain those algorithms in detail since discussing about it will be beyond the scope of this article.
Model Evaluation - The model generated using the training dataset in the Model Selection phase, is evaluated by using the test dataset in this phase. Evaluation allows us to test our model against data that has never been used for training.
Prediction - This is the final phase where the trained Machine Learning model will be used to get the predictions from the Out-of-Sample dataset.
Note: Machine Learning is an iterative process, and it also gives us a privilege to tweak the above discussed steps and re-implement it from the beginning. This characteristic enables us to add a new predictor variable to the generated model based upon the future data and helps in improving the accuracy of the model.
Let us go through an example.
The example I've selected to make the understanding of Machine Learning easier is the "Fingerprint Scanner" in Smartphones.
Many of us might have used or have been using the smartphones with Fingerprint Scanners. It is no wonder to say that a fingerprint scanner is also an application of machine learning. Like how we train our machine learning model, we train our smartphone with our fingerprint continuously until the smartphone learns it. Once the process of training is over, the smartphone is capable enough to distinguish the trained fingerprint with the untrained one.
The same is the case for Facial Recognition system. Here instead of fingerprint our image is captured and trained.
Hope, this article might have given you a better understanding about the concept of Machine Learning. In my future article, I'll discuss different Machine Learning algorithms.
I'll always welcome and value your suggestions. So, please feel free to reach out to me. I'm reachable through the following links.
Email - kgfahath@gmail.com
LinkedIn - www.linkedin.com/in/fahath-kg
Twitter - https://twitter.com/kgfahath
Facebook - https://www.facebook.com/people/Fahath-KG/100010754347966