Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 8

AI Case Studies: From Concept to Viable Project

Recommended resources

Welcome to the final lesson of our course. We have journeyed from the fundamental definition of AI to the inner workings of machine learning models and the powerful capabilities of deep neural networks. In our last session, we drew a clear line between traditional Machine Learning and Deep Learning, focusing on their differences in feature engineering, data requirements, and interpretability.

Now, it's time to see these concepts in action and synthesize everything you've learned. This lesson will bring our theoretical knowledge into the practical world. We will analyze two distinct AI case studies—spam filtering and medical image diagnosis—to see how different problems demand different solutions. By mapping these applications to the specific ML and DL techniques we've covered, you'll see the decision criteria from our last lesson come to life. Finally, we'll conclude with a structured Q&A framework designed to guide the selection and planning of any new AI project. This will equip you with a solid, high-level blueprint for turning an idea into a viable AI application.

Case Study 1: Taming the Inbox with Machine Learning

Every day, billions of spam emails are sent. They aren't just an annoyance; they can be vectors for scams and malware. Early spam filters relied on simple, hard-coded rules, such as blocking certain sender addresses or flagging emails containing specific words like "viagra" or "lottery." However, spammers quickly adapted, and these rule-based systems became ineffective. This is a classic scenario where Machine Learning provides a more robust, adaptive solution.

An AI-powered spam filter treats this as a supervised classification problem. The goal is to train a model that can look at a new email and classify it as either "spam" or "ham" (not spam).

The flowchart below illustrates the typical workflow for such a system.

This flowchart shows the process of building an email spam classifier. It begins with raw email data, which is preprocessed and used to extract features. These features then feed into a training phase to build an ML model, which is subsequently used by a neural network classifier to sort incoming emails into 'Spam' or 'Non-Spam'.

Let's break down this process using an excellent article from WeCloudData that details each step.

Using Machine Learning to Distinguish Between Spam and Legitimate Emails

This article provides a detailed walkthrough of building a spam classifier, which serves as a perfect case study for a traditional ML application.

First, read the introduction to understand why ML is a superior approach to classical, rule-based methods. Next, jump to the section on Feature Engineering. This is the crucial step where raw text is converted into signals for the model. Focus on the types of features that might be extracted: word counts, presence of specific keywords, or even the frequency of capital letters. This connects directly to the manual feature engineering we discussed in the last lesson. Then, review the brief section on Training the Model. This explains how the engineered features are used to teach the algorithm. Finally, read the section on Model Interpretation. Pay close attention to the evaluation metrics mentioned: Accuracy, Precision, and Recall. In spam filtering, a high precision is vital to ensure that legitimate emails are not incorrectly marked as spam (a false positive).

Mapping to Techniques:

As a classic classification task with structured or semi-structured features (word counts, frequencies, etc.), this problem is well-suited for traditional ML algorithms. The video from Maven Analytics helps us pinpoint which ones to start with.

Which Machine Learning Algorithm Should You Use For Your Data Science Project?

This video provides a practical decision tree for choosing an ML algorithm.

Watch the segment on classification algorithms. The speaker explicitly mentions spam detection as an example and recommends starting with Logistic Regression due to its simplicity and interpretability, then moving to more complex tree-based models like Random Forest for higher performance.

This case study is a prime example of a problem where traditional ML shines. The features, while requiring some domain knowledge to create, are relatively straightforward, and the models are transparent enough to be tuned effectively.


Case Study 2: Seeing the Unseen with Deep Learning

Now let's turn to a very different domain: medical imaging. Analyzing medical scans like MRIs, X-rays, or retinal photographs requires years of training. AIs that can assist in this process could make healthcare more accessible and efficient.

One powerful example is the detection of diabetic retinopathy, a complication of diabetes that can cause blindness. It's identified by looking for subtle signs in retinal fundus images, such as micro-aneurysms or hemorrhages.

This is a problem tailor-made for Deep Learning. Why?

  • Unstructured Data: The input is a raw image.
  • Complex Features: The visual patterns indicating disease are incredibly complex, nuanced, and hard to describe with rules. Manually engineering features for this task would be nearly impossible.
  • Performance is Key: High accuracy is critical for patient outcomes.

The go-to architecture for this kind of image analysis is the Convolutional Neural Network (CNN), which we touched upon in a previous lesson. The following video from the Journal of the American Medical Association (JAMA) provides one of the best explanations of how CNNs work in this exact context.

Machine Learning For Medical Image Analysis - How It Works

This video brilliantly demystifies how a CNN analyzes medical images, using diabetic retinopathy as its primary case study. It uses excellent analogies that are perfect for explaining this complex topic.

