AI Lab 03: No-Code Machine Learning & Feature Weights with Orange Data Mining
- Estimated Time: 5 hours
- Tools Required: Orange Data Mining (Completely free, open-source visual programming software)
- Hardware Required: A Windows, Mac, or Linux computer to install and run the software.
Lab Objectives
- Learn how to build a complete machine learning workflow (Data → Model → Evaluation) using visual drag-and-drop components.
- Understand the difference between rows (instances/passengers) and columns (features/attributes) in a dataset.
- Core Task: Predict Titanic survival rates using different algorithms and observe which "Features" (e.g., gender, age, ticket class) hold the most "weight" in the AI's decision-making process.
5-Hour Schedule & Step-by-Step Breakdown
Phase 1: Installation & Workspace Setup (0.5 Hour)
Phase 1: Installation & Workspace Setup (0.5 Hour)
- Go to the Orange Data Mining website, download the installer for your operating system, and complete the installation.
- Open the Orange application and click New to create a blank canvas.
- Familiarize yourself with the interface:
- Canvas: The large blank area where you will build your workflow.
- Widgets (Left Panel): The tools you drag onto the canvas, categorized into Data, Visualize, Model, and Evaluate.
- Links: The lines you draw to connect widgets, allowing data to flow from left to right.
Phase 2: The Three Classification Experiments (3 Hours)
Phase 2: The Three Classification Experiments (3 Hours)
This phase requires you to construct a predictive AI model using real historical data from the Titanic passenger manifest.
Experiment 1: Loading & Exploring the Data (1 Hour)
- Open the Data menu on the left. Drag the Datasets widget onto the canvas.
- Double-click the widget, search for Titanic, select it, and close the window.
- Drag a Data Table widget onto the canvas. Click the right edge of the Datasets widget and drag a line to connect it to the Data Table.
- Double-click the Data Table. You will see the raw data: rows representing individual passengers and columns representing features (e.g., sex, age, ticket class). Notice the "survived" column is highlighted in gray — this is our "Target" (what the AI must learn to predict).
- Drag a Distributions widget (under Visualize) and connect the Datasets widget to it. Explore how survival rates differ visually between men and women, or between 1st class and 3rd class.
Experiment 2: Training the AI Models (1 Hour)
- Open the Model menu. Drag a Tree (Decision Tree) widget and a Logistic Regression widget onto the canvas.
- Connect your Datasets widget to both of these model widgets. Congratulations! The models are now actively analyzing the passenger data and learning the survival patterns.
- Open the Visualize menu, drag a Tree Viewer widget, and connect the Tree widget to it.
- Double-click the Tree Viewer to visually explore the actual "decision rules" the AI created (e.g., "If Sex = Female and Class = 1st, then..."). Click on the nodes to see the survival probabilities.
Experiment 3: Evaluating Performance & Feature Importance (1 Hour)
- Open the Evaluate menu and drag the Test and Score widget onto the canvas.
- You need to connect three things to this widget:
- Connect the Datasets widget to it (this provides the test data).
- Connect the Tree widget to it.
- Connect the Logistic Regression widget to it.
- Double-click Test and Score. Look at the CA (Classification Accuracy) column—which model predicted survival more accurately?
- Go back to the Data menu, drag a Rank widget, and connect the Datasets widget to it. Double-click it. This tool calculates "Feature Importance." Observe which feature holds the most "weight" in determining who lived and who died.
Phase 3: Writing the AI Lab Journal (1.5 Hours)
Phase 3: Writing the "AI Lab Journal" (1.5 Hours)
Complete an "AI Lab Journal" in a Word or Markdown file. This will serve as tangible proof of your 10-hour weekly course workload. The journal must follow the structure below:
AI Lab Journal Report
AI Lab Journal: Orange Data Mining & Feature Weights Report
1. Lab Setup & Key Definitions
- What is a "Target Variable"? Explain what the AI was specifically trying to predict in this dataset.
- Which models did you compare? List the two AI algorithms you dragged onto the canvas.
2. Model Performance & Feature Ranking Table
| Model / Analysis | Results |
|---|---|
| Highest Accuracy Model | [Tree or Logistic Regression?] |
| Classification Accuracy (CA) | [e.g., 0.785] |
| Top 3 Most Important Features | 1. ______ 2. ______ 3. ______ (Found via the Rank widget) |
3. Test Results & Screenshot Evidence
- Decision Tree Analysis: Explain one logical "rule" you found inside the Tree Viewer. For example, according to the AI, what happened to adult males in 3rd class?
[Insert a screenshot of your Tree Viewer graph here]
- Test and Score Observation: Briefly describe which model performed better and if the overall accuracy was higher or lower than you expected.
[Insert a screenshot of your Test and Score panel here]
4. Core Reflections
- Question 1: Based on your Rank widget and Tree Viewer, what was the single most important feature that determined survival on the Titanic? Does the AI's logic align with the historical "women and children first" protocol?
- Question 2: "Garbage In, Garbage Out." If we deliberately deleted the "Sex" and "Ticket Class" columns from the dataset before training, what would happen to the AI's accuracy? Why is data quality just as important as the algorithm itself?
🎯 Pro-Tips for Students (How to Avoid Common Pitfalls)
- Watch the Flow of Data: Pay attention to the direction of the lines (links) connecting your widgets. Data must always flow from left to right (from Datasets → to Models → to Evaluation). If your "Test and Score" widget is empty, ensure the Datasets widget is directly connected to it!
- The "Target" is Crucial: Orange can predict "Survival" because the dataset predefined it as the Target. If you load your own Excel file in the future, you must specify which column is the "Target" in the Data Table; otherwise, the AI won't know what task to perform.