Machine learning and deep learning are the backbone of artificial intelligence in the current era. Although researchers are still finding their way to Artificial General Intelligence (AGI), Artificial Weak/Narrow Intelligence has already gained a place in all major industries. Nearly 37 percent of organizations are using some form of Narrow AI in 2021. Artificial Intelligence has become more significant in the wake of the Internet of Things (IoT). There are mainly two areas where AI is highly applicable today. One of them is cloud platforms and services, where the server is loaded with a large volume of Big Data and redundant and detailed tasks have to be performed on it, which can be very tedious or error-prone for a human worker. Secondly, weak AI is possible in things (edge devices) where AI is implemented in a small space, performing specific cognitive tasks. Just as embedded systems occupy 98% of the electronics industry due to their task-specific applications, artificial intelligence is expected to follow the same trend. Most of the artificial intelligence will be applicable in edge devices that include IoT devices, smartphone apps, desktop apps, wearables, and industrial equipment.
All of the narrow AI available today are implementations of machine learning and deep learning. Machine learning is a subfield of artificial intelligence and deep learning is a subset of machine learning. While AI encompasses many different fields and technologies under development for Artificial General Intelligence, machine learning is focused on implementing one of the important human cognitive functions, which is learning. Deep learning is a subset of machine learning, where machine learning is implemented in the form of artificial neural networks (ANN) so that the machine can learn from the data itself rather than just identifying data patterns or correlations between data and results. In this article, we introduce the concept of machine learning and discuss how to get started using it.
The DATA-FIRST approach
The 21st century began with the dawn of an era of connectivity. The Internet, social media, e-commerce, e-commerce, IoT, IIoT and online business analytics have made data so important that data is the new oil and data science is the hottest job of the century . All companies and organizations have enormous data at their disposal, as everyone has at least one or more computing devices that are always connected to the Internet. This device can be a computer/laptop, smartphone, wearable or IoT device. Businesses and organizations need to quickly gain valuable insights from massive amounts of real-time data.
“So data is everywhere”
Secondly, an area of artificial intelligence is involved in replicating human senses. For example, human vision is reproduced in the form of computer vision. Speech is produced through natural language processing and natural language understanding. And not just the natural senses, machines need to deal with many other types of information such as business data, user data, user behavior, sensor data, navigation data, etc.
“So everything around is data”
Machine learning has evolved as a technology for making data-driven decisions, where machines themselves are required to learn from data and apply human reasoning independently. The goal is to allow machines to derive their programs for data processing based on ingesting and understanding incoming data. Unlike traditional computing theory, where computers are boring machines that implement user-defined programs, machine learning envisions computers and machines as natural receivers of data – using that data to make data-driven decisions on their own without any user-defined program or any human intervention. .
This way, machines could obtain valuable information and perform actions independently, making them autonomous creatures with human-like cognitive abilities. Infusing human-like intelligence into autonomous data processing will make it possible to make data-driven decisions at scale. With the reliance on user-defined programs and the involvement of human software, scalability in detailed and data-intensive tasks can never be achieved.
Machine Learning vs Computer Programming
Machine learning is an entirely different approach to the theory of computation itself. Traditional computers are digital circuits with a defined set of instructions and operations. Computers need to be programmed by a user to perform any useful computing task. A program is natively a sequence of instructions on received data. It is the program that decides the outcome of the data. Overall, the computer acts as a data processor in traditional computing.
Machine learning takes a very different approach. In machine learning, the computer is not a data processor. Instead, it is a data observer. The machine receives access to the data and its results and attempts to infer patterns inherent in the incoming data and all possible correlations between the data and its results. By deducing data patterns and the relationship between the data and its results, the machine designs a model with the help of a machine learning algorithm. The model is equivalent to a program that predicts new possible values of data or possible outcomes of incoming data based on experience from previous data observations. The machine learning algorithm is a user-defined software to derive the model and deduce the data processing program itself. With the help of a machine learning algorithm, the computer can process future data without any explicit programming and human intervention. Here, the computer itself becomes a data programmer.
Machine learning is often applied to mimic specific cognitive functions. These functions in the programming paradigm are known as Machine Learning Tasks. With a given task, a machine learning algorithm requires some historical data or real-time data to learn or train the model.
Data can be fed from a database, flat files, logs or real-time inputs/streams. Data can be labeled, that is, the attributes or properties of the data are already defined, or it can be unlabeled, that is, it is not predefined or tabulated with attributes or properties. Typically, the task depends on the nature of the data itself. If the data received is factual, the task must be related to identification, recognition, classification or feature extraction. A classic example of such data is the case of computer vision and natural language processing. A machine is trained to identify, recognize, classify or extract features from an image or video in computer vision.
If the incoming data is variable or dynamic, the task must be related to predicting future values, finding anomalies, or predicting the results of the data. For example, in algorithmic trading, a machine learning model predicts the future value of a stock, cryptocurrency, commodity, or exchange rate. Similarly, a machine is trained to identify words, phrases and their implications in natural language processing.
For machine learning, either data itself is sufficient or sometimes data and results are needed. It all depends on the task to be implemented by the machine learning algorithm. It is possible that the results are all unknown and need to be predicted by the model itself. For example, an algorithm to identify customer purchasing preferences may never know which items the customer will buy this time. However, you can predict a shopping list just based on the customer's past shopping transactions.
What is machine learning?
The idea of machine learning dates back to Alan Turing's Universal Turing Machine, conceptualized in 1935. Since then, there have been several feats and achievements in the field, and the definition of machine learning has also evolved over the years. A generally accepted definition for machine learning is given by Arthur Samuel:
“Machine learning is the field of study that gives computers the ability to learn without being explicitly programmed.”
Over the past two decades, machine learning has seen many practical implementations in the form of narrow AI. Therefore, a more specific definition of machine learning by Tom Mitchell is now widely accepted. It defines machine learning as follows.
“A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance on tasks in T, as measured by P, improves with experience E. ”
Machine learning is applied and implemented in a learning algorithm to train a machine learning model. As is clear from the definition itself –
1. The model is intended to perform some specific task T that requires human-like reasoning or analysis.
2. The model trains itself with experience E, where experience is gained from the incoming data to identify data patterns or correlate data and its results.
3. The model improves its P performance as its experience increases, as it can better predict data patterns and possible outcomes by studying the data and/or results.
Where machine learning is useful
Currently, machine learning is most useful in narrow AI applications. In these applications, machine learning is applied to specific tasks that require human cognitive skills. Machine learning is applicable in several scenarios where developing and maintaining user-defined programs for the same tasks may not be feasible or cost-effective. Firstly, machine learning is best suited for data-intensive tasks that involve a large scale of redundant, detail-oriented data processing. Humans cannot process data at the speed of computers, and computers cannot apply natural intelligence to processing data with traditional user-defined programs.
Second, machine learning is best suited for data and systems that change dynamically over time. Human users cannot monitor these systems and applications within acceptable time limits and require the computer to implement some intelligence about the data and its possible outcomes. For example, an Internet service provider can use machine learning to monitor and ensure network connectivity for its customers, rather than having every connection manually tested by a human worker.
Third, machine learning is valuable where human expertise or intervention is not available or possible. For example, a spacecraft sent to a different planet cannot depend on human intervention to navigate its path. Essentially, it needs to learn by observing its environment. Machine learning is also useful in areas where human expertise cannot immediately be applied to computational tasks or where computing explicitly requires domain-specific knowledge, such as computer vision, speech recognition, and automatic language translation.
Understanding Machine Learning Tasks
Machine learning algorithms are designed to train a model where the model must perform a specific cognitive task. Machine learning techniques fall into three broad categories as follows.
1. Supervised Machine Learning
2. Unsupervised Machine Learning
3. Reinforcement Machine Learning
In supervised learning, the machine is given labeled data where attributes or properties are explicitly defined for the data points. Some examples of machine learning tasks in supervised learning are as follows.
1. Classification: In this task, the machine requires classifying or categorizing data points based on attached attributes. It needs to identify common and different attributes and assign classes or categories to the available data points accordingly. For example, a machine learning model can be trained to classify vehicles at a toll booth or to classify items in a supermarket. Common machine learning algorithms applied for classification are logistic regression, K-nearest neighbors, decision tree, Naive Bayes, and support vector machine.
2. Regression: The task the machine requires to predict a numerical outcome for given labeled data points. For example, a machine learning model may need to predict the price of houses based on their area, location and architecture. Common machine learning algorithms applied for regression are multilinear regression, decision tree, and support vector machine.
In unsupervised learning, data is not labeled with attributes or properties. The machine itself needs to predict labels for the data points. Some examples of machine learning tasks in unsupervised learning are as follows.
1. Anomaly Detection: In this task, the machine must identify data patterns or unusual events based on the experience of some historical data. For example, a machine learning model can be applied to detect email spam, identify fraudulent transactions, or identify hacker attacks on a cybersecurity system. Common machine learning algorithms used for anomaly detection are Local Outlier Factor, K-Nearest Neighbors, Elliptic Envelope, Boxplot, DBSCAN, Isolation Forest, Support Vector Machines, and Z-score.
2. Structured Annotation: In this task, the machine adds structured metadata like annotations to the given data points to obtain extra information or relationships between data samples. For example, a machine learning model can be applied to add meta tags to parts of some images, indicating extracted features such as places, people, or objects in the images. Popular data annotation tools include Annotell, V7 Lab Darwin, Lighttag, Hasty, Dataloop AI, Hivemind, Deepen AI, and Datasaur AI.
3. Translation: In this task, a machine requires identifying the language of a given text and translating it into another language. Both supervised and unsupervised machine learning algorithms are used for natural language processing. Some of the standard supervised machine learning algorithms applied to NLP are Maximum Entropy, Bayesian Network, Conditional Random Field, Support Vector Machines, and Neural Networks. Recurrent Neural Networks are often used for language translation. Common unsupervised learning techniques used for NLP are Latent Semantic Indexing and Matrix Factorization.
4. Clustering: In this task, the machine needs to organize data samples into clusters/groups by observing their inherent latent patterns, similarities, dissimilarities and relationships. For example, a machine learning model may require grouping products by identifying their features and specifications. Some of the common machine learning algorithms applied for clustering include Spectral Clustering, K-Means, Affinity Propagation, DBSCAN, OPTICS, Mean Shift, BIRCH, Agglomerative Clustering and Mini-Batch K-Means.
5. Computer vision: In this task, a machine may require classifying images, performing segmentation, extracting and annotating features, and performing motion detection. Many machine learning algorithms are applied to different aspects of computer vision. Common machine learning algorithms used in computer vision are SURF, SIFT, Viola-Jones algorithm, Lucas-Kanade algorithm, Mean Shift, KNN, and Naive Bayes.
6. Transcriptions: In this task, a machine must segregate continuous unstructured data into discrete structured data. Some of the examples of transcription include optical character recognition, extracting text from images, and speech-to-text conversion engines.
In reinforcement learning, the machine relies on feedback from an agent to learn from data. In this type of machine learning, the machine continuously observes data and its results in the surrounding environment to predict future outcomes. Some of the popular reinforcement learning models include Markov Decision Process and Q-Learning.
Understanding the Machine Learning Experience
In machine learning, experience refers to ingestion data points or data samples. The model observes data samples to identify the pattern of incoming data or recognize the relationship between the data and its results. The model can consume the dataset all at once in the form of historical data or it can be real-time data acquired over some time. The model can consume data samples at any time. It is an iterative process that ideally never ends. Acquiring data samples by a machine learning model is called training the model. How the model learns from experience is a feature of the machine learning algorithm.
Understanding Machine Learning Performance
A model learns from experience to improve its performance on a given task. Performance can be measured using indicators such as accuracy, sensitivity, precision, specificity, recall, misclassification rate, error rate, F1 score, etc. The specific performance indicators applicable to a task depend on the machine learning algorithm applied. Performance indicators can be evaluated on training data sets or on recent data samples, called validation and testing.
Introduction to Machine Learning
Machine learning is the most advanced technology right now. It is often confusing for beginners how to start machine learning. It's easy to get started with machine learning with the following three steps.
1. Choose a programming language for machine learning: The first step to getting started with machine learning is choosing a programming language. The selection of programming language depends on the application for which machine learning is required. Common programming languages for implementing machine learning are Python, R, JavaScript, C/C++, Java, Scala, and Go.
Python is preferred in web development, data analysis, game development, and desktop application development. R is specifically useful for statistical analysis and scientific computing. Julia is another preferred programming language for applying machine learning to scientific computing. JavaScript is the preferred programming language for machine learning in front-end web development, game development, and mobile app development as it supports full-stack development. C/C++ is preferred for applying machine learning to embedded systems, system software, robotics, and cybersecurity. Java is used to apply machine learning to mobile applications, server-side applications, and back-end applications. Scala is preferable to Java where Big Data is involved. Go helps you apply machine learning to cloud platforms and services.
Python is the best programming language for beginners to start exploring machine learning.
2. Learn to use tools and packages of the chosen programming language: Each programming language has its tools and libraries for implementing machine learning algorithms. After selecting a programming language, you need to learn tools and libraries applicable to machine learning.
3. Explore machine learning algorithms: Once familiar with language-specific tools and packages, explore different machine learning algorithms to train models for real-life applications.
Conclusion
Machine learning is fascinating. It can be implemented in several programming languages, where a programming language may be preferred depending on the intended application. However, there is no better programming language to apply machine learning. Python is the preferred language for getting started with machine learning. It can be easily used on any desktop computer or even single board computers. To apply machine learning to microcontroller applications, C/C++ should be preferred with tools like TinyML.