Machine Learning-Enabled Internet of Things (IoT): Data, Applications, and Industry Perspective

: Machine learning (ML) allows the Internet of Things (IoT) to gain hidden insights from the treasure trove of sensed data and be truly ubiquitous without explicitly looking for knowledge and data patterns. Without ML, IoT cannot withstand the future requirements of businesses, governments, and individual users. The primary goal of IoT is to perceive what is happening in our surroundings and allow automation of decision-making through intelligent methods, which will mimic the decisions made by humans. In this paper, we classify and discuss the literature on ML-enabled IoT from three perspectives: data, application, and industry. We elaborate with dozens of cutting-edge methods and applications through a review of around 300 published sources on how ML and IoT work together to play a crucial role in making our environments smarter. We also discuss emerging IoT trends, including the Internet of Behavior (IoB), pandemic management, connected autonomous vehicles, edge and fog computing, and lightweight deep learning. Further, we classify challenges to IoT in four classes: technological, individual, business, and society. This paper will help exploit IoT opportunities and challenges to make our societies more prosperous and sustainable.


Introduction
The Internet of Things (IoT) is set to become one of the key technological developments of our times, provided we can realize its full potential.IoT is "a global infrastructure is enabled using advanced services by interconnecting (physical and virtual) things based on existing and evolving interoperable information and communication technologies."IoT was named by the US National Intelligence Council (NIC) in a 2008 report among the six vital civil technologies that could potentially affect US power.IoT is an enabler of ubiquitous computing envisioned by Mark Weiser.IoT is no longer a technological buzzword as described in [1], but a reality that links the physical world to the digital world, revolutionizing how we look towards our surroundings.Currently, IoT is partially implemented in bits and pieces due to a lack of availability of technology and other constraints on the global scenario.number of objects connected to the IoT is expected to reach 25-30 billion by 2030 due to the massive influx of various IoT devices proliferating [2,3].
The primary purpose of these increasing numbers and types of IoT objects is to produce valuable data about the entities present in the operating environment to make smart decisions.This is achieved by providing access to the environment from which we need information and analyzing past, present, and future data.These data allow optimal decisions about us and our environments, possibly in real time.This massive, diverse growth in the overall IoT landscape will produce $1-1.5 trillion in revenue annually.The IoT landscape is illustrated in Figure 1.Although Europe is at the forefront in the early adoption of IoT, South Korea tops the global ranking of connected things, whereas the USA is far behind in this respect [4].Figure 1 also depicts application areas of IoT: smart homes, warning systems, smart shopping, smart gadgets, smart cities, intelligent roads, health care, fire systems, threat-identification systems, tracking, and surveillance.

Data Production
One of the significant functions of IoT is to provide technological infrastructure to sense different activities and events happening in our surroundings.IoT is expected to produce an enormous amount of data.These data would be created by various vendors, giving rise to data as a service.For powering smart cities and societies to their full potential, sharing and collaborating data and information will be the key to providing them with sustainable and ubiquitous applications and services.The fusion of various types and forms of data to enhance data quality and decision-making will be of prime importance in ubiquitous environments.Data fusion is "the theory, techniques, and tools used to combine sensors' data, or data derived from sensory data, into a common representational format."A timely fusion and analysis of big data (volume, velocity, variety, and veracity) acquired from IoT's sensor networks enables accurate and reliable decision-making.However, managing ubiquitous environments would be a grand challenge for IoT.Also, various sensors and intelligent algorithms would play a critical role in addressing the above challenge.

Machine Learning and IoT
IoT's objectives are to understand what people want and how people think, predict wanted and unwanted events, and learn to manage certain situations.For all of this, IoT needs to understand the data produced by millions of objects.This understanding can be gained by using machine-learning algorithms (MLAs).Machine learning (ML) in the IoT paradigm can play a significant role that is imperative.IoT is ubiquitous by nature, which means to be available anywhere is one of its primary goals [5].ML will play a significant role in this by digging out the data produced by thousands and millions of connected devices.ML will add usefulness to IoT devices, and IoT can only be genuinely ubiquitous [6].Embedded intelligence (EI) will be at the core to enable IoT to play a significant role in achieving its objectives.EI is the fusion of product and intelligence to achieve better automation, efficiency, productivity, and connectivity [7,8].Whether a physical or virtual world, intelligence is acquired by learning.
The tendency of ML to find patterns may be the underpinning for human-like intelligence.Further generalization of these patterns into more valuable insights and trends provides an improved understanding of the world around us.The actual objective of ML in IoT is to bring complete automation by enhancing learning that facilitates intelligence through smarter objects [9].ML gives IoT-enabled systems the potential to mimic humanlike decisions after training from the data and further improve their understanding of our surroundings.The influence of information visualization on the human visual system is enormous, making systems better understand data and insights [10].Information visualization brings several advantages to its users, like (1) better knowledge without much further analysis of data and (2) using cognitive skills, and humans can better understand data.IoT will replace several systems currently used, which are costly to implement and maintain, with cheap sensor-based ML systems.For example, around 20,000 people lost their lives in developing countries due to severe weather conditions.Mostly, weather monitoring is done by radar-based weather-monitoring systems (WMSs).However, radar WMSs are costly and unavailable in several parts of the world.An ML-enabled IoT system consisting of a cheap sensor network that studies lighting and cloud patterns to predict the weather is successfully deployed in economically backward countries like Guinea and Haiti [11].
IoT will not only impact how we see technology but also how technology can bring progress and make our world more prosperous [12,13].Every day, various aspects of our lives are becoming easier and more connected through the IoT.ML brings intelligence and pervasiveness to IoT.IoT can be an appropriate synonym for the word "heterogeneous," as it consists of various devices, network technologies, protocols, data types, applications, and users.This heterogeneous nature of IoT brings several challenges to ML, which are:

•
IoT will produce big data [14][15][16], but are all the data valid, do the data have biases, and is it worthwhile to process all of it?These are some critical questions shaping the reliability, accuracy, and efficiency of MLAs for the IoT domain.

•
Not all IoT applications have ample data from which MLAs will learn quickly, but a lot of small data are also produced for this new form of algorithms needed to learn from scarce data [17,18].

•
Sensing devices are not always accurate and reliable [19][20][21][22][23][24].Outlier detection and data imputation are some of the necessary tasks needed to be performed on data before ML begins.

•
The application area of IoT is enormous, as mentioned in Figure 1.Every application has data with particular properties.

