Practical Python Artificial Intelligence Programming

Practical Python Artificial Intelligence Programming

Mark Watson
Buy on Leanpub

Table of Contents

Practical Python Artificial Intelligence Programming

  • Cover Material, Copyright, and License
  • Preface
    • About the Author
    • Using the Example Code
    • Book Cover
    • Acknowledgements
  • Python Development Environment
    • Managing Python with uv
  • Part 1 - Machine Learning
  • “Classic” Machine Learning
    • Example Material
    • Classification Models using Scikit-learn
    • Classic Machine Learning Wrap-up
    • Optional Practice Problems
  • Regression and Clustering
    • Regression: Predicting Housing Prices
    • Clustering: Discovering Groups in Data
    • Regression and Clustering Wrap-up
    • Optional Practice Problems
  • Exploratory Data Analysis and Feature Engineering
    • Exploratory Data Analysis
    • Feature Engineering
    • EDA and Feature Engineering Wrap-up
    • Optional Practice Problems
  • Anomaly Detection
    • The Wisconsin Breast Cancer Dataset
    • Data Preprocessing
    • Approach 1: Gaussian Statistical Detector
    • Approach 2: Isolation Forest
    • Running the Example
    • Interpreting the Results
    • Anomaly Detection Wrap-up
    • Optional Practice Problems
  • Part 2 - Deep Learning
  • The Basics of Deep Learning
    • Using PyTorch for Building a Cancer Prediction Model
    • Optional Practice Problems
  • Natural Language Processing Using Deep Learning
    • Hugging Face and the Transformers Library
    • Comparing Sentences for Similarity Using Transformer Models
    • Deep Learning Natural Language Processing Wrap-up
    • Optional Practice Problems
  • Part IV - Overviews of Image Generation, Reinforcement Learning, and Recommendation Systems
  • Overview of Image Generation
    • Image Generation Using Stable Diffusion and PyTorch
    • Image Generation Using Google’s Imagen API
    • Mini-DALL·E: A Lightweight Alternative
    • Recommended Reading for Image Generation
    • Optional Practice Problems
  • Overview of Reinforcement Learning (Optional Material)
    • Overview
    • Available RL Tools
    • An Introduction to Markov Decision Process
    • A Concrete Example: Q-Learning with Gymnasium
    • Reinforcement Learning Wrap-up
    • Optional Practice Problems
  • Overview of Recommendation Systems (Optional Material)
    • TensorFlow Recommenders
    • Recommendation Systems Wrap-up
  • Part 3 - Large Language Models
  • Introduction to Transformers and Large Language Models
    • The Transformer Architecture
    • Tokenization
    • From Transformers to Large Language Models
    • Key Capabilities of Modern LLMs
    • Practical Considerations
  • LLMs with Public APIs
    • Setup and Authentication
    • Text Generation
    • Thinking Models
    • Multi-Turn Conversations
    • Multimodal Input: Analyzing Images
    • Web Search with LLMs
    • Structured Output
    • Practical Considerations
    • Summary
    • Optional Practice Problems
  • LLMs with Local Models
    • Installing Ollama
    • Downloading and Running Models
    • Using Ollama from Python
    • Reasoning with Local Models
    • Conversation Memory with Ollama
    • Prompt Caching for Performance
    • Image to Text Description (Vision Models)
    • OpenAI-Compatible API
    • Alternative Tools for Running Local Models
    • Hardware Considerations
    • Summary
    • Optional Practice Problems
  • Text Adventure Game with an LLM Game Master
    • How It Works
    • The System Prompt
    • The Game Engine
    • Playing the Game
    • Customizing Your Adventure
    • Why This Matters
    • Running the Example
    • Summary
  • Part 4 - Symbolic AI and Knowledge Representation
  • Symbolic AI
    • Comparison of Symbolic AI and Deep Learning
    • Implementing Frame Data Structures in Python
    • Use Predicate Logic by Calling Swi-Prolog
    • Swi-Prolog and Python Deep Learning Interop
    • Soar Cognitive Architecture
    • Constraint Programming with MiniZinc and Python
    • Good Old Fashioned Symbolic AI Wrap-up
    • Optional Practice Problems
  • Expert Systems Using the Rete Algorithm
    • 1. Rete Engine Architecture & Design
    • 2. Implementing the Trickier Parts of Rete
    • 3. Case Studies & Design Advice
    • Wrap Up
    • Optional Practice Problems
  • Part 5 - Knowledge Representation
  • Getting Setup To Use Graph and Relational Databases
    • Querying Wikidata with SPARQL and Python
    • The SQLite Relational Database for Knowledge Representation
    • Optional Practice Problems
  • Optional Material: A Deeper Dive Into Semantic Web and Linked Data
    • Overview and Theory
  • Open Knowledge Format (OKF) for Human-Agent Systems
    • References & Inspiration
    • What is Open Knowledge Format (OKF)?
    • Sample Knowledge Bundle Structure
    • Python Architecture: The OKF Explorer
    • Example Output
    • Wrap Up
    • Optional Practice Problems
Practical Python Artificial Intelligence Programming/overview

Practical Python Artificial Intelligence Programming

course_overview

Artificial Intelligence programming with Python. Covers both theory and practical examples of LLMs, deep learning, symbolic AI, and Knowledge Representation

count_chapters
begin_reading
download
p_implied_book_part_name

Practical Python Artificial Intelligence Programming27 chapters

Begin ›
  1. Cover Material, Copyright, and License

  2. Preface

  3. Python Development Environment

  4. Part 1 - Machine Learning

  5. “Classic” Machine Learning

  6. Regression and Clustering

  7. Exploratory Data Analysis and Feature Engineering

  8. Anomaly Detection

  9. Part 2 - Deep Learning

  10. The Basics of Deep Learning

  11. Natural Language Processing Using Deep Learning

  12. Part IV - Overviews of Image Generation, Reinforcement Learning, and Recommendation Systems

  13. Overview of Image Generation

  14. Overview of Reinforcement Learning (Optional Material)

  15. Overview of Recommendation Systems (Optional Material)

  16. Part 3 - Large Language Models

  17. Introduction to Transformers and Large Language Models

  18. LLMs with Public APIs

  19. LLMs with Local Models

  20. Text Adventure Game with an LLM Game Master

  21. Part 4 - Symbolic AI and Knowledge Representation

  22. Symbolic AI

  23. Expert Systems Using the Rete Algorithm

  24. Part 5 - Knowledge Representation

  25. Getting Setup To Use Graph and Relational Databases

  26. Optional Material: A Deeper Dive Into Semantic Web and Linked Data

  27. Open Knowledge Format (OKF) for Human-Agent Systems