Machine learning (ML) sits at the heart of smart city technologies, from traffic management systems to energy optimization. But not all machine learning works the same way. Depending on the type of data available and the problem at hand, different approaches are used. The three main types-supervised learning, unsupervised learning, and reinforcement learning-each have distinct characteristics, strengths, and applications. Understanding these differences is essential for anyone working with smart technologies.
Table of Contents
- Supervised learning with labelled datasets
- How labelled data works
- The MNIST dataset example
- Common supervised learning applications
- Unsupervised learning for pattern discovery
- Clustering and pattern recognition
- Fraud detection applications
- Reinforcement learning through rewards
- The reward-punishment system
- Self-driving cars and autonomous systems
- Industrial automation and robotics
- Comparing machine learning categories
- Data requirements
- Problem types and use cases
- Computational considerations
- Real-world integration
Supervised learning with labelled datasets
Supervised learning is the most common approach in machine learning. It works by training a model on a dataset where each data point has a known outcome or label. The algorithm learns the relationship between inputs and outputs, then applies that knowledge to make predictions on new, unseen data.
Think of it as learning with a teacher who provides correct answers during training. The model sees thousands of examples with their corresponding labels, adjusts its internal parameters to minimize errors, and gradually improves its accuracy.
How labelled data works
Supervised learning uses labeled training data to learn patterns and make predictions. Each input is paired with its correct output. For image classification, this means every image comes with a label identifying what it contains. For price prediction, historical data includes both the features (size, location, age of a property) and the actual sale prices.
The quality and quantity of labelled data directly affect model performance. More diverse, accurately labelled examples typically produce better results.
The MNIST dataset example
One of the most famous examples of supervised learning is the MNIST database (Modified National Institute of Standards and Technology database). It contains 60,000 training images and 10,000 testing images of handwritten digits, each being a 28ร28 pixel grayscale image.
Every image in MNIST is paired with its correct label-the digit it represents (0 through 9). A machine learning model trains on these labelled examples, learning to recognize patterns in pixel arrangements that correspond to specific numbers. After training, the model can classify new handwritten digits it has never seen before.
The task is to classify a given image of a handwritten digit into one of 10 classes representing integer values from 0 to 9. MNIST has become a benchmark in computer vision research-often called the “hello world” of machine learning-because it provides a standardized way to test new algorithms and architectures.
Common supervised learning applications
Supervised learning handles two main types of problems: classification and regression. Classification tasks include spam detection and image recognition, while regression tasks involve predicting continuous values like house prices or stock forecasts.
Smart city applications include traffic prediction systems that learn from historical patterns to forecast congestion, energy demand forecasting based on past consumption data, and predictive maintenance systems that identify equipment likely to fail based on sensor readings and previous failure records.
Unsupervised learning for pattern discovery
Unlike supervised learning, unsupervised learning works with data that has no predefined labels. Instead of learning from correct answers, the algorithm explores data to find hidden patterns, structures, or groupings on its own.
This approach is particularly valuable when we don’t know what patterns exist in our data or when labelling large datasets would be impractical or expensive.
Clustering and pattern recognition
Unsupervised learning finds hidden patterns in unlabeled data without predetermined outcomes. The most common technique is clustering, where similar data points are grouped together based on shared characteristics.
Common algorithms include K-Means clustering, which partitions data into a specified number of groups, and hierarchical clustering, which creates a tree-like structure of nested groups. These methods excel at customer segmentation, document categorization, and discovering natural groupings within complex datasets.
Fraud detection applications
Fraud detection represents one of the most impactful applications of unsupervised learning. Unsupervised machine learning algorithms can look at complex networks of transactions and detect unusual patterns that might indicate fraudulent activity.
The key advantage here is that fraudsters constantly change their tactics. Traditional supervised systems trained on past fraud patterns may miss new types of attacks. Unsupervised machine learning can detect new and unknown fraud types, enabling organizations to take early action before damage occurs.
Clustering-based anomaly detection assumes that similar data points belong to similar groups. When a transaction doesn’t fit into any normal cluster, it gets flagged for review. This approach has proven effective for credit card fraud, insurance claims analysis, and network intrusion detection.
In smart city contexts, unsupervised learning helps identify unusual patterns in utility usage (potential theft or leaks), abnormal traffic behaviour (accidents or road hazards), and anomalies in public infrastructure performance.
Reinforcement learning through rewards
Reinforcement learning (RL) operates on an entirely different principle than supervised or unsupervised approaches. An agent interacts with an environment, learning through rewards and penalties to maximize long-term success.
Rather than learning from a fixed dataset, the RL agent takes actions, observes results, and adjusts its behaviour based on feedback. This trial-and-error approach mirrors how humans and animals naturally learn many skills.
The reward-punishment system
In reinforcement learning, every action has consequences. Good actions that move toward a goal receive positive rewards; poor actions receive penalties. Over thousands or millions of iterations, the agent learns which sequences of actions produce the best outcomes.
The agent interacts with its environment, learns what actions produce the highest rewards, and avoids penalties through trial and error. This learning process continues indefinitely, allowing the agent to adapt to changing conditions and discover optimal strategies that might not be obvious to human programmers.
Self-driving cars and autonomous systems
Autonomous vehicles represent a major application area for reinforcement learning. Reinforcement learning has been used to teach a car to drive from scratch on a real road, demonstrating the technique’s potential for complex real-world tasks.
In the self-driving context, the components map directly to RL concepts. The agent is the driver; the environment is the car and its surroundings; the state represents where the car is on the road; actions include braking, turning, and accelerating. The reward might be distance travelled without requiring human intervention.
Deep reinforcement learning has become a powerful learning framework capable of learning complex policies in high dimensional environments. Modern autonomous vehicles use these techniques for lane following, obstacle avoidance, and navigation through complex traffic scenarios.
Industrial automation and robotics
Beyond vehicles, reinforcement learning powers industrial robots that learn assembly tasks, warehouse systems that optimize picking routes, and smart grid controllers that balance energy supply and demand. This type of learning is frequently used in robotics and gaming, where agents must make sequential decisions in complex environments.
In smart cities, RL optimizes traffic signal timing based on real-time conditions, manages building energy systems to reduce consumption while maintaining comfort, and coordinates drone fleets for delivery or surveillance operations.
Comparing machine learning categories
Each type of machine learning addresses different kinds of problems, and choosing the right approach depends on your data and goals.
Data requirements
Supervised learning requires a large amount of labeled data, while unsupervised learning can work with unlabeled data. Reinforcement learning needs neither labels nor historical data in the traditional sense-instead, it requires an environment where the agent can experiment and receive feedback.
For organizations with extensive labelled historical data, supervised learning often produces the most accurate predictions. When labels are scarce or expensive to obtain, unsupervised techniques offer valuable alternatives for discovering patterns and anomalies.
Problem types and use cases
Computational considerations
Supervised learning algorithms are generally faster and easier to implement, while reinforcement learning can be more complex and computationally expensive. Unsupervised learning falls somewhere between, depending on the specific algorithm and dataset size.
Modern smart city implementations often combine multiple approaches. A traffic management system might use supervised learning to predict congestion, unsupervised learning to identify unusual patterns, and reinforcement learning to optimize signal timing in real time.
Real-world integration
Modern ML systems often use multiple learning approaches to solve complex problems. Netflix, for example, combines supervised learning for rating predictions, unsupervised learning to discover viewer segments, and reinforcement learning to optimize when and how recommendations are presented.
Understanding these three paradigms provides a foundation for evaluating smart city technologies and appreciating how intelligent systems learn from data, discover patterns, and make decisions in complex urban environments.
What do you think? As machine learning becomes more embedded in urban infrastructure, how should cities balance automation benefits against the need for human oversight and transparency in these decision-making systems?
References
- https://www.geeksforgeeks.org/machine-learning/supervised-vs-reinforcement-vs-unsupervised/
- https://www.digitalocean.com/resources/articles/types-of-machine-learning
- https://en.wikipedia.org/wiki/MNIST_database
- https://www.geeksforgeeks.org/machine-learning/mnist-dataset/
- https://machinelearningmastery.com/how-to-develop-a-convolutional-neural-network-from-scratch-for-mnist-handwritten-digit-classification/
- https://www.aitude.com/supervised-vs-unsupervised-vs-reinforcement/
- https://www.educative.io/answers/supervised-vs-unsupervised-vs-reinforcement-learning
- https://www.datavisor.com/wiki/unsupervised-machine-learning
- https://medium.com/southworks/fraud-detection-applying-unsupervised-learning-techniques-4ae6f71b266f
- https://towardsdatascience.com/reinforcement-learning-self-driving-cars-to-self-driving-labs-018f465d6bbc/
- https://www.technologyreview.com/2022/05/27/1052826/ai-reinforcement-learning-self-driving-cars-autonomous-vehicles-wayve-waabi-cruise/
- https://ieeexplore.ieee.org/document/9351818
- https://www.pecan.ai/blog/3-types-of-machine-learning/
Leave a Reply