•
At Google's Zeitgeist 2011 event, Google's chief scientist Peter Norvig famously said, "We don't have better algorithms than anyone else; we just have more data."However, few researchers support the opposite.Which is better?A highly sophisticated MLA [25], with more data [26][27][28] or limited but high-quality data [29,30]?This question still has no answer and is one of the significant conflict areas among ML researchers, as opinions vary.
• Game-changer technologies such as IoT hold ample opportunities for businesses, but also pose a high risk, and ML-enabled IoT could end up swallowing millions of jobs [31,32].
Machine learning (ML) gives a brain to IoT-enabled systems to grasp the insight from data produced by millions of IoT objects.In IoT, we see several MLAs learning from diverse data, which makes ML completely different from IoT, as on the one hand, we will still have traditional MLAs; on the other, we need a completely different set of MLAs.We will have different classes of MLAs, and some will work based on simple, intuitive insights instead of complex mathematical proofs [33].
Eric Brill and Michele Banko in early 2001 [34] published an interesting paper that showed that more training data results in improved learning, rather than enhancing and designing new MLAs.Big data will never be a problem in IoT.Billions of connected IoT objects via the internet will produce massive data [35].As a result, IoT-based ML consists of algorithms that will learn from the colossal amount of data.The IoT domain ( 1) is partially valid, as IoT is not all about big data, but also about small data [17,18].Small data sets contain minimal attributes.Small data can be used to describe the current state, trigger events, and be produced by the aggregation of big data.
Governments, industries, and individuals have a broad spectrum of IoT-enabled applications that take leverage from ML. Shanthamallu et al. [36] discussed MLAs and their application areas in IoT.At the same time, Sharma and Nandal focused on "machine learning as a service" (MLaaS), which is the fusion of ML and IoT infrastructure [37].MLAs can perform various tasks in IoT, as illustrated in Figure 2. Broadly, ML tasks can be seen from IoT perspectives: (1) data quality and (2) pattern recognition.MLAs not only predict from a treasure trove of data but also can be used to enhance data quality, ultimately resulting in better learning.For example, MLAs are used to identify outliers and impute data before training MLAs for prediction.In the proceeding sections, we are going to discuss these in detail.

Contributions
Most R&D endeavors on IoT have focused primarily on object and resource management, object identification, access control, network, and connecting technologies.Instead of focusing on major IoT R&D trends mentioned above, in this paper, we attempt to enhance our understanding of how ML plays a critical role in shaping the IoT landscape.This survey will work as an underpinning for IoT-based ML researchers.In Table 1, we have given five major ML-enabled IoT surveys and their objectives.Our intention is not to represent a comprehensive review of the literature.Still, this paper attempts to achieve the more significant aim of enhancing ML's understanding, usefulness, and significance for the IoT domain.The main contributions of this work are fourfold:

•
Firstly, we classify IoT-related research and development work into three major perspectives (classes): data, application, and industry.

•
Secondly, the paper gives insight into the current state-of-art research and developments in IoT with a specific focus on ML-related developments.

•
Thirdly, the paper identifies emerging IoT trends that will use the machine at its core to develop futuristic and sustainable solutions.

•
Lastly, the paper helps the readers to identify future opportunities in IoT-based ML research.

Paper Structure
The paper is divided into seven sections.As depicted in Figure 3, in Section 2, we discuss IoT from a data perspective.In Section 3, we critically analyze the role of ML from an application perspective, whereas in Section 4, we discuss IoT's industry perspective.Further, in Section 5, we discuss five emerging trends where the fusion of IoT with ML will play a critical role.In Section 6, we classify challenges to IoT's success in four classes: technological, individual, business, and society.Finally, we conclude in Section 7.

Data Perspective
Data add value to the IoT paradigm and are collected by using a variety of sensors, as given in Table 2. IoT has both cheap and expensive sensors in its arsenal.For example, the temperature detection sensor is cheaper than lidar, which is too costly.The type of sensor used largely depends on the type of application of that data.Wild animal tracking sensors will have lifelong battery life, as replacing batteries in wild animal tracking applications is hard, whereas sensors like lidar, cameras, and radar continuously need a power supply to function.Also, low-cost sensor data have such issues as outliers and missing values as their hardware quality is limited.On the other hand, vision sensors bring many features, and selecting only the best feature is challenging.In the proceeding subsections, we discuss IoT data sources, data storage platforms, and the three types of data challenges with a specific focus on machine learning.
One of the major applications of IoT is sensing our surroundings and communicating that data to the smart application, which will be used to predict and forecast using machine learning algorithms.Further, the learning outcome is used to develop AI for making decisions.Later, the decision is transformed into mechanical output using actuators [38].Today, billions of devices with sensors surround our daily life.IoT produces and will produce an enormous amount of data that needs to be stored, processed, and archived for future needs.IoT infrastructures are not yet totally implemented, even in developed economies.Developing economies like India, Malaysia, etc., are slowly working on megasmart-city projects that will use IoT infrastructure.An exciting work has been done by Morais et al. [42] where they classify IoT data types into 19 common categories that are in use.Also, they classify IoT sensor types too.We depicted in Table 2 the possible kinds of sensors used in IoT, applications, and data challenges particular sensors bring.The COVID-19 pandemic expedited the demand for IoT solutions.

Data Storage
IoT means an enormous amount of real-time data.For example, autonomous vehicles alone can contribute to colossal amounts of data.For example, Wang et al. proposed HydraSpace [43] multilayered storage architecture for storing autonomous vehicles' data.The cloud may be more flexible, scalable, and ubiquitous.However, it is not possible to have real-time data analytics from data stored on clouds.This makes edge-and fog-based IoT data storage critical [44].ML and AI available on edge devices can give real-time insights from the sensed data.Later on, aggregated data can be stored in the cloud.The transfer of data on edge first will create a more realistic and valuable IoT landscape.Some popular and widely used IoT-based cloud storage services are AWS S3 (Amazon Web Services, Seattle, WA, USA), IBM Watson IoT Platform (IBM, Armonk, NY, USA), Oracle IoT Cloud Service (Oracle, Austin, TX, USA), and Microsoft Azure (Microsoft, Redmond, WA, USA) [45,46].

Data Issues
Our increasingly connected world through IoT is a delicate blend of low-cost sensors and distributed intelligence that will have a transformative impact on how we see the world.This merger will produce more data than ever that hold valuable information.Sensing data has critical quality issues, as sensing devices are not 100% reliable and accurate.Preprocessing of IoT data is required before feeding it to MLAs to gain critical insights.As depicted in Figure 4, three significant issues with sensed data, outliers, missing values, and feature selection are discussed in the proceeding sections.

