In the previous chapter, Repository Structure, we learned how to navigate the "Library" of folders to find the topic we want.
Now, we are going to pull a book off the shelf and open it. But ML-For-Beginners lessons aren't just pages of text. They are interactive experiences. This chapter explains the Lesson Structureβthe standard recipe used for every single topic in the curriculum.
Learning a hard subject like Machine Learning by reading a giant PDF is difficult. You might fall asleep, or worse, think you understand it but fail when you try to write code.
To solve this, we use a specific Learning Pattern. We break every lesson into small, interactive pieces to keep your brain engaged.
Let's go back to our goal: Predicting pumpkin prices. When you open the "Regression" folder, you don't just find one file. You find a system designed to guide you.
The Goal: Move from "I don't know what Regression is" to "I can write code to predict prices."
The Solution: You follow a path: Test $\rightarrow$ Read $\rightarrow$ Code $\rightarrow$ Test.
Every lesson in the curriculum is built with five distinct components. Think of it like a 5-course meal.
Before you start reading, we ask you 3 simple questions.
README.md)This is the main text. It explains the theory without getting bogged down in complex math.
.ipynb)This is where the action happens. You switch from reading to running code.
At the bottom of the lesson, there is a challenge. It usually asks you to take what you learned and apply it to a slightly different dataset.
Finally, you take another 3-question quiz.
When you start a lesson, you should follow the flow linearly. Do not skip the code!
Imagine you are a computer program processing a lesson. Your logic would look like this:
# The workflow of a student taking a lesson
def complete_lesson(lesson_name):
# 1. Warm up
take_quiz("pre-quiz")
# 2. Learn and Practice
read_text(lesson_name)
run_code_notebook()
# 3. Verify
take_quiz("post-quiz")
Explanation: This pseudo-code shows the linear progression. You start with a quiz, consume the content (text and code), and end with a quiz.
How do we connect a static text file to an interactive quiz and a code notebook? We use Hyperlinks and Folder Conventions.
The lesson isn't one big app; it's a collection of files linked together.
README.md..ipynb file to run the code.
If you look at the raw source code of a lesson's README.md, you will see how these components are stitched together.
The Quiz Link: At the top of every lesson, there is a special badge or link.
<!-- Top of a lesson file -->
# Introduction to Regression
[](https://quiz-app/quizzes/regression)
In this lesson, you will learn how to...
Explanation: This is standard Markdown. It wraps an image in a link. When clicked, it takes you to the quiz website.
The Assignment Section: At the bottom, there is a standard header for the homework.
<!-- Bottom of a lesson file -->
## π Challenge
Try to use the 'New-York-Data.csv' file instead of the Pumpkin data.
Can you predict prices there?
## [Post-Quiz](https://quiz-app/quizzes/regression)
Explanation: The structure is consistent. Challenge first, then the final link to the Post-Quiz.
You might be wondering: "What if I get stuck on the Challenge?"
Inside every lesson folder, there is often a hidden sub-folder called solution.
2-Regression/
βββ 1-Tools/
β βββ README.md <-- The Lesson
β βββ notebook.ipynb <-- The Code
β βββ solution/ <-- The Answers
β βββ solution.ipynb
This ensures that while we challenge you, we never leave you completely stuck.
In this chapter, we unpacked the Lesson Structure:
We have the map (Repository Structure) and the guidebook (Lesson Structure). Now, we need to set up the actual engine that runs the code. It is time to install Python.
Generated by Code IQ