Class Notes: How Machine Learning Works
Introduction to Machine Learning
Machine Learning (ML) is a branch of Artificial Intelligence that enables computers to learn from
data without being explicitly programmed. Instead of following fixed rules, ML algorithms find
patterns and make decisions based on past experiences.
How Machine Learning Works
The process of machine learning typically involves several key steps, from collecting data to making
predictions. These steps help convert raw data into meaningful insights.
• 1. Data Collection – Gather raw data from various sources such as sensors, files, or the
internet.
• 2. Data Preprocessing – Clean the data by removing errors, handling missing values, and
normalizing it for consistency.
• 3. Feature Selection – Identify the most relevant inputs (features) that affect the outcome.
• 4. Model Selection – Choose a machine learning algorithm (e.g., Linear Regression, Decision
Tree, Neural Network).
• 5. Training – Feed the data into the model so it can learn patterns and relationships.
• 6. Testing – Evaluate the model’s performance using unseen data to check accuracy.
• 7. Prediction – Use the trained model to make predictions or decisions on new data.
• 8. Optimization – Tune model parameters to improve accuracy and performance.
Types of Machine Learning
• 1. Supervised Learning – The model learns from labeled data (input-output pairs). Example:
predicting house prices.
• 2. Unsupervised Learning – The model finds patterns or groupings in unlabeled data. Example:
customer segmentation.
• 3. Reinforcement Learning – The model learns through trial and error, receiving rewards or
penalties. Example: training robots or game AI.
Common Machine Learning Algorithms
• • Linear Regression – Predicts continuous values (e.g., salary, temperature).
• • Logistic Regression – Used for binary classification (e.g., spam or not spam).
• • Decision Trees – Splits data into branches to make decisions.
• • K-Nearest Neighbors (KNN) – Classifies data based on similarity to neighbors.
• • Support Vector Machines (SVM) – Separates data into classes with a decision boundary.
• • Neural Networks – Mimics the human brain for complex tasks like image recognition.
Conclusion
Machine learning is revolutionizing industries by enabling systems to learn and adapt automatically.
From virtual assistants to medical diagnostics and financial forecasting, ML applications are vast
and growing rapidly. Understanding how it works is the first step toward building intelligent systems.