Outlier Detection
Outliers, also known as anomalies are the data patterns that differ from the rest of the data and signify abnormal data behavior [47][48][49].Outlier data observations are everyday in highly dense sensor environments like IoT, due to: (1) low-cost sensors which mean low quality, (2) weather conditions, (3) electronic inferences, and (4) data communication errors [50][51][52].Outliers must be detected rather than deleted or replaced by predicted values, which is crucial to maintaining high data quality from which MLAs ultimately dig out the key insights.Modern-day MLAs are not only used for gaining valuable knowledge but also for improving data quality by detecting data aberrations [53].Significant attention has been given to outlier problems in wireless sensor networks (WSNs) [54][55][56][57][58], which can also be seen as a subset of IoT.
Several critical surveys exist that primarily focus on addressing the problem of outliers in the IoT landscape.Alghanmi et al. [59] did a general-purpose comprehensive study on ML-powered anomaly detection and discussed available IoT datasets used for this purpose.On the other hand Cook et al. [60] examined how to detect outliers in IoT-based times series data.In contrast, Diro et al. [61] saw outliers' detection as a way to make IoT networks more secure.Further, a more recent survey by Samara et al. [62] focused on statistics-based, clustering-based, nearest neighbor-based, classification-based, artificial intelligent-based, spectral decomposition-based, and hybrid-based for outlier detection.Commonly used outlier detection (OD) approaches are based on statistics, distance matrix supervised, and unsupervised ML.One such MLA is SVM, which has an explicit mechanism to handle outliers robustly [57,63].Resource overhead is one major issue with SVM-based OD.An unsupervised centered quarter-sphere SVM with low computational complexity and memory usage for online OD is proposed in [64] which outperforms previous offline OD methods based on SVM [65].
In unsupervised learning, k-means are a simple yet popular choice along with hierarchical clustering for OD, as critically analyzed by Garcia-Font et al. [58].Similarly, Münz et al. [66] focused on k-means clustering for OD in traffic data.One major drawback with k-means is that it computes a set of k centers to reduce the sum of squared distance.Multiple works [67,68] show that there are two issues related to it: (1) outliers can pull these centers, and (2) rather than rejecting outliers, it can be possible for outliers to form their cluster.As a solution for this, a robust version of k-means is proposed by Statman et al. [69] known as k-means+++.Another classifier quite popular for OD problems is naïve Bayes because of its ease of use and simplicity [70,71].Parto et al. [72] evaluated classical Bayesian techniques with slight modification for OD in streaming IoT platforms in the manufacturing industry.Further, similar to [66], Lam et al. [73] addressed the OD issue in traffic data using a fusion of naïve Bayes and Gaussian mixture-model techniques.
C4.5 and its successor C5.0 MLAs are highly accurate and efficient modern-day classifiers that outperform the best in the business classifiers, as analyzed in [74].However, little attention has been given to C4.5 and C5.0 for OD, particularly in the IoT environment, as they have high precision, minimum memory usage, and fast processing.Today in every field, we are witnessing the increasing use of deep-learning algorithms due to their ability to provide highly accurate predictions and forecasting output.These algorithms can understand highly complex datasets, which gives them an edge over others.Luo et al. proposed a distributed outlier detection method for sensor networks that uses deep autoencoders [75].The technique can produce a high detection rate with minimum communication overhead, which is necessary for IoT-based sensor networks.Similarly, Diro and Chilamkurti [76] used deep learning for cybersecurity purposes.Their work shows that the deep model is more capable of detecting anomalies than shallow learning.
In IoT, MLAs for OD can be divided into three classes.First-class algorithms execute offline and online.The second class of IoT algorithms will come from where intelligence and data lie.Finally, the third class of OD algorithms is based on the accuracy requirement of IoT applications.A detailed illustration is given in Figure 5.

Data Imputation
The IoT ecosystem relies heavily on hardware like sensors and RFIDs for sensing data.Sensors are not reliable, an established fact [50,51,77].One of these outcomes is missing values produced in IoT-based applications.The missing-values problem arises due to various reasons like synchronization problems, unstable wireless communications, sensor failure, power loss, and weather conditions [78].Two techniques used to handle missing values in IoT data are (1) deleting the missing data instances and (2) replacing the missing value with predicted data, a process known as data imputation [79].Much attention has been given to developing data imputation algorithms in several areas, such as natural sciences, census surveys, WSN, robotics, and scientific applications.
ML algorithms are widely used to impute the missing values.A lazy learner knows, as the KNN algorithm is a nonparametric method.It is straightforward to implement and simple to understand MLA.KNN is one of the top MLAs [80], and data imputation algorithms based on KNN are widely used [81][82][83][84].More complex and computationally extensive supervised learning algorithms than KNN, such as SVM, are also widely used for data imputation and handle both linear and nonlinear data efficiently [80,85].In various papers, SVM is used multiple ways to deal with missing values [86][87][88][89].However, SVM may not be too accurate with more than two class problems.A slightly younger supervised MLA than SVM, known as random forest (RF), based on ensemble learning, was introduced by Leo Breiman and Adele Cutler [90].RF-based DI is widely used in practice.Such methods based on RF MLA are presented in [91,92] that use proximity from RF to impute missing data values.
A more advanced, memory-efficient, and fast MLA, C4.5 is considered one the best MLAs [80], and Jerzy et al. [93] concluded that C4.5 is one of the handiest algorithms for dealing with missing data.C4.5 uses an internal data imputation mechanism based on a probabilistic approach [94].A few works also indicate that rather than using the C4.5 internal data imputation mechanism, KNN-based DI for C4.5 results in improved prediction accuracy [94,95], not just supervised machine learning, and the DI problem is unfolded from an unsupervised machine learning perspective.Several novels and hybrid data imputation algorithms are proposed, such as K-means [96][97][98][99][100][101], fuzzy c-means with support vector regression [102], fuzzy clustering [103], feature selection, and cluster analysis [104], and multiple imputation using gray-system theory and entropy based on clustering (MIGEC) [105].Another interesting algorithm is based on ANNs, which mimic the neural system of the human brain.ANNs are incredibly efficient in data imputation.Various novel and hybrid ANNs for data imputation are proposed, such as fuzzy min-max neural networks [106], particle swarm optimization (PSO), evolving clustering method (ECM), and auto associative extreme learning machine (AAELM) [107], ANNs and casebased reasoning (CBR) [108], general regression and auto associative ANN [109], and ANN-based emergent self-organizing maps [110].Except for C4.5 s MLA, dealing with missing values can be expensive in terms of storage and/or prediction-time computation [111].The fundamentals for imputing missing values will remain the same in IoT as in other domains.However, we envisage that data imputation will move more towards real-time processing of missing values in context with IoT's future scope, particularly for IoT applications.
Guo et al. concluded in [7,8] that IoT will ultimately EI-enable IoT, which will serve this goal.The FS method will also be helpful in terms of data reduction, apart from its other advantages [112][113][114][115][116]. For example, EI-enabled smartphones and home appliances will not have much processing power, storage needs are limited, and data are relevant only to predict an event.Most of the ongoing research on FS is based on offline FSA methods that can be suitable for most applications in domains like natural sciences and geography.However, for IoT, online FSAs are required for most of its applications.As in the IoT ecosystem, scenarios will change quickly, and most of the decision-making will be based on streaming data.
ML will significantly address the above data issues related to outliers, missing values, and feature selection.Most IoT sensors will be low-cost hardware that tends to have a temporary malfunction.In the proceeding section, we discuss IoT applications that will use the processed data produced by sensors.

