Mlunit 01
Mlunit 01
UNIT-01
Definition of Learning
• Learning involves changes in behaviour due to experiences, focusing on
adapting rather than relying on instinct or temporary states.
• Components of a Learning System:
o Performance Element : Determine actions based on existing strategies.
o Learning element : Improves the performance element by analysing past
outcomes.
INFLUENCES INCLUDE:
✓ Component of performance : Understanding existing capabilities.
✓ Feedback mechanism : Using feedback to enhance performance,
✓ Knowledge Representation : How information is organized and
accessed.
• 1952: Arthur Samuel developed the first computer program capable of learning from
its activities.
• 1958: Frank Rosenblatt created the Perceptron, the first artificial neural network,
which was designed for pattern and shape recognition
Early Developments:
• 1959: Bernard Widrow and Marcian Hoff developed two neural network models:
ADELINE, which could detect binary patterns, and MADELINE, which was used to
reduce echo on phone lines.
• 1982: John Hopfield proposed a network with bidirectional lines that mimicked
actual neuronal structures.
• 1986: The backpropagation algorithm was popularized, allowing the use of multiple
layers in neural networks, enhancing their learning capabilities.
• 1997: IBM’s Deep Blue, a chess-playing computer, famously beat the reigning world
chess champion.
• 1998: AT&T Bell Laboratories achieved significant progress in digit recognition,
notably enhancing the ability to recognize handwritten postcodes for the US Postal
Service.
21st Century Innovations:
• The 21st century has seen a significant surge in machine learning, driven by both
industry and academia, to boost computational capabilities and innovation.
• Notable projects include:
• GoogleBrain (2012): A deep learning project.
• AlexNet (2012): A deep convolutional neural network.
• DeepFace (2014) and DeepMind (2014): Projects that advanced facial recognition
and AI decision-making.
• OpenAI (2015), ResNet (2015), and U-net (2015): Each contributed to
advancements in AI capabilities, from gameplay to medical imaging.
Machine learning
• Machine learning is a subset of artificial intelligence (AI) that enables computers to learn
from and make decisions based on data, without being explicitly programmed.
• Definition: Machine learning involves developing algorithms that allow computers to
process and learn from data automatically.
• Purpose: The aim is to enable computers to learn from their experiences and improve their
performance over time without human intervention.
• Functionality: Machine learning algorithms analyse vast amounts of data, enabling them to
perform tasks more efficiently and accurately. This could be anything from predicting
consumer behaviour to detecting fraudulent transactions.
• Integration: Combining machine learning with AI and cognitive technologies enhances its
ability to process and interpret large volumes of complex data.
Example: Consider a streaming service like Netflix. Machine learning is used to analyze your
viewing habits and the habits of others with similar tastes. Based on this data, the system
recommends movies and shows that you might like. Here, the algorithm learns from the
accumulated data to make increasingly accurate predictions over time, thereby enhancing
user experience without manual intervention. This demonstrates machine learning’s
capability to adapt and improve autonomously, making it a powerful tool in many tech-
driven applications.
Machine learning has a wide range of applications across different fields, here are some key
applications along with examples:
• Image Recognition:
• Application: Image recognition involves identifying objects, features, or patterns within
digital images or videos.
• Example: Used in facial recognition systems for security purposes or to detect defective
products on assembly lines in manufacturing.
• Medical Diagnosis:
• Application: Machine learning assists in diagnosing diseases by analysing clinical
parameters and their combinations.
• Example: Predicting diseases such as diabetes or cancer by examining patient data and
previous case histories to identify patterns that precede diagnoses.
• Statistical Arbitrage:
• Application: In finance, statistical arbitrage involves automated trading strategies that
capitalize on patterns identified in trading data. • Example: Algorithmic trading platforms
that analyse historical stock data to make buy or sell decisions in milliseconds to capitalize
on market inefficiencies.
Learning Associations:
• Application: This process uncovers relationships between variables in large databases,
often revealing hidden patterns.
• Example: Market basket analysis in retail, which analyses purchasing patterns to
understand product associations and optimize store layouts.
Information Extraction:
• Application: Information extraction involves pulling structured information from
unstructured data, like text.
• Example: Extracting key pieces of information from legal documents or news articles to
summarize content or populate databases automatically.
• Information Extraction:
• Application: Information extraction involves pulling structured information from
unstructured data, like text.
• Example: Extracting key pieces of information from legal documents or news articles to
summarize content or populate databases automatically.
Advantages of Machine Learning:
• Automation:
• Example: Autonomous vehicles use machine learning to interpret sensory data and make
driving decision without human input, improving transportation efficiency and safety.
• Continuous Improvement:
• Example: Credit scoring systems evolve by learning from new customer data, becoming
more accurate in predicting creditworthiness over time.
• Handling Complex Data:
• Example: Financial institutions use machine learning algorithms to detect fraudulent
transactions by analysing complex patterns of customer behaviour that would be difficult for
humans to process.
Disadvantages of Machine Learning:
• Data Acquisition:
• Example: In healthcare, acquiring large datasets of patient medical records that are
comprehensive and privacy-compliant is challenging and expensive.
• Time and Resources:
• Example: Developing a machine learning model for predicting stock market trends
requires extensive computational resources and time to analyse years of market data before
it can be deployed
• Interpretation of Results:
• Example: In genomics research, interpreting the vast amounts of data produced by
machine learning algorithms requires highly specialized knowledge to ensure findings are
accurate and meaningful.
• High Error-Susceptibility:
• Example: Early stages of facial recognition technology showed high error rates,
particularly in accurately identifying individuals from minority groups, leading to potential
biases and inaccuracies.
Machine Learning Approaches Artificial Neural Network
Inspiration: ANNs mimic the structure and function of the nervous systems in animals,
particularly how neurons transmit signals.
Functionality: These networks are used for machine learning and pattern recognition,
handling complex data inputs effectively.
Components of ANNs:
• Neurons: Modelled as nodes within a network.
• Connections: Nodes are linked by arcs that represent synapses, with weights that signify
the strength of each connection.
• Processing: The network processes signals in a way analogous to neural activity in
biological brains.
• Operation:
• Signal Transmission: Connections in the network facilitate the propagation of data, similar
to synaptic transmission in biology.
• Information Processing: ANNs adjust the weights of connections to learn from data and
make informed decisions.
Clustering
• Definition: Clustering is the process of sorting items into groups based on their similarities,
forming distinct clusters where items within each cluster are more alike to each other than
to those in other clusters.
• Visual Representation: Imagine organizing fruits into groups by type, such as grouping
apples together, oranges in another group, and bananas in a separate one, visually
representing how clusters segregate similar items.
• Characteristics: Clusters act like exclusive clubs, where members share common traits but
differ significantly from members of other clusters, illustrating the distinctiveness of each
group.
• Multidimensional Space: Clusters are akin to islands in an expansive ocean, with dense
population points representing similar items within each cluster, and low-density water
symbolizing dissimilar items separating clusters.
• Uses the eigenvalues of a similarity matrix to reduce dimensionality before clustering in fewer
dimensions. This technique is particularly useful when the clusters have a complex shape, unlike
centroid-based clustering which assumes spherical clusters. For example, in social network analysis,
spectral clustering can help identify communities based on the patterns of relationships between
members.
DECISION TREE
A decision tree is a model used in data mining, statistics, and machine learning to predict an
outcome based on input variables. It resembles a tree structure with branches and leaves, where
each internal node represents a "decision" based on a feature, each branch represents the outcome
of that decision, and each leaf node represents the final outcome or class label.
• Advantages:
• Limitations:
• Decisions are based on heuristics, hence might not provide the best split in some cases.
• Are tools for representing and reasoning under conditions of uncertainty. They capture the
probabilistic relationships among a set of variables and allow for the inference of probabilities even
with partial information.
• Structure: The core components of a Bayesian belief network include:
• Directed Acyclic Graph (DAG): Each node in the graph represents a random variable, which can be
either discrete or continuous. These variables often correspond to attributes in data. Arrows or arcs
between nodes represent causal influences.
• Conditional Probability Tables (CPTs): Each node has an associated table that quantifies the effect
of the parents on the node.
• Usage:
• Learning: Bayesian networks can be trained using data to learn the conditional dependencies.
• Inference: Once trained, the network can be used for inference, such as predicting the likelihood of
lung cancer given that a patient is a smoker with no family history.
• Classification: Bayesian networks can classify new cases based on learned probabilities.
Reinforcement learning
• Reinforcement learning is a type of machine learning where an agent learns to make decisions by
performing actions and receiving feedback in the form of rewards or penalties. This method is similar
to how individuals learn from the consequences of their actions in real life.
• Rewards: Feedback from the environment which can be positive (reinforcements) or negative
(punishments).
• Imagine a robot navigating a maze. The robot has to find the shortest path to a destination without
prior knowledge of the layout. Each step it takes provides new information:
• If it hits a wall or moves away from the goal, it receives a negative reward. Through trial and error,
the robot learns the optimal path by maximizing its cumulative rewards.
• A Support Vector Machine (SVM) is a powerful machine most commonly used in classification
problems.
• SVM constructs a hyperplane or set of hyperplanes in a high-dimensional space, which can be used
for classification. The goal is to find the best hyperplane that has the largest distance to the nearest
training data points of any class (functional margin), in order to improve the classification
performance on unseen data.
• Applications of SVM:
• Text and Hypertext Classification: For filtering spam and categorizing text based content for news
articles.
• Image Classification: Useful in categorizing images into different groups (e.g., animals, cars, fruits).
• Handwritten Character Recognition: Used to recognize letters and digits from handwritten
documents.
• Biological Sciences: Applied in protein classification and cancer classification based on gene
expression data.
Genetic Algorithm
• A genetic algorithm (GA) is a search heuristic inspired by Charles Darwin's theory of natural
selection. It is used to find optimal or near-optimal solutions to complex problems which might
otherwise take a long time to solve.
• Purpose: Genetic algorithms are used to solve optimization and search problems by mimicking the
process of natural selection.
• Process: This involves a population of individuals which evolve towards a better solution by
combining the characteristics of high-quality individuals.
2. Fitness Evaluation: Evaluate the fitness of each individual in the population. The fitness score
determines how good an individual solution is at solving the problem.
3. Selection: Select pairs of individuals (parents) based on their fitness scores. Higher fitness scores
generally mean a higher chance of selection.
4. Crossover (Recombination): Combine the features of selected parents to create offspring. This
simulates sexual reproduction.
5. Mutation: Introduce random changes to individual offspring to maintain genetic diversity within
the population.
6. Replacement: Replace the older generation with the new generation of offspring.
• Encoding: Each car design is encoded as a string of numbers (genes), representing different design
parameters like shape, size, and materials.
• Fitness Evaluation: Use a simulation to calculate the air resistance of each design.
• Repeat: Continue the process to evolve increasingly efficient designs over multiple generations.
• Data Quality:
• Importance of Quality: High-quality data is crucial for developing effective ML models. Poor data
can lead to inaccurate predictions and unreliable outcomes.
• Challenges:
• Data Evaluation and Integration: Ensuring data is clean, well-integrated, and representative. For
example, a model trained to recognize faces needs a diverse dataset that reflects various ethnicities,
ages, and lighting conditions.
• Data Exploration and Governance: Implementing robust data governance to maintain the
integrity and usability of data over time.
• Transparency:
• Model Explainability: ML models, especially complex ones like deep neural networks, can act as
"black boxes," where it's unclear how decisions are made.
• Example: In a credit scoring model, it's crucial for regulatory and fairness reasons to explain why a
loan application was denied, which can be challenging with highly complex ML models.
• Manpower:
• Skill Requirement: Effective use of ML requires a combination of skills in data science, software
development, and domain expertise.
• Bias Avoidance: Having diverse teams is important to prevent biases in model development. •
Example: An organization implementing an ML solution for customer service might need experts in
natural language processing, software engineering, and customer interaction to develop a
comprehensive tool.
• Other Issues:
• Misapplication of Technology: ML is not suitable for every problem, and its misuse can lead to
wasted resources or poor decisions.
• Example: Employing deep learning for a simple data analysis task, where traditional statistical
methods would be more appropriate and less costly.
• Innovation Misuse: The hype around new ML techniques can lead to premature adoption without
proper understanding or necessity.
• Example: The early overuse of deep learning in situations where simpler models could suffice, like
predicting straightforward outcomes from small datasets.
• Traceability and Reproducibility: Ensuring that ML experiments are reproducible and that results
can be traced back to specific data and configuration settings.
• Example: A research team must be able to replicate an ML experiment's results using the same
datasets and parameters to verify findings and ensure reliability.