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
Regression and Clustering
- Regression: Predicting Housing Prices
- Clustering: Discovering Groups in Data
- Regression and Clustering Wrap-up
Exploratory Data Analysis and Feature Engineering
- Exploratory Data Analysis
- Feature Engineering
- EDA and Feature Engineering Wrap-up
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
Part 2 - Deep Learning
The Basics of Deep Learning
- Using PyTorch for Building a Cancer Prediction Model
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
Part IV - Overviews of Image Generation, Reinforcement Learning, and Recommendation Systems
Overview of Image Generation
- Image Generation Using Stable Diffusion and PyTorch
- Mini-DALL·E: A Lightweight Alternative
- Recommended Reading for Image Generation
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
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
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
- OpenAI-Compatible API
- Alternative Tools for Running Local Models
- Hardware Considerations
- 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
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 Material: A Deeper Dive Into Semantic Web and Linked Data
- Overview and Theory