Applications Perspective
IoT has evolved beyond what Atzori et al. [1], defined it.Today, it is seen as a discovery that has the potential to change the world in the same way as electricity did to humankind.Xu et al. systematically provide a concise view of current IoT application areas, R&D trends, and challenges for IoT in industries to provide an understanding of IoT developments in industries.Data for IoT are as important as electrons are for electricity.In this section, we examine ML developments in IoT and classify IoT applications according to [149,150].
According to a United Nations report, more than half the world's population lives in cities, due to better jobs, education, health care, and living conditions [151], putting extraordinary pressure on municipalities, urban development departments, and governments to provide sufficient resources.Due to this fact, the "smart city" concept has recently drawn significant attention from governments worldwide, especially in developed [152,153] and developing economies [154,155].Smart cities are now an essential part of urban development planning.There exists no formal definition of a smart city.However, it can be defined as the product of accelerated development and advanced information technology, which aims to improve citizens' socioeconomic conditions and enhance the overall quality of living.
IoT is about connecting physical devices using the internet to facilitate the smooth exchange of information.The smart city dream would not be possible without the technical support of IoT, which is inevitable to achieve smart city aims-Zanella et al. termed it "urban IoT" [156].In the background of urban IoT, an immense amount of data are produced by "things."Gaining key insights from these data is a critical problem that ML can solve.ML in urban IoT is a bit different from other domains, due to its heterogeneous nature in terms of devices, data, and applications, as seen in Figure 7.