First, watch the introduction to see the real-world application and get a high-level overview of CNNs. Next, focus on the explanation of convolution and filters, which uses a stencil analogy. This helps build intuition for how a CNN "looks for" patterns. The core of the explanation is the written language analogy. Pay close attention to how it illustrates the hierarchical nature of CNNs: learning letters, then words, then phrases. Finally, watch how this analogy is translated back to images, where the network learns edges, then textures, then more complex concepts like blood vessels and lesions.

The video shows how a DL model automatically learns the relevant features, layer by layer, directly from the image pixels. This is the end-to-end learning we contrasted with manual feature engineering in our last lesson. This case study perfectly illustrates a scenario where the complexity of the data makes Deep Learning not just a good choice, but a necessary one.


Q&A Framework: How to Choose a Viable AI Project

We've seen two very different problems with two different AI solutions. This leads to the final, critical topic: how do you approach a new problem? The following Q&A framework is designed to serve as a guide for students or anyone starting an AI project. It synthesizes the key decision points from across our entire course.

Q1: What problem are you trying to solve, and is it an AI problem?

  • Answer: First, clearly define the problem in plain language. Then, ask if the solution requires learning from examples rather than being solvable with a fixed set of instructions or mathematical formulas. A calculator follows explicit instructions, so it's not AI. A spam filter that learns from new types of spam is an AI problem.

Q2: What is the primary goal? Prediction, Grouping, or Strategy?

  • Answer: Your goal determines the type of machine learning you'll use.
    • Prediction/Classification (Supervised Learning): Are you trying to predict a number (e.g., house price) or a category (e.g., spam/ham, diabetic retinopathy)? If so, you need labeled data (examples with correct answers).
    • Grouping/Segmentation (Unsupervised Learning): Are you trying to discover natural groups or structures in your data without predefined labels (e.g., segmenting customers into different personas based on behavior)?
    • Strategy/Decision-Making (Reinforcement Learning): Are you trying to teach an agent to make a sequence of optimal decisions to maximize a reward (e.g., winning a game, controlling a robot)?

Q3: What data do you have, and is it suitable?

  • Answer: Data is the fuel for AI. Ask yourself:
    • Quantity: Do you have enough data? As the DataCamp article reminded us, traditional ML can work with smaller datasets, but Deep Learning is data-hungry.
    • Quality: Is the data clean and relevant? "Garbage in, garbage out" is the first rule of machine learning.
    • Labels: For supervised learning (the most common type), do you have accurate labels? If not, can you get them? Labeling data can be a massive project in itself.

Q4: Should you use traditional Machine Learning or Deep Learning?

  • Answer: This is the core strategic decision we prepared for in the last lesson. Use the case studies as your guide.

Deep Learning (DL) vs Machine Learning (ML): A Comparative Guide | DataCamp

Let's revisit this article for a concise set of decision criteria.

Read the section "Decision Criteria". It summarizes the choice into four key factors: data availability, computational power, task complexity, and interpretability.

  • Use ML if: Your data is structured (like spreadsheets), your dataset is small, you have limited computing power (a standard laptop), and you need to be able to explain the model's decisions (like in banking). The spam filter is a good example.
  • Use DL if: Your data is unstructured (images, raw text, audio), you have a massive dataset, you have access to powerful hardware (GPUs), and raw performance is more important than explainability. The medical imaging case study is the perfect example.

Q5: How will you define and measure success?

  • Answer: You can't improve what you can't measure. Before you start, define your evaluation metrics.
    • For regression, this might be Mean Absolute Error (how far off are your predictions on average?).
    • For classification, it's often more than just overall accuracy. As we saw with the spam filter, you must consider the costs of different errors by looking at precision (avoiding false positives) and recall (avoiding false negatives). Is it worse to let one spam email through, or to accidentally send a critical business email to the spam folder? The answer determines which metric you prioritize.

Conclusion

This lesson, and this course, has been about building a foundational understanding of AI by moving from high-level concepts to practical applications. We've seen that AI is not a single, monolithic technology, but a diverse field of tools and techniques.

Key Takeaways:

  • Real-world AI applications are designed to solve specific problems, and the choice of technique (e.g., traditional ML vs. DL) is a direct consequence of the problem's nature.
  • Problems with structured data and engineerable features (like spam filtering) are often well-served by traditional ML models like Logistic Regression.
  • Problems with unstructured data and highly complex patterns (like medical image analysis) often require the power of Deep Learning models like CNNs to perform automatic feature extraction.
  • Starting a new AI project requires a systematic approach: clearly define the problem and goal, assess your data, choose the right class of algorithm, and establish how you will measure success.

You now have a complete, end-to-end overview of the AI landscape, from basic definitions to the workflow of a real project. This provides a strong conceptual framework for the presentation you aim to build, allowing you to explain not just what AI is, but how it's put to work.