AI for All

Online BA · Sem 6

Lesson 3 of 11

Machine Learning and Deep Learning Basics

AI for All

About the video

AI Basics for Beginners

codebasics

Study notes

AI is the broad field of making computers do tasks humans are good at; machine learning is a subfield that learns patterns from data, split into statistical ML and deep learning. Deep learning uses neural networks trained via backpropagation and suits large, unstructured data, while statistical ML suits structured, tabular data.

AI, ML and the hierarchy

  • AI: computers performing human-like tasks such as pattern recognition, vision, speech and text.
  • Not all AI is ML: regular expressions, rule-based systems and parts of robotics are AI without ML.
  • ML has two branches: statistical ML (linear regression, decision trees, k-NN, etc.) and deep learning (neural networks).
  • Neural network architectures: CNN, RNN, transformer; transformers power generative AI and agentic AI.
  • GenAI and agentic AI are applications of AI built mainly on transformers.

How machine learning works

  • Traditional programming: input + equation (rules) -> output.
  • Machine learning: input + output -> equation (pattern), stored as a model.
  • Two phases: training (learn pattern from data) and inference/prediction (model gives output for new input).
  • Example: from pairs 1->1, 2->4, 3->9, the pattern is squaring, so 4 -> 16.
  • Definition: ML trains machines on data so they make predictions without being explicitly programmed.

Types of ML problems

  • Classification: map input to a category (spam/not spam). Two categories = binary; more = multiclass (e.g., news into business, sports, tech, health).
  • Regression: predict a number (e.g., house price from area, bedrooms, age).
  • Supervised learning: trained on labeled input-output pairs (x, y); requires labeling effort.
  • Unsupervised learning: finds patterns/structure in unlabeled data, e.g., clustering (K-means, DBSCAN, hierarchical) and outlier detection.
  • Tools: Python, Pandas, NumPy, Matplotlib, Seaborn, Jupyter, scikit-learn, XGBoost.

Deep learning and neural networks

  • Structured data has rows and columns; unstructured data (images, text, audio, video) has no fixed structure.
  • Fixed rules can't detect features like whiskers that change position, so neural networks are used.
  • Layers: input layer, hidden layers, output layer; each neuron handles a sub-task and passes a score (0-1) forward using weights.
  • Training: start with random weights, compare output to the correct label, then backpropagate the error so neurons adjust weights (using derivatives); repeat over many examples.
  • Deep learning: ML technique using neural networks to learn from large amounts of data, mimicking the brain's pattern recognition.
  • Architectures: feed-forward (information flows input to output), RNN (feedback loop), CNN, transformer.
  • Frameworks: PyTorch (Meta, popular, beginner-friendly) and TensorFlow (Google, finer control); GPUs are needed for training.

Choosing statistical ML vs deep learning

  • Simple features / structured tabular data -> statistical ML.
  • Complex features / unstructured data (images, video, text, audio) -> deep learning.
  • Large volume of training samples -> deep learning usually performs better.

Key terms

Machine learning
Training machines on data so they make predictions without explicit programming.
Deep learning
ML technique using neural networks to learn from large amounts of data.
Classification
Predicting a category for an input (binary or multiclass).
Regression
Predicting a continuous numeric value.
Supervised learning
Learning from labeled input-output pairs.
Unsupervised learning
Finding patterns or groups in unlabeled data.
Clustering
Grouping similar data points; also helps detect outliers.
Backpropagation
Sending the output error back through the network so each neuron adjusts its weights.
Hidden layer
Intermediate network layer combining earlier outputs into higher-level features.

Takeaways

  • Traditional programs take input + rules to give output; ML takes input + output to learn the rules (model).
  • Classification predicts categories, regression predicts numbers; supervised needs labels, unsupervised does not.
  • Neural networks learn by adjusting weights through backpropagation of errors.
  • Use statistical ML for structured data, deep learning for large unstructured data.
Contribute

Was this lesson helpful?

We read every rating and fix the weakest lessons first.