Machine Learning With Python

Learning PathSkills: Image Processing, Text Classification, Speech Recognition, NLP, Deep Learning, LLMs, RAG

Machine learning lets you build systems that learn from data. This learning path walks you through practical machine learning with Python, from classical algorithms to modern LLM-powered workflows.

By completing this path, you’ll be able to:

  • Train models with scikit-learn using techniques like linear regression, k-nearest neighbors, and k-means clustering
  • Process images with Pillow and OpenCV, and build face detection and recognition tools
  • Analyze text with NLTK and spaCy, and classify sentiment using Keras and PyTorch
  • Work with LLMs through cloud APIs, local models with Ollama, and Hugging Face Transformers
  • Build RAG pipelines using LangChain, LlamaIndex, and ChromaDB

This path is for Python developers who want to add machine learning to their skill set. You should be comfortable with Python basics and ready to work with third-party libraries.

You’ll start with environment setup and core ML principles, move through computer vision and NLP, then finish with LLMs, RAG, and advanced algorithms.

Share

Machine Learning With Python

Learning Path ⋅ 30 Resources

Preparing Your Environment

Set yourself up for success on your machine learning journey. This section prepares your environment for a seamless developing and learning experience.

Tutorial

Setting Up Python for Machine Learning on Windows

In this step-by-step tutorial, you’ll cover the basics of setting up a Python numerical computation environment for machine learning on a Windows machine using the Anaconda Python distribution.

Applications of Machine Learning

See machine learning in action through real-world projects. You’ll generate images with DALL-E and build a recommendation engine using collaborative filtering.

Tutorial

Generate Images With DALL·E and the OpenAI API

Learn to use the OpenAI Python library to create images with DALL·E, a state-of-the-art latent diffusion model. In this tutorial, you'll explore creating images and generating image variations. You'll also interact with DALL·E using API calls and incorporate this functionality into your Python scripts.

Tutorial

Build a Recommendation Engine With Collaborative Filtering

Learn about collaborative filtering, which is one of the most common approaches for building recommender systems. You'll cover the various types of algorithms that fall under this category and see how to implement them in Python.

Machine Learning Principles

Understand the core principles of machine learning. You’ll learn about linear regression, neural networks, and how to properly split and prepare datasets.

Course

Starting With Linear Regression in Python

Get started with linear regression in Python. Linear regression is one of the fundamental statistical and machine learning techniques, and Python is a popular choice for machine learning.

Interactive Quiz

Linear Regression in Python

Course

Building a Neural Network & Making Predictions With Python AI

In this step-by-step course, you'll build a neural network from scratch as an introduction to the world of artificial intelligence (AI) in Python. You'll learn how to train your neural network and make accurate predictions based on a given dataset.

Course

Splitting Datasets With scikit-learn and train_test_split()

Learn why it's important to split your dataset in supervised machine learning and how to do that with train_test_split() from scikit-learn.

Exploring Computer Vision

Work with image processing and computer vision in Python. You’ll cover topics from basic image manipulation to face detection and face recognition.

Course

Process Images Using the Pillow Library and Python

Learn how to use the Python Pillow library to deal with images and perform image processing. You'll also explore using NumPy for further processing, including to create animations.

Tutorial

Image Segmentation Using Color Spaces in OpenCV + Python

In this introductory tutorial, you'll learn how to simply segment an object from an image based on color in Python using OpenCV. A popular computer vision library written in C/C++ with bindings for Python, OpenCV provides easy ways of manipulating color spaces.

Course

Traditional Face Detection Using Python

In this course on face detection with Python, you'll learn about a historically important algorithm for object detection that can be successfully applied to finding the location of a human face within an image.

Tutorial

Build Your Own Face Recognition Tool With Python

In this tutorial, you'll build your own face recognition command-line tool with Python. You'll learn how to use face detection to identify faces in an image and label them using face recognition. With this knowledge, you can create your own face recognition tool from start to finish!

Natural Language Processing

Explore Natural Language Processing (NLP) in Python. You’ll perform sentiment analysis, text classification, and work with libraries like NLTK and spaCy.

Tutorial

Sentiment Analysis: First Steps With Python's NLTK Library

Learn how to work with Python's Natural Language Toolkit (NLTK) to process and analyze text. You'll also learn how to perform sentiment analysis with built-in as well as custom classifiers!

Tutorial

Natural Language Processing With Python's NLTK Package

In this beginner-friendly tutorial, you'll take your first steps with Natural Language Processing (NLP) and Python's Natural Language Toolkit (NLTK). You'll learn how to process unstructured data in order to be able to analyze it and draw conclusions from it.

Tutorial

Natural Language Processing With spaCy in Python

