inPace
All coursesكل الدورات

Machine Learning refresh 3: unsupervised learning, recommenders and reinforcement learning

  • about 7 h of lessonsحوالي 7 ساعة من الدروس
  • 8 modulesوحدات · 15 lessonsدروس
  • Englishالإنجليزية

An advanced refresh of part 3 of Andrew Ng's Machine Learning Specialization, with the original slides inside each lesson: k-means, anomaly detection, collaborative and content-based recommenders, retrieval and ranking, reinforcement learning, the Bellman equation and deep Q-learning, plus PCA and an interview drill. Plan: about 9 days, 1 to 1.5 hours a day. Slides by DeepLearning.AI (CC BY-SA 2.0, non-commercial).

byمن إعداد inPace checkedموثّق

machine learningandrew ngclusteringrecommender systemsreinforcement learninginterview

On these roadmaps:ضمن هذه المسارات: Deep learning, with a machine learning refresh, Machine learning, from the maths up

What's insideمحتوى الدورة

Each module ends with tasks. The next module opens when they're done.تنتهي كل وحدة بمهام، وتُفتح الوحدة التالية عند إنجازها.

  1. Day 1: Clustering with k-means 2 lessonsدروس · 45 min د
    • Start here10 min د
    • The k-means algorithm and its objectiveslidesشرائح35 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  2. Day 2: Anomaly detection 2 lessonsدروس · 45 min د
    • Density estimation with Gaussiansslidesشرائح30 min د
    • Going further: modern options15 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  3. Days 3-4: Recommenders: collaborative filtering 2 lessonsدروس · 60 min د
    • Learning user and item vectors togetherslidesشرائح35 min د
    • Mean normalization and TensorFlowslidesشرائح25 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  4. Day 5: Content-based filtering at scale 1 lessonsدروس · 35 min د
    • Two towers, retrieval and rankingslidesشرائح35 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  5. Day 6: Reinforcement learning: returns, policies and Q 2 lessonsدروس · 55 min د
    • States, actions, rewards and returnsslidesشرائح30 min د
    • The state-action value function Qslidesشرائح25 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  6. Day 7: The Bellman equation and continuous states 2 lessonsدروس · 60 min د
    • Bellman, and randomnessslidesشرائح30 min د
    • Continuous states and learning Q with a networkslidesشرائح30 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  7. Day 8: Deep Q-learning in practice 2 lessonsدروس · 45 min د
    • ε-greedy, mini-batches and soft updatesslidesشرائح30 min د
    • Going further: what interviewers may ask15 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة
  8. Day 9: PCA, and the interview drill 2 lessonsدروس · 60 min د
    • PCA in 15 minutes20 min د
    • 25 questions, short answers40 min د
    Practical taskمهمة عمليةExplain in your wordsاشرح بكلماتكQuizاختبار · 4 questionsأسئلة

Read a lesson firstاقرأ درسًا أولًا

The k-means algorithm and its objective

Clustering groups unlabelled points that are similar: market segments, similar news, DNA patterns, astronomical data.

K-means

pick K centroids μ₁..μ_K (randomly, from the training points)
repeat:
    # 1. assign
    for each point i: c⁽ⁱ⁾ = index of the closest centroid  (min ‖x⁽ⁱ⁾ − μ_k‖²)
    # 2. move
    for each k: μ_k = mean of the points assigned to k

(If a cluster gets no points, drop it or re-initialize it.)

The cost it minimizes (distortion)

J(c, μ) = (1/m) Σᵢ ‖x⁽ⁱ⁾ − μ_c⁽ⁱ⁾‖²

Step 1 minimizes J over the assignments, step 2 over the centroids, so J never goes up. If it does, there's a bug. It converges, but to a local minimum.

Initialization and choosing K

  • Run k-means 50 to 1,000 times with different random starts; keep the lowest J. (k-means++ picks spread-out starts and is the scikit-learn default.)
  • Choosing K: the elbow method is often unclear. Better: choose by the downstream purpose (T-shirt sizes S/M/L vs XS-XL: what does the business need?).

Going further

  • K-means assumes round, similar-size clusters and needs scaled features. For odd shapes use DBSCAN; for soft assignments, Gaussian mixture models.
  • Silhouette score is a common way to compare K when there's no downstream measure.

Licenseالرخصة: CC-BY-SA-4.0 · Updatedآخر تحديث 2026-11-13

Slides: Machine Learning Specialization by DeepLearning.AI and Stanford Online (Andrew Ng), shared by DeepLearning.AI under Creative Commons BY-SA 2.0 for non-commercial educational use. Notes, questions and tasks: inPace.

Add to inPaceأضف إلى inPace