Skip to content

Chapter content and newsletter#2

Merged
cursor[bot] merged 8 commits intomainfrom
cursor/chapter-content-and-newsletter-b7f3
Mar 6, 2026
Merged

Chapter content and newsletter#2
cursor[bot] merged 8 commits intomainfrom
cursor/chapter-content-and-newsletter-b7f3

Conversation

@luigipascal
Copy link
Owner

Introduce Chapter 8: Unsupervised Learning and implement a new chapter notification system for subscribers.


Open in Web Open in Cursor 

cursoragent and others added 5 commits March 6, 2026 07:22
- Header with learning objectives and time estimate
- Supervised vs unsupervised learning comparison with make_blobs visualization
- K-Means algorithm theory (initialize, assign, update)
- K-Means from scratch implementation (KMeansScratch class)
- Step-by-step iteration visualization (2x2 subplot grid)
- Cluster evaluation: inertia and silhouette score with silhouette plot
- Elbow method for choosing K (inertia + silhouette vs K)
- Scikit-learn KMeans comparison with scratch implementation
- Practical tips: assumptions, scaling, n_init, failure modes
- Summary and key takeaways

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
Rich educational notebook covering:
- PCA theory and from-scratch NumPy implementation
- PCA with scikit-learn (comparison with scratch version)
- t-SNE for non-linear 2D visualization with perplexity analysis
- Anomaly detection: Z-Score and Isolation Forest
- Full customer segmentation capstone project:
  synthetic data generation, scaling, PCA, elbow method,
  K-Means clustering, segment profiling, and business recommendations

42 cells (23 code, 19 markdown), ~3 hours of content.

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
Covers hierarchical (agglomerative) clustering with dendrograms,
DBSCAN for density-based clustering with parameter selection,
Gaussian Mixture Models with probability contours and BIC/AIC,
and a comprehensive algorithm comparison across data geometries.

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
- 3 notebooks: clustering basics, advanced clustering, dimensionality reduction & capstone
- KMeansScratch and PCAScratch implementations in unsupervised_toolkit.py
- 5 exercises with complete solutions
- 3 SVG diagrams: clustering algorithms, dimensionality reduction, anomaly detection
- 2 synthetic datasets: customers.csv (300 rows), sensors.csv (200 rows)
- Docs: chapter overview, 3 content pages for online reading
- Updated mkdocs.yml navigation, homepage stats (8 chapters, 64h, 24 SVGs)
- Updated curriculum, syllabus, roadmap, README, and all status references

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
- Updated welcome email to highlight Chapter 8: Unsupervised Learning
- New send-chapter-notification function to email all subscribers
  about new chapter releases via Netlify Forms API + Resend
- Supports chapter_number, chapter_title, chapter_description params
- Paginates through all form submissions to find subscriber emails

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
@cursor
Copy link
Contributor

cursor bot commented Mar 6, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@netlify
Copy link

netlify bot commented Mar 6, 2026

Deploy Preview for chaptersberta ready!

Name Link
🔨 Latest commit 50ae8e5
🔍 Latest deploy log https://app.netlify.com/projects/chaptersberta/deploys/69aa8aea3473f80008855075
😎 Deploy Preview https://deploy-preview-2--chaptersberta.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

cursoragent and others added 3 commits March 6, 2026 07:58
- New deploy-succeeded.js fires automatically after each Netlify deploy
- Reads NOTIFY_CHAPTER env var to determine if a notification should be sent
- Fetches all subscribers from Netlify Forms API, sends via Resend
- Set NOTIFY_CHAPTER=8 and NOTIFY_TITLE='Unsupervised Learning' in
  Netlify env vars, then deploy to send the Chapter 8 newsletter
- Remove NOTIFY_CHAPTER after sending to prevent re-sends
- Updated netlify.toml with functions directory and env var documentation

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
- Newsletter is now driven by chapter_notification.json in the repo
- deploy-succeeded.js reads the JSON, compares chapter number against
  LAST_NOTIFIED_CHAPTER env var to prevent re-sending
- After sending, it updates LAST_NOTIFIED_CHAPTER via Netlify API
- Workflow: edit chapter_notification.json, commit, deploy — done
- Removed send-chapter-notification.js (replaced by deploy-succeeded)
- Simplified netlify.toml documentation

Co-authored-by: Luigi Pascal Rondanini  <luigi@rondanini.com>
@cursor cursor bot merged commit 50ae8e5 into main Mar 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants