Introduction-to-Machine-Learning
Chapter 1: Introduction to Machine Learning
1.1 Introduction
Definitions of Machine Learning
Coined by Arthur Samuel (1959): "The field of study that gives computers the ability to learn without being explicitly programmed."
No universally accepted definition; varies by author.
Machine learning can be seen as programming computers to optimize a performance criterion using example data or past experience.
Alternatively, it involves constructing programs that automatically improve with experience.
1.1.1 Definition of Machine Learning
Focus on the term "model": no universal definition; can be mathematical expressions, equations, logical rules, etc.
1.1.2 Definition of Learning
A computer program learns from experience (E) concerning tasks (T) and performance measure (P) if performance improves.
Example clarifications:
Handwriting Recognition Learning Problem
Task T: Recognizing and classifying handwritten words.
Performance P: Percent of words correctly classified.
Experience E: Dataset of handwritten words.
Robot Driving Learning Problem
Task T: Driving using vision sensors.
Performance P: Average distance traveled before an error.
Experience E: Sequence of images/steering commands from a human driver.
Chess Learning Problem
Task T: Playing chess.
Performance P: Percent of games won.
Experience E: Playing practice games against itself.
1.2 How Machines Learn
1.2.1 Basic Components of the Learning Process
The learning process divides into four components:
Data Storage: Important for storing and retrieving data.
Humans: Data stored in the brain, retrieved via electrochemical signals.
Computers: Use hard drives, flash memory, etc.
Abstraction: Extracting knowledge about stored data; involves creating general concepts.
Training is the process of fitting a model to data.
Generalization: Turning knowledge into actionable forms for future similar tasks.
Evaluation: Providing feedback to measure learned knowledge utility and inform improvements.
1.3 Applications of Machine Learning
Involves applying methods to large datasets (data mining).
Typical applications include:
Retail: Studying consumer behavior.
Finance: Credit applications, fraud detection, stock market analysis.
Manufacturing: Optimization and troubleshooting.
Medicine: Medical diagnosis models.
Telecommunications: Analyzing call patterns.
Science: Analyzing data in physics/biology.
AI: Teaching systems to adapt.
Vision/Speech Recognition and Robotics: For various tasks like driving and gaming.
1.4 Understanding Data
1.4.1 Unit of Observation
Definition: Smallest entity with measured properties for a study.
Examples: Person, object, time point, geographic region.
1.4.2 Examples and Features
Examples: Instances of the unit of observation with recorded properties (also called instances or records).
Features: Recorded properties/attributes of examples (also called variables).
Cancer Detection: Patients as units of observation with attributes like gender, age.
Pet Selection: Persons as units with features related to pet ownership.
Spam Email: Email messages with features derived from the text.
1.4.3 Different Forms of Data
Numeric Data: Features measured in numbers.
Categorical/Nominal: Limited fixed number of possible values (e.g., gender).
Ordinal Data: Categorical variable with ordered categories (e.g., clothing sizes).
1.5 General Classes of Machine Learning Problems
1.5.1 Learning Associations
Association Rule Learning: Discovering rules between variables in large databases.
Example: Supermarket patterns (e.g., buying onions and potatoes leads to hamburgers).
Makes use of conditional probability to understand customer behavior.
1.5.2 Classification
Definition: Identifying which category new observation belongs to based on labeled data.
Example Dataset:
Score1
Score2
Result
29
43
Pass
22
29
Fail
...
Discriminants: Functions or rules used to assign labels to observations.
1.5.3 Regression
Definition: Predicting the value of a numeric variable based on observed values.
Example: Predicting car prices based on age and distance.
General approach: Assume a model with independent variables to optimize parameters for predicting outputs.
1.6 Different Types of Learning
1.6.1 Supervised Learning
Task of mapping inputs to outputs using labeled training data.
Learning can be seen as supervised by a teacher who corrects algorithm predictions.
Real-world example: Patient data for predicting health status.
1.6.2 Unsupervised Learning
Algorithms draw inferences from input data without labeled outputs.
Common method: Cluster analysis for exploratory data analysis.
1.6.3 Reinforcement Learning
Involves an agent taking actions to maximize rewards through exploration.
Example: Teaching a dog through rewards to act appropriately.
1.7 Sample Questions
Short-Answer Questions:
Define learning in machine learning.
List types of machine learning.
Differentiate between classification and regression.
Distinguish between supervised and unsupervised learning.
What is supervised classification?
Explain supervised learning with an example.
Define reinforcement learning.
What is an association rule?
Explain association rule learning and name two algorithms.
Define classification problem with an example.
Long-Answer Questions:
Define machine learning and explain learning with an example.
Describe components of the machine learning process.
Explain applications of machine learning in three domains.
Illustrate association rule learning with a real-life example.
Describe classification problems with three real-life examples.