Smart Grids
Smart grids enhance energy availability and efficiency, providing uninterrupted power supply to cities, towns, and businesses by minimizing power wastage, reducing faults, and optimizing power supply to cope with high energy demands [157,158].Power-grid failures are rare, but they result in the loss of millions of dollars, blackouts, and social ataxia.Smart grids supply power in a more distributed, adaptive manner.Pinning hopes on smart grids for better power management is achievable through IoT.According to Randal Bryant et al., the contribution of ML to the success of smart grids will be enormous and beyond what we see today.It describes the energy-space domain where MLAs are expediting the progress of the "data to knowledge to action" paradigm [159].
Further, Zhang et al. [160] critically examine smart grids' potential applications of deep learning, reinforcement learning, and integration.However, IoT-based smart grids are also bringing security challenges.With the availability of treasure-trove data and MLAs [161][162][163][164][165][166], we can find critical power usage patterns and consumer preferences.This will maximize the reliability of power grids and further share essential insights with consumers and power companies to improve or design better power infrastructure for future challenges.
Electricity-demand forecasting (EDF) has gained significant attention, and it is a critical task in strategic planning for power companies.EDF impacts the operational decisions in smart grids, as pointed out in [167].MLAs are the primary tools for EDF, which learn from data and predict.In conventional power grids, EDF is based on historical power consumption data.However, smart grids are the end product of the merger of IoT and power grids.As a result, more diverse data are available from various IoT applications, as mentioned in Figure 2, which can be used for highly accurate predictions.
In [166,168,169], the authors examined some of the widely used MLAs based on their effectiveness in facilitating operational decisions in smart grids.Nonlinear MLAs like ANNs and SVM are most persuasive for EDF.ANNs are very potent for modeling any nonlinear relationships and complex behaviors of smart grids.Various types of ANNs are used for demand forecasting: BP [170,171], radial basis function (RBF) [172][173][174], multilayer perceptron (MLP) [175], and optimized and hybrid ANNs [170,[176][177][178]. EDF by SVM [179][180][181][182] can handle noise better with minimum overfitting.ANNs and SVMs are highly accurate with conventional EDF.However, a novel deep-learning model known as factored conditional restricted Boltzmann machine (FCRBM) for EDF shows significant improvement in prediction accuracy [183].ANNs, SVMs, and FCRBM are computationally expensive for IoT to envision.EDF depends not on conventional grid data, but on several evolving factors in IoT ecosystems like weather, social events, individual preferences, power-grid performance, and maintenance.Smart grids will be essential for human urbanization prospects; nevertheless, their management is critical.This is achievable by ML-enabled IoT.However, this also brings some challenges related to the security of power grids connected by IoT infrastructure [184].

Smart Traffic and Transportation
The value IoT brings to all the traffic solutions to their customers through its smart, connected "things" is beyond what we have seen today.Urban mobility is the critical application of smart traffic and transportation solutions, as it also enhances the chances of accessibility of other services to the people.Throughout the world, cities are getting bigger.The challenging issues for cities include traffic congestion, increased pollution, and economic losses caused by traffic delays and road accidents.ML-enabled IoT strategy provides the opportunity for creating value from connected data, including better services and accelerated innovation [185,186].
In developed countries, the road infrastructure is highly advanced and well maintained.Contrary to this, road infrastructure suffers from maintenance issues in developing economies.Roadway surface disruptions and obstacles (RSDOs) are widespread, resulting in accidents, driving problems, traveling, and transportation delays.Gónzalez et al. in [187] used acceleration sensing data to classify patterns related to speed bumps, potholes, metal humps, and rough roads by using logistic regression and ANN MLAs.Another work [188] that addresses the same issue identifies RSDOs by using a combination of supervised and unsupervised ML with the help of data collected by the Street Bump smartphone application.Traffic monitoring is critical in controlling traffic congestion, which is achieved by identifying traffic patterns by analyzing vehicle movements using a granular classification in [189] and regression analysis in [190].Other applications of ML are intelligent traffic light management, which was achieved using Q-learning [191], and ANNs and reinforcement learning [192].
Autonomous vehicles (AVs) are another area that will revolutionize the transportation industry.AVs depend entirely on ML, eventually developing AI to drive without human interference.ML algorithms are used for tracking and identifying moving and stationary objects.Alam et al. [193] proposed a method to recognize objects in the driving scene by integrating deep learning and decision fusion.Tesla and Google [194,195] are some technological titans utilizing ANN and DL in their AVs to detect objects in the driving scene.

Smart Homes
IoT-enabled smart homes (SHs) are a technology concept that facilitates the complete automation of operations of household devices and home appliances via the internet.Context awareness is an important aspect of smart homes, as it improves the comfort and safety of users.However, direct interaction between the user and the environment decreases.The MavHome (Managing an Intelligent Versatile Home) project uses the coupling of multiagent systems and probabilistic MLA for making home environment response a rational agent [196] to maximize inhabitant comfort and minimize operating cost.A more advanced context-aware model uses back-propagation ANN for service selection and a temporal differential class of reinforcement learning algorithm for adaptive context awareness, as user preferences do not remain the same over time.The main advantage of [197] over [196] is that no predefined model is required for the context-aware system.Modeling is automatically done based on the user's feedback on the service.
SHs can make rational decisions for automation.This is achieved by tracking and predicting the inhabitant's mobility patterns and usage of devices.The active LeZi prediction algorithm based on the Markov chain is proposed in [198], which can understand subsequent event patterns.An important area that gained a lot of attention in enhancing the automation of SHs recently is human activity recognition (HAR).Human behavior prediction by activity recognition is made in [199] using algorithms based on deep learning.Some comparative analysis of various ML algorithms exists, which showed their performance with IoT-based HAR data.Fahad et al. compared the accuracy of five MLAs for correctly recognizing smart home activities.SVM and evidence-theoretic KNN showed higher accuracy than the probabilistic ANN, KNN, and NB in HAR [200].In contrast, Alam et al. [74] compared eight ML algorithms and concluded that DL performance in terms of prediction accuracy is the best.Taiwo et al. [201] proposed a deep-learning model for motion classification using movement patterns that is used to improve power usage in homes.However, the DL algorithm is computationally expensive.Also, other work [74] highlights that the C5.0 algorithm performs very close to the DL algorithm.
HAR is divided into two parts.Firstly, clustering of activity patterns, and secondly, activity-type decisions.However, many related kinds of literature focus on one part only, which results in performance degradation.An unsupervised MLA K-pattern is used to classify complex user activities to answer this issue.Then, ANN is used to train and predict user activities [131].K-pattern MLA shows improved accuracy for high-volume IoT data in terms of temporal complexity and cluster-set flexibility.HAR gives more control and automation to smart homes.Better power optimization can be achieved by switching on/off lights, fans, and home appliances.Emergency health conditions can also be identified, and alerting others can avoid loss of life.

Smart Health Care
IoT is revolutionizing the health-care industry by bringing up new and advanced sensors connected to the internet, producing essential data in real time.Islam et al. comprehensively explained IoT in health care, platforms, application, and industry trends for smart health-care solutions [202].The objectives of smart health-care applications are: (1) improved and easy access to care, (2) increased health-care quality, and (3) reduced health-care costs.The key to achieving the above objectives is to perceive patterns and critical insights from health-care data [203,204].Automated assessment of individual wellbeing and alerting others to any health risk for the patient is a widely researched topic.In [205], an intelligent system is developed to monitor the well-being of individuals in their home environments.An ML-based method is used to automatically predict activity quality and automatically assess cognitive health based on activity quality.SVM, principal component analysis (PCA), and logistic regression MLAs are used to quantify activities and further predict cognitive health.Dawadi et al. also address automated cognitive health assessment using ML.Supervised and unsupervised ML scoring models are used to quantify and determine boundaries between activity performance classes and cognitive assessments performed [206].Cognitive systems can understand, reason, and learn, helping to spur discovery and decreasing the effort required to populate research studies effectively.
Further, in [207,208], solutions for physiological monitoring, weight management, and cardiovascular disease monitoring are proposed.In [207], a wearable armband multisensor system known as BodyMedia FIT performs constant physiological tracking and weight management by exploiting ML.The system has been commercially available since 2001 and uses regression analysis to classify activities.In [208], the mobile machine learning model for monitoring cardiovascular disease (M4CVD) is proposed.It uses mobiles to monitor heart diseases.M4CVD locally analyzes trends of vital health signs by contextualizing them with clinical data sets.SVM is used to examine features extracted from clinical data sets and wearable sensors to classify a patient as at risk or at no risk of cardiovascular disease, and has shown high accuracy in identifying patients at risk [208].IBM Watson provides a large-scale IoT-enabled cognitive health-care solution that covers a broader spectrum of patients.It combines the power of health-care data with MLAs to give new insights [209].ML-enabled IoT health-care solutions enhance individuals' proactive and preventive health-care interventions and reduce health-care costs, whereas cognitive care provides modern mechanisms for health-care specialists to connect with their patients, improving diagnostic certainty and reducing error rates.IoT-based health-care solutions can help in finding insights that can help raise the quality of health care across the globe.

Smart Supply Chain and Logistics
We are seeing many IoT applications in industries that are evolving and growing daily.IoT produces enormous amounts of data coupled with the latest communications technologies.Real-time data analytics helps businesses meet consumers' demands in today's developing economies.Supply-chain management (SCM) epitomizes the impact of IoT in the manufacturing industry.Ellis et al. explained how IoT-enabled analytic applications would revolutionize SCM [210].Some of the immediate benefits of IoT in SCM, as highlighted by Barun [211], are:

•
IoT "things" can communicate promptly, allowing the possibility of knowing where they are at all times.

•
Object tracking facilitated by IoT results in improved asset and fleet management, which means well-planned scheduling, better routing, and on-time product deliveries.

•
Better control of mobile assets with IoT means knowing where they are and how they are used.• Downtime will be audited closely in real time.

•
It increases logistics transparency.
All these benefits are brought together in the broader scenario to make SCM more efficient and sophisticated.
IoT means more data, more connected "things," and a high degree of automation.With many entities, such as vehicles, shipping containers, packages, and return shipments as the origin of data, businesses require more advanced and sophisticated methods to ingest and critically scrutinize IoT data.ML-enabled IoT gives SCM automated "sense, decide, and reply" capabilities [212].One of the crucial determinants of effective SCM is the ability to recognize customer-demand patterns and react accordingly to the changes in the face of intense competition.MLAs have shown promising results in demand forecasting.
For demand forecasting, MLAs like ANN, recurrent ANN, SVM, NB, and linear regression are compared, and SVM produces highly accurate forecasts [213].ML-enabled IoT can significantly enhance the efficiency of logistics and SCM efficiency.Zhengxia et al. proposed an advanced logistics monitoring system based on IoT.It has various functions to support the argument of multiple services in one place.One of the essential services is data acquisition and processing, which shows that its data analysis and forecasting show MLAs in modern logistics are a must-have [214].
Fraudulent imitation of packaging and products is known as counterfeit.It is a severe problem for global supply distribution chains.As a solution for this, an anticounterfeit deterministic prediction model (ADPM) is proposed in [215].ADPM identifies counterfeit by the Monte Carlo (MC) MLA.ADPM examines the product attributes by analyzing and calculating the correlation coefficients among objective features.In other literature [216], the authors tried to apply a machine learning-based approach with statistical techniques to detect counterfeits.In this section, we review how IoT, ML, and the manufacturing industry can join together to take on the challenges presently faced and streamline industry processes with automation.Suppose all the discrete processes that used to take place in silos can be observed and managed through the analysis of the data provided to MLAs.In that case, the holy grail of proper supply-chain optimization may be within reach.

Smart Social Applications
Apart from the technological aspect, IoT can affect social aspects of human life more than we can imagine.ML-enabled IoT can be used to find the public's mood on a particular issue and discover a pattern in social application data for event exploration.With the help of connected devices like smartphones and tablets, opinions can be formed and public perceptions can be analyzed by exploiting ML.
Opinions are the core of almost all human activities and are key influencers of our behaviors.Our beliefs and perceptions of reality and the choices we make are, to a considerable degree, conditioned upon how others see and evaluate the world.For this reason, when we need to make a decision, we often seek out the opinions of others.This is not only true for individuals but also for businesses.In [217], Liu gives an in-depth introduction to this fascinating problem and presents a comprehensive survey of all possible methods, including ML, that can be potential candidates, in addition to the latest developments in the field.Opinions can be predicted by analyzing public sentiment.In [218], the authors proposed a sentiment-analysis technique that can translate the sentimental orientation of Arabic Twitter posts based on novel data representation and MLAs.The proposed approach applied many features: lexical, surface-form, syntactic, etc.We also used lexicon features inferred from two Arabic sentiment word lexicons.The authors used several standard classification methods to build a supervised sentiment-analysis system (SVM, KNN, NB, DT, and random forest).Similarly, to [218,219] supervised classification algorithms, such as SVM, KNN, and NB, are used for Arabic sentiment analysis, whereas in [220] domain-specific sentiment analysis is done using MLA.Also, these days social media analysis can be used to identify threats and unwanted events, as in [221], MLAs are used for feature selection, and then only relevant text in the tweets is classified using SVM, NB, and AdaBoost MLAs.
Similarly, complex events were identified in [222] using adaptive moving window regression (AMWR) for dynamic IoT data streams.The emergence of ML in IoT gives us three main advantages: (1) we are more connected, (2) more informed, and (3) actions can be highly automated.ML makes IoT able to think and decide.The coupling of these two gives us the power to sense, analyze, and predict the events in our social environment.

Smart Environment Control
One of the primary goals of IoT and smart cities is to make our societies more prosperous.Prosperity cannot be achieved until or unless cities provide a healthy living environment to their residents.Clean water and good-quality air are significant issues for more than half the world's population.IoT with smart applications can greatly change this scenario.For example, IoT-based applications, such as eWater and sustainable-watermanagement applications, are used to provide clean water in Gambia [223].The world has less clean drinking water because of manmade water pollution.The first step in reducing and managing water pollution is identifying where water is polluted and by how much.Shafi et al. [224] proposed a water-pollution detection method based on deep neural networks.
Similarly, Mishra [225] proposed an IoT-based air-quality monitoring system.Several machine-learning algorithms, such as linear regression, random forest, and XGBoost, are used for forecasting and prediction.The model can be deployed for real-world use.Similarly, Elvitigala and Sudantha in [226] used linear regression to compute pollutant-level gases.Smart cities can leverage the fusion of IoT and machine learning to enhance the automation of water, land, and air-pollution management operations to provide a safer, healthy living environment that will ultimately result in a prosperous society.

Emergency and Disaster Management
Deployment of IoT infrastructure can significantly enhance our capacity to speed up relief efforts during any emergency or disaster.Ray et al. [227] comprehensively examined the IoT paradigm from its application area to data analytics based on machine learning with a specific focus on disaster management.Forest fire is one of the areas where a prompt forest-event prediction is an important application that can take from leverage IoT infrastructure.For example, reaction time must be significantly less in the event of a forest fire, as they propagate very quickly.However, this IoT-based system can predict the wrong event due to outliers.To deal with such a problem, Nesa et al. [228] proposed an IoT architecture that detects the data errors and events in an IoT-based forest environment using classification and regression trees (CARTs), random forest (RF), gradient boosting machine (GBM), and linear discriminant analysis (LDA).RF outperformed the other three classifiers.
Similarly, Salehi and Rashidi [229] categorized existing unsupervised machine-learning methods for detecting outliers for the real-world application of forest fire prediction.We witnessed during the last decade the destruction caused by a tsunami in terms of loss of life and property.IoT infrastructure and machine learning can play a significant role in developing an effective system to warn people of an expected tsunami.Pughazhendhi et al. [230] addressed this issue by developing a tsunami early warning system.A tsunami is predicted from earthquake data by an RF classifier.Further work [231] explained in detail how Japan's tsunami system works, one of the best in the world today.

Smart Security and Access Control
In the IoT environment, sensitive data are collected and transferred to their application with partial or no human interference, which gives rise to the challenge of protecting the security and privacy of millions and billions of users.There should be techniques for access control to limit access to these data and information [232].Attacks like denial of service (DoS) attacks and distributed DOS, spoofing attacks, jamming, and eavesdropping are prevalent and real threats to the security and privacy of user data and applications in the IoT environment.Xiao et al. [233] proposed various classification, clustering, and reinforcement learning-based access-control methods with the larger aim of protecting overall user privacy in the IoT environment.In a more recent work [234], Hussain et al. systematically reviewed different attacks, current state-of-the-art solutions, and challenges for security in the IoT paradigm.Several critical security gaps were discussed.The authors proposed extending machine-learning and deep-learning techniques, which are confined to developing intelligence, as a security solution in the IoT paradigm.Also, [234] gave future directions for ML-and DL-based access-control solutions.In one such work [235], various types of attacks and anomalies in the IoT environment are predicted using several ML algorithms, such as support vector machine (SVM), logistic regression (LR), random forest (RF), decision tree (DT), and an artificial neural network (ANN).Decision trees and ANN performed better than the others did.Similarly, Khalifa et al. [236] critically examined several biometric-based access-control methods used for feature extraction and classification, such as Fisher discriminant analysis, linear discriminant analysis, learning vector quantization, and ANNs.In addition, their advantages and disadvantages were discussed.In [237], a deep learning-based method was introduced for smart-home application to limit the access of pets and humans to consumer appliances.Interestingly, the proposed method in [237] uses limited computing resources.

Industry Perspective
Predominantly, IoT remains at the initial stages of development and adoption by the information technology industry (ITI).Slowly but steadily, the future worth of IoT is envisioned by ITI.Driven by hopes, market trends, and statistics, a lot of R&D is going on.ITI giants like Cisco, Microsoft, Google, IBM, Oracle, and SAP are at the forefront of making our environment smarter by designing new IoT-enabled software platforms and hardware.Increasing the use of IoT infrastructure will significantly enhance and speed up the adoption of Industry 4.0, which will revolutionize industry practices [238].
Digging out key insights, or in simpler words making sense of IoT-generated data, is one of the biggest problems in IoT.ML can tackle these issues.Another significant problem is bringing ML to the masses, apart from the economic worth that IoT holds.In light of these critical facts, ITI starts by adding MLAs as they collect more data for their IoT-based systems.Some popular IoT-enabled ML systems are IBM Watson, Google TensorFlow, Microsoft Azure, and Splunk, which are discussed here.
Microsoft Azure is a cloud computing platform created by Microsoft [239,240].Joseph Sirosh, corporate vice president of ML at Microsoft, says, "Every day, IoT is fueling vast amounts of data from millions of endpoints streaming at high velocity in the cloud . . . in this new and fast-moving world of cloud and devices, businesses can no longer wait months or weeks for insights generated from data."The reflection of his comments is quite evident in Azure's recent developments.The Azure cloud platform added ML with advanced analytics to expand big data capabilities and be ready to tackle IoT.Services such as Stream Analytics and Azure Event Hubs are intended to help customers process data from devices and sensors in the IoT ecosystem.Scott Hanselman, principal program manager for Microsoft Azure, demonstrated how this platform integrates several things and facilitates ML for IoT [241].
Another interesting development came from IBM in the Watson software platform [242,243] initially developed for answering in the quiz show Jeopardy.IBM Watson is a technology platform that uses natural language processing and ML to disclose insights from vast amounts of unstructured data.IBM Watson is more about cognitive IoT computing [244].For example, a car owner wants to ask about the predictive maintenance date of a particular auto part.Watson achieves this by analyzing machinery performance and breakdown time with the help of sensor data gathered over time.Figure 8 illustrates the steps of IBM Watson.
Watson APIs for IoT help to accelerate the development of cognitive IoT solutions and services on the IBM Watson IoT Platform.By using these ML-enabled APIs, you will be able to build cognitive applications that: • enable a high degree of interaction with humans with the help of text and voice • perceive images and scenes • perform ML from sensory inputs • establish data correlations with external data sources, such as weather or Twitter.
Guo et al. [7,8] presented ongoing efforts toward EI for smarter objects.Their work also highlights the future transition of today's IoT to EI-enabled IoT.The importance of their work can be seen in the recent announcements of global collaboration by IBM Watson and Cisco for combining the power of Watson IoT with edge analytics [245,246].This development also shows IBM's willingness to scale down the unnecessary data transfer to the cloud using edge analytics.Cisco's fog-computing endeavors will be highly valuable in distributing intelligence at the edge.Watson's role in this partnership is to provide a small piece of code, informing the software of the exciting data for a particular requirement.An exciting development came from search giant Google in the form of TensorFlow (TF), an open-source ML platform [247].Several Google products are now using TF.For example, Google Photos, Gmail, Google search, and speech recognition utilize TF.A significant advantage of TF is that it is highly scalable and can run on several systems, servers, personal computers, smartphones, and other mobile devices.Users can execute customdistributed MLAs.The potential of deep learning can be exploited by using TF.Like Microsoft and Google, another US-based multinational corporation, Splunk, introduced IoT-enabled ML software known as Splunk (product), which is excellent in gaining fundamental insights from operational data.It handles big data efficiently and augments maintenance and fault diagnosis from IoT-generated data [248].It consists of around 300 new MLAs [249].Splunk stresses the fact that its ML system will benefit nontechnical users.Splunk integrates with popular IoT platforms and services that can be seen as a boost for the broader acceptance of Splunk.
How important ML is becoming for future IoT is quite evident in the latest developments of Amazon Web Services (AWS) IoT, which in early 2016 integrated with Amazon Machine Learning (AML) [250].As Google, IBM, and Microsoft offered cloud-based machine-learning platforms, Amazon has been obliged to step up with its product to meet market demand.AWS and AML integration allows users to create ML models without knowing much about ML.However, the AML platform offers an easy way to do simple data analytics, but this also confined it within a boundary [251].Several other companies are in the market, offering application-specific ML solutions for IoT.Recently, market research company CB Insights used the Mosaic algorithm to classify promising start-using ML and DL algorithms to provide predictive insights from IoT-generated data [252].The application area of ML in IoT is enormous.Undoubtedly, the challenges and opportunities presented by IoT [4,6,7,19,22,188] are driving the growing interest in ITI in developing ML-enabled IoT.

Emerging Trends
IoT has had some interesting emerging trends in the last few years, such as edge computing, fog computing, deep learning, and connected autonomous vehicles.Also, in the previous few months, we have seen IoT used successfully in managing and controlling the COVID-19 pandemic.All the above mentioned emerging trends are discussed in the proceeding subsections.

Internet of Behavior (IoB)
IoT is a fusion of sensors, actuators, and connectivity technologies, whereas the Internet of Behavior (IoB) is a fusion of IoT, intelligence, and behavioral science.IoB can be seen as an extension of IoT.Its goal is to better understand data that will facilitate better product development and promotion, focusing more on evolving human psychology [253].Javaid et al. [254] posited that the inception of IoB can change the dynamics of product or service design, marketing, and customer services due to its ability to understand and modify consumer behaviors based on their comportment, tastes, and imaginations.Pinochet et al. [255] analyzed the power of various "things" in IoT products in enhancing the purchase intention by improving the functional and emotional experience.Stary [256] stressed that IoB would transform the business and organization space with its choreographic intelligence.IoB is now in its infancy, and its success coincides with large-scale IoT deployments with a high level of user acceptance.

Pandemic Management
Today's world is witnessing the devastation of the COVID-19 pandemic.The WHO categorically said several times that the world response could be far better than what we did and are doing.Whether in developed countries like Italy and the US or developing countries like India and Brazil, most health-care systems were underprepared and already overburdened.From the prism of sophisticated technologies, IoT can be used effectively to monitor and control the COVID-19 pandemic.IoT infrastructure coupled with intelligence can be used to address challenges during the lockdowns, social distancing, contact tracing, health-care monitoring, prescreening, remote meeting, anytime and anywhere accessibility, etc. [257].IoT can play a significant role in providing virtual health-care (contactless) tools and telemedicine to the masses, which will eventually help in achieving the goals of Healthcare 4.0 [258].For example, Smart Field Hospital in Wuhan used IoT and AI-based applications to help health-care workers relax.Robots and IoT devices helped to perform contactless body temperature monitoring, cleaning, disinfecting, etc. [259].
On the other hand, IoT sensors can help to track infection by forming the web of human nodes and their connections.However, it has some serious privacy concerns, which need to be addressed [260].Why has the world messed up in managing and controlling COVID-19?
The answer is because human decision-making is slow and biased.To address this issue, Alam et al. [261] proposed iResponse, an intelligent IoT-enabled system for autonomous COVID-19 pandemic management.The authors demonstrated through iResponse that the fusion of IoT and intelligence could help break the chain of infection, cure development, treatment, resource planning, pandemic analytics, and decision-making.Still, we need to deploy IoT infrastructure on a large scale around the world to exploit its benefits.

Connected Autonomous Vehicles
IoT will connect AVs and will help in developing the driving cognitive.However, connected AV development is in its infancy, and a lot depends on how the adopter's willingness to accept the change and pricing of these vehicles, as examined by Talebian and Mishra [262], as well as such issues as pedestrian detection, intersection navigation, communications, collision avoidance, and security.One of the first of this kind of work was done by Alam et al., who developed TAAWUN [263].It uses connected vehicle data and prediction to enhance its driving-scene understanding.The core concept used in TAAWUN can also use IoT infrastructure in the future and sense data for prediction.AVs have recently suffered deadly crashes during the testing phase [264,265].This shows that ML algorithms used by AVs are not yet matured for real-world challenges.After TAAWUN, there are now a few words examining the benefits of connected AVs.Elliott et al. [266] critically discussed recent advances in connected AVs, focusing on five major areas: intersection navigation, pedestrian detection, collision avoidance, communications, and security.Safety is one of the foremost goals of any autonomous technology.Addressing the safety aspect, Ye and Yamamoto [267] critically analyzed the impact of connected AVs in providing a hassle-free and smooth driving experience with enhanced safety.

Edge and Fog Computing
Edge and fog computing push data intelligence and its processing closer to the nodes from where data is sensed or required, as depicted in Figure 9. Edge computing brings computational power closer to the sensing data than sending it to a remote cloud [268].This results in efficient speed and enhanced data-transport performance of devices and applications.Fog computing, an emergent architecture, can be termed a subset of the edge computing paradigm [269].Fog computing enables the cloud to be closer to the smart objects that generate data and actuators that act on sensed data.It defines the standards related to edge computing, data transfer, storage, computation, and networking [270].Edge and fog computing are enabling technologies that will help IoT infrastructure to assist smart applications and serve the bigger objective of smart cities around the globe.

Lightweight Deep Learning
Deep learning is a representational learning model that mimics the neural system of humans.It takes raw data as input and automatically discovers representations required to make predictions.Deep learning tries to model higher-level data abstractions.A deeplearning model can have several layers between input and output, which helps it to think.An intriguing fact about deep learning is that layers of features are learned from data automatically.LeCun, the director of AI research at Facebook [271]., stated that deep learning would see many near-future successes because of two critical factors: (1) limited engineering by hand required and (2) taking leverage from enhanced computational resources and data availability.However, deep learning has a few issues, such as these algorithms consuming too many resources like processing power and energy resources.From an IoT perspective, we need to exploit the power of deep learning at several levels, such as (1) cloud, (2) fog, and (3) edge [39,272].Plenty of processing resources are available at the cloud level, which the deep-learning algorithms can consume.Further going downwards to fog, the availability of processing resources decreases significantly, whereas edge has minimum processing resources, so unsuitable for conventional deep-learning algorithms.In addition, these deep networks must be capable of perceiving the environment from fewer data.Recent deep-learning trends show fundamental understanding among researchers about the need for lightweight deep-learning algorithms for IoT [273].Several advances reflect this trend, such as Alibaba introducing the open-source mobile neural network [274], a lightweight deep-learning model for HAR using smart "things" on edge [275], Mobi-Face, ShuffleFaceNet for face recognition on mobile devices [274,276], lightweight machine learning for IoT Systems (LIMITS) [277], CardioXNet, a lightweight deep-learning framework for heart-disease prediction [278], lightweight deep learning-based virtual vision sensing technology [279], and lightweight convolutional neural networks (CNNs) [280,281].In the future, we expect more development in this direction, as all or most IoT devices cannot match conventional deep-learning systems in terms of processing, memory, or power requirements.

Challenges
The IoT paradigm is a perfect candidate to bridge the gap between the real and digital worlds by developing a hyperconnected world.However, it needs to overcome and manage massive technological and nontechnological challenges.Based on several literature reviews on IoT [282][283][284][285], we identified four classes of challenges: (1) technological, (2) individual, (3) business, and (4) society.In the proceeding subsections, we discuss them in brief.

Technological Challenges
The extensive deployment of IoT systems is still a distant reality.However, they are being implemented in bits and pieces around the world.Sensing, connectivity, actuators, and security are four significant technologies fused to make IoT.The world still faces connectivity issues.Mobile connectivity and internet availability are obstacles, particularly in low-income countries.Another problem is that cross-platform capability is not much there in the present IoT platform, resulting in its slow acceptance [286,287], Nowadays, the IoT landscape is primarily based on a client-server architecture, which is not a feasible option for the future because of increased latency, maximized energy consumption, singlepoint failure, and security vulnerabilities.To tackle this, edge and fog computing platforms came into being, albeit most of them are in their infancy and facing challenges like network bandwidth, latency, accessibility, control, and management [288].A bigger challenge posing a significant threat to the large-scale acceptance of IoT systems is the security of these "things" [285].IoT is about decentralized edge devices where devices will connect with several strange things that are more prone to cyberattacks.Universal standards for IoT devices are not there for authentication and authorization, which adds further to security vulnerabilities.Security is one of the most critical issues IoT needs to address for a successful and acceptable paradigm.

Individual Challenges
Different people will use IoT for a diverse set of needs.The aim is to improve daily lives through sophisticated automation and an intelligent environment.Due to IoT's "anytime and anywhere" property, the foremost concern is privacy as it varies from individual to individual, resulting in more challenging scenarios that devices and servers need to handle.Sen et al. [289], critically discussed the ways to preserve privacy and emerging related trends in IoT.Another hurdle to IoT's success is the acceptability of IoT among the public.IoT will change how we look at our daily life.The point of interest is how compatible our cognitive needs are with these changes [290].Beştepe and Yildirim [291] analyzed how public acceptability is essential for smart cities, which at their core use IoT infrastructure to achieve sustainability.To increase IoT's acceptability, we need to educate and train people to make them aware of the benefits these sophisticated applications and services bring and how they can revolutionize our daily lives towards more prosperity.

Business Challenges
IoT offers enormous business opportunities in manufacturing, applications, and services.However, it cannot compete with the hype that was created.Businesses are facing challenges including but not limited to lack of universal platforms, lack of industry standards, compatibility connectivity, data collection, and security issues [292,293].A skill shortage of IoT experts is also one major issue.Other than this, global market anomalies like COVID-19 [294], a global computer chip shortage [295], and the Russia-Ukraine war [296] have slowed the pace and reduced the interest of businesses and governments in IoT developments as priorities shifted.

Society Challenges
As a society, we need a prosperous and sustainable living environment.IoT can help significantly by providing actionable decision-making support [297].However, the critical question is: Are we equipped today as a society to use IoT?And are we ready to accept the cognitive changes it will bring to our daily lives?These essential questions will shape public acceptance of IoT applications and services [298].It will increase the demand side, encouraging industries to put serious efforts into the large-scale deployment of IoT, its applications, and services.Further, the digital divide is another major challenge today our societies suffer due to the imbalance in global economic growth.If we want to exploit IoT to its full potential, we must address the issues discussed above.

Conclusions
IoT is far more mature now.More IoT applications are in practical use.Individuals, governments, and businesses have shown a keen interest in leveraging IoT's opportunities.An important question remains: How will IoT learn and think to provide a high degree of automation?The answer comes from other branches of computer science that understand and act like humans with the help of ML.In this paper, rather than doing a classical review of literature, we tried highlighting the importance of ML for IoT's success and diverse ML-powered IoT applications.We classify ML developments in IoT from three perspectives: data, application, and industry.The literature reviewed is wholly or partially applicable to the IoT ecosystem.Further, we identified and discussed emerging IoT trends, including Internet of Behavior (IoB), pandemic management, edge and fog computing, connected autonomous vehicles, and lightweight deep learning, with a primary focus on machine learning to develop futuristic and sustainable solutions.Despite IoT's ability to transform our present-day societies into smarter and more sustainable ones, it has to overcome a set of challenges, e.g., technological, individual, business, and those related to our societies.
We conclude that ML developments in IoT will revolve around currently available and well-established ML methods, at least in the short term.However, in the future, we can see a fully autonomous IoT ecosystem with embedded intelligence capabilities that will be a tricky development from an ML point of view regarding device data and processing abilities.With the help of this work, the reader can see what ML means to IoT, how ML is used with IoT, and what the prospects of ML in IoT can be.

Figure 2 .
Figure 2. Machine-learning task in the Internet of Things (IoT).

Figure 3 .
Figure 3.The high-level structure of the paper.

Figure 4 .
Figure 4. IoT-based data issues and solution landscape.

Figure 5 .
Figure 5. Classification of future outlier detection algorithm that adopt machine learning for IoT application.

Figure 6 .
Figure 6.Various categories of feature-selection methods.

Figure 8 .
Figure 8. Step of how IBM Watson finds critical insights.

Figure 9 .
Figure 9. Edge and fog computing landscape.

Table 1 .
Major machine learning-based IoT surveys.