Journal

Our textbook on machine learning and artificial intelligence is out

Daniel Lemire ·

Imagem: Daniel Lemire

Robert Godin and I have a new book. The title is Introduction to Machine Learning and Artificial Intelligence with Python. The paperback came out today. It is 741 pages. The Kindle edition is there too.

IWe wrote the book as a first course in a college program or at university, and for a programmer who already writes Python and wants to see how to do machine learning. The emphasis is on using the methods, and on implementing them.

We begin with NumPy and with Pandas. Linear regression comes next, from the normal equations and from gradient descent. We cover the essential material such as logistic regression and decision trees.

We then build a neural network ourselves. A dense layer, the forward pass, backpropagation, mini-batches, a nonlinearity, softmax with cross-entropy, and so forth.

We move to PyTorch. The transformer is introduced.

From there the book uses the model libraries: sentiment analysis, text generation, translation, the BERT family, sentence embeddings, zero-shot classification, and fine-tuning. We cover current language models and reinforcement learning.

The last chapter is about shipping a model. We present a sentiment-analysis service in a container. The chapter also shows how torch.compile can improve the performance.

Each chapter has runnable examples and exercises, and the exercises have solutions.

The paperback is on Amazon. The Kindle edition is here.

Ler na fonte

← Voltar para a edição