Skip to main content

Lesson 10 of 12

What You Built and Next Steps

You built a complete, working AI application. Let us review what you did and where to go next.

10 minBy Priygop Editorial TeamUpdated 2026Peer Reviewed & Verified

What You Accomplished

  • Loaded and explored a labeled text dataset
  • Converted raw text to numerical features using CountVectorizer
  • Split data into training and testing sets to ensure honest evaluation
  • Trained a Naive Bayes classifier using scikit-learn
  • Evaluated the model using accuracy, precision, recall, and F1 score
  • Predicted labels for new, unseen email texts with confidence scores
  • Improved the model with TF-IDF and compared multiple algorithms
  • Saved and loaded the trained model using joblib
  • Designed a Flask API to serve the model to other applications
Diagram
Loading diagram…

Educational visual guide for what you built and next steps.

Next Projects to Try

  • Sentiment analysis: classify movie reviews or product reviews as positive or negative
  • Disease prediction: predict diabetes risk from health metrics (the Pima Indians dataset is a classic)
  • House price prediction: predict housing prices using regression (Boston or Ames housing datasets)
  • Image classifier: classify handwritten digits using the MNIST dataset and a CNN
  • Chatbot with LLM API: build a domain-specific chatbot using the OpenAI or Anthropic API

Key Takeaways from This Module

  • A complete AI application follows: data -> features -> train -> evaluate -> predict -> save -> serve
  • CountVectorizer converts text to word count features. TF-IDF weights rare, informative words higher
  • Always split data into train and test sets. Never test on training data
  • Naive Bayes is fast and works well for text classification
  • Evaluate models with precision, recall, and F1, not just accuracy
  • Save both the model AND the vectorizer together for deployment
  • Flask or FastAPI turn your model into an HTTP endpoint others can call

Key Takeaways

  • You built a complete, working AI application.
  • Loaded and explored a labeled text dataset
  • Converted raw text to numerical features using CountVectorizer
  • Split data into training and testing sets to ensure honest evaluation

Topics in This Module

0/12 done