Introduction to Machine Learning
Presentation¶
Question 1:¶
Q: Which approach is described as “Data + Results → Rules”?
A) Traditional Programming
B) Manual Interpretation
C) Machine Learning
D) Earth Observation
Click to reveal answer
Correct Answer: C
In Machine Learning, you provide the data and the known results, and the computer generates the rules (patterns).
Question 2:¶
Q: What is the “Garbage In, Garbage Out” principle referring to?
A) Using too many satellites at once
B) Deleting old training data
C) The cost of commercial imagery
D) The importance of data preprocessing
Click to reveal answer
Correct Answer: D
This principle emphasizes that if your input data is poor or uncorrected, your model’s output will be inaccurate regardless of the algorithm.
Question 3:¶
Q: Supervised learning is most like:
A) Learning with an answer key
B) Sorting items without instructions
C) Discovering hidden patterns randomly
D) A system that doesn’t use input-output pairs
Click to reveal answer
Correct Answer: A
Supervised learning uses labeled data (an “answer key”) to guide the model’s learning process.
Question 4:¶
Q: Which step follows “Data Processing” in the ML workflow?
A) Problem Definition
B) Data Acquisition
C) Feature Engineering
D) Deployment
Click to reveal answer
Correct Answer: C
After cleaning data, you perform feature engineering to create new inputs (like indices) that make patterns easier for the model to see.
Question 5:¶
Q: In the context of Earth Observation (EO), “Ground Truth” refers to:
A) The height of the satellite
B) Labels or field surveys used to train/validate the model
C) The atmospheric correction of an image
D) The raw spectral bands of a Sentinel-2 image
Click to reveal answer
Correct Answer: B
Ground truth is the reference data (field surveys or manual labels) used to teach the model what the real-world surface looks like.
Question 6:¶
Q: Why is Machine Learning preferred over traditional manual interpretation for satellite data?
A) It is easier to explain.
B) It can process years of data in hours and is highly scalable.
C) It requires less data to be accurate.
D) It never makes errors.
Click to reveal answer
Correct Answer: B
Machine Learning allows for rapid, large-scale processing of satellite data that would be impossible for humans to do manually.
Question 7:¶
Q: Which metric is used to evaluate the performance of a classification model?
A) Biomass per hectare
B) Atmospheric haze
C) Spectral band
D) Confusion Matrix
Click to reveal answer
Correct Answer: D
A Confusion Matrix is a table used to visualize how many pixels were correctly or incorrectly classified.
Question 8:¶
Q: If a model shows “Poor validation” results, the iterative workflow suggests:
A) Immediately deploying the model.
B) Redefining the problem or going back to data acquisition.
C) Stopping the project entirely.
D) Removing all feature engineering.
Click to reveal answer
Correct Answer: B
The Machine Learning workflow is iterative; if validation fails, you must go back to re-evaluate your data or problem definition.
Question 9:¶
Q: Why is “Problem Definition” considered 50% of a project’s success?
A) Because it is the longest step to complete.
B) It replaces the need for data acquisition.
C) It is where the actual code is written.
D) It determines the resources, required accuracy, and the decisions the model will support.
Click to reveal answer
Correct Answer: D
Proper planning ensures the model solves the right problem with the right resources.
Question 10:¶
Q: What is the main goal of “Validation & Evaluation”?
A) To ensure the model generalizes well to new data and detect overfitting.
B) To make the model run faster.
C) To collect more training labels.
D) To choose a new programming language.
Click to reveal answer
Correct Answer: A
Validation proves the model works on data it hasn’t seen before, ensuring it isn’t just “memorizing” the training set.
Question 11:¶
Q: You’re classifying land cover and find that NDVI has the highest feature importance. What should you conclude?
A) NDVI is the only feature needed; remove all others
B) NDVI contributes most to reducing impurity, but other features may still be valuable
C) NDVI causes the land cover types (causal relationship)
D) All other features are completely irrelevant
Click to reveal answer
Correct Answer: B
High importance means NDVI is most useful for discrimination, but:
Other features may capture complementary information
Importance doesn’t imply causation
Correlated features share importance
Context and domain knowledge matter!
Question 12:¶
Q: What is the primary risk of skipping “Data Processing” (Atmospheric and Geometric correction) in the ML workflow?
A) The model will run too slowly.
B) You will be unable to use Python for the analysis.
C) The features (e.g. Spectral Indices) will be inconsistent across different dates and locations.
D) The model will automatically choose the wrong algorithm.
Click to reveal answer
Correct Answer: C
Without correction, the “numbers” the computer sees are affected by the atmosphere or misaligned pixels, leading to “Garbage In, Garbage Out.”
Question 13:¶
Q: Look at the following workflow description: “The model is trained on 2023 data, but when applied to 2024 data, the accuracy drops because the 2024 images were not atmospherically corrected.” Which concept does this illustrate?
A) Feature Learning.
B) Garbage In, Garbage Out.
C) Problem Definition.
D) Unsupervised Discovery.
Click to reveal answer
Correct Answer: B
This is the classic example of how poor data preparation (lack of correction) leads to a failing model.
Question 14:¶
Q: Your Land Cover model is confusing “Cloud Shadows” with “Water Bodies.” To resolve this complex decision boundary, which action is most aligned with the iterative ML workflow?
A) Add Topographic Features (Elevation/Slope) to help the model distinguish shadows on slopes from flat water.
B) Skip Data Processing and go straight to Deployment.
C) Use a smaller training dataset to simplify the model.
D) Remove the NIR band from the model.
Click to reveal answer
Correct Answer: A
Adding new, relevant “features” (like topography) is the standard way to fix classification errors in an iterative workflow.
Question 15:¶
Q: Your model for mapping rice paddies performs perfectly in the training area but fails completely when applied to a different province. According to the iterative nature of ML, what is the most likely cause?
A) The model has overfitted to the specific spectral signature of the training province.
B) You used Level-2A imagery instead of Level-1C.
C) Python is not capable of multi-province analysis.
D) The problem was not defined in Step 1.
Click to reveal answer
Correct Answer: A
Overfitting occurs when a model memorizes the training data too well and loses the ability to “generalize” to new geographic areas.
Bonus Question: Computation!¶
Scenario: You’re mapping forest fire damage. The confusion matrix shows:
Actual Burned: 100 pixels
Predicted as Burned: 150 pixels
Correctly identified Burned: 90 pixels
Q: Calculate precision and recall for the “Burned” class. Which is more important for this application?
Definitions:
Precision = Percentage of predicted class that is correct (per class)
Recall = Percentage of actual class correctly identified (per class)
Click to reveal answer
Answers:
Precision = 90 / 150 = 0.60 (60%)
Of pixels predicted as burned, 60% actually were
Recall = 90 / 100 = 0.90 (90%)
Of actual burned pixels, we found 90%
More Important: Recall
For fire damage assessment:
High recall is critical: We don’t want to miss burned areas (false negatives could delay aid)
Lower precision is acceptable: False alarms can be verified with field checks
It’s better to overestimate damage than underestimate
Coding Exercise 1: Crops VS Weed¶
Scenario: You have a small robot in a field. It takes a “Greenness Score” and a “Height” reading for every plant it sees. You want to train a model to distinguish between a Crop (what we want) and a Weed (what we want to remove).
Step 1: Set Up the “Training Data”¶
Create a list of data points and a list of correct answers (labels).
X (Features): Greenness and Height.
y (Labels/Results): 0 for Weed, 1 for Crop.
Create a list for features: [Greenness, Height]
Greenness = 80, 78, 25, 30
Height = 10, 11, 2, 3
Create a list for labels:
Average Crop Greenness: ~82
Average Weed Greenness: ~32
Click to reveal code
# Each sub-list is [Greenness, Height]
# This is our 'Training Data'
training_data = [
[80, 10], # Crop
[78, 11], # Crop
[25, 2], # Weed
[30, 3] # Weed
]
# These are the correct answers (Labels)
labels = [1, 1, 0, 0]Step 2: Create the “Learning” Function¶
Write a function that acts as the “algorithm”. It must look at the data and find the midpoint between the average Crop and the average Weed. This midpoint is the Decision Boundary.
Click to reveal code
def crop_weed_detect(data, labels):
# Find all Greenness values for Crops (Label 1)
crops = [data[i][0] for i in range(len(labels)) if labels[i] == 1]
# Find all Greenness values for Weeds (Label 0)
weeds = [data[i][0] for i in range(len(labels)) if labels[i] == 0]
# Calculate the averages
avg_crop = sum(crops) / len(crops)
avg_weed = sum(weeds) / len(weeds)
# Return the halfway point (The Pattern)
return (avg_crop + avg_weed) / 2
# Train the model and save the pattern
learned_pattern = crop_weed_detect(training_data, labels)Step 3: Test on “Unseen” Data (Inference)¶
We have a new set of data with 4 plants. Create a script to use the “learned pattern” or “model” to label them.
Note: Use a for loop to process the new plants.
data = [ [75, 9], [28, 4], [85, 12], [20, 1] ]
Click to reveal code
data = [[75, 9], [28, 4], [85, 12], [20, 1]]
for plant in data:
greenness = plant[0]
# Apply the learned_pattern or "model"
if greenness > learned_pattern:
print(f"Greenness {greenness}: Predicted as CROP")
else:
print(f"Greenness {greenness}: Predicted as WEED")Step 4: Critical Thinking & Discussion¶
Answer these questions based on the produced script:
Q1. If you accidentally swapped the labels in Step 1 (calling the small plants “Crops”), what would happen to the predictions in Step 3?
Click to reveal answer
The model would learn a “reversed” pattern and fail (Garbage In, Garbage Out). This is the importance of securing a good and quality training and validation data in any machine learning analysis.
Q2. If the model predicts a plant is a “CROP”, but the actual truth is “WEED,” this is called:
A) A successful pattern.
B) Feature Engineering.
C) A misclassification (Error).
D) Deployment.
Click to reveal answer
Correct Answer: C
An error where the prediction doesn’t match the truth.
Q3. If we want our model to be more accurate, we might add “Leaf Texture” or “Root Length” to our data. This process is called:
A) Data Acquisition
B) Problem Definition
C) Feature Engineering
D) Result Formatting
Click to reveal answer
Correct Answer: C
Adding new “numbers” to help the computer find better patterns.
Q4. What happens if we try to use our “Crop vs. Weed” model to identify a “Coconut Tree”?
A) The model will automatically learn what a coconut tree is.
B) The model will fail because “Coconut Tree” was not in the Training Data.
C) The model will crash the computer.
D) The model will ask the farmer for a photo.
Click to reveal answer
Correct Answer: B
Models can only recognize patterns they have been “shown” during training.
Q5. What does the learned_pattern variable in our code represent in Machine Learning terms?
A) The Raw Data
B) The Validation Score
C) The Decision Boundary
D) The Garbage In
Click to reveal answer
Correct Answer: C
It is the line or threshold that separates the two classes that serves as the “cutoff” point for a decision.
In complex models, the boundary exists mathematically in hundreds of dimensions, making it impossible for a human to visualize.