Learn how to use spaCy. This free and open-source library for natural language processing (NLP) in Python has a lot of built-in capabilities and is becoming increasingly popular for processing and analyzing data in NLP.

Tutorial

Use Sentiment Analysis With Python to Classify Movie Reviews

Learn about sentiment analysis and how it works in Python. You'll then build your own sentiment analysis classifier with spaCy that can predict whether a movie review is positive or negative.

Course

Learn Text Classification With Python and Keras

In this course, you’ll learn about Python text classification with Keras, working your way from a bag-of-words model with logistic regression to more advanced methods, such as convolutional neural networks. You’ll also see how you can use pretrained word embeddings and hyperparameter optimization.

Tutorial

ChatterBot: Build a Chatbot With Python

Build a Python chatbot with the ChatterBot library. Clean real conversation data, train on custom datasets, and add local AI with Ollama.

Course

Speech Recognition With Python

See the fundamentals of speech recognition with Python. You'll learn which speech recognition library gives the best results and build a full-featured "Guess The Word" game with it.

Tutorial

Use TorchAudio to Prepare Audio Data for Deep Learning

Learn to prepare audio data for deep learning in Python using TorchAudio. Explore how to load, process, and convert speech to spectrograms with PyTorch tools.

LLMs and RAG

Learn how to work with large language models (LLMs) and retrieval-augmented generation (RAG) in Python. You’ll use prompt engineering, vector databases, LangChain, and both cloud and local LLM APIs.

Tutorial

Prompt Engineering: A Practical Example

Learn prompt engineering techniques with a practical, real-world project to get better results from large language models. This tutorial covers zero-shot and few-shot prompting, delimiters, numbered steps, role prompts, chain-of-thought prompting, and more. Improve your LLM-assisted projects today.

Interactive Quiz

Practical Prompt Engineering

Course

Vector Databases and Embeddings With ChromaDB

Learn how to use ChromaDB, an open-source vector database, to store embeddings and give context to large language models in Python.

Course

First Steps With LangChain

Large language models (LLMs) have taken the world by storm. In this step-by-step video course, you'll learn to use the LangChain library to build LLM-assisted applications.

Tutorial

Hugging Face Transformers: Leverage Open-Source AI in Python

As the AI boom continues, the Hugging Face platform stands out as the leading open-source model hub. In this tutorial, you'll get hands-on experience with Hugging Face and the Transformers library in Python.

Interactive Quiz

Hugging Face Transformers

Course

Leverage OpenAI's API in Your Python Projects

Learn how to use the ChatGPT API with Python's openai library to send prompts, control AI behavior with roles, and get structured outputs.

Tutorial

How to Integrate Local LLMs With Ollama and Python

Learn how to integrate your Python projects with local models (LLMs) using Ollama for enhanced privacy and cost efficiency.

Tutorial

Python MCP Server: Connect LLMs to Your Data

Learn how to build a Model Context Protocol (MCP) server in Python. Connect tools, prompts, and data to AI agents like Cursor for smarter assistants.

Tutorial

LlamaIndex in Python: A RAG Guide With Examples

Learn how to set up LlamaIndex, choose an LLM, load your data, build and persist an index, and run queries to get grounded, reliable answers with examples.

Machine Learning Toolkit

Learn how to choose between PyTorch and TensorFlow for your deep learning projects. This section compares these industry-standard tools.

Course

Python Deep Learning: PyTorch vs Tensorflow

PyTorch vs Tensorflow: Which one should you use? Learn about these two popular deep learning libraries and how to choose the best one for your project.

Algorithms in Machine Learning

Get hands-on experience with specific machine learning algorithms, including k-nearest neighbors (kNN), K-means clustering, and generative adversarial networks (GANs).

Course

Using k-Nearest Neighbors (kNN) in Python

Learn all about the k-nearest neighbors (kNN) algorithm in Python, including how to implement kNN from scratch. Once you understand how kNN works, you'll use scikit-learn to facilitate your coding process.

Tutorial

K-Means Clustering in Python: A Practical Guide

Learn how to perform k-means clustering in Python. You'll review evaluation metrics for choosing an appropriate number of clusters and build an end-to-end k-means clustering pipeline in scikit-learn.

Tutorial

Generative Adversarial Networks: Build Your First Models

Learn all about one of the most exciting areas of research in the field of machine learning: generative adversarial networks. You'll learn the basics of how GANs are structured and trained before implementing your own generative model using PyTorch.

Congratulations on completing this learning path! You’ve covered image processing, NLP, speech recognition, and modern LLM workflows in Python.

You might also be interested in these related learning paths:

Got feedback on this learning path?

Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!

« Browse All Learning Paths