Skip to main content
Have a personal or library account? Click to login
Test Driven Machine Learning Cover

Test Driven Machine Learning

Control your machine learning algorithms using test-driven development to achieve quantifiable milestones

Paid access
|Oct 2025
Product purchase options
This title is not yet available for download

Control your machine learning algorithms using test-driven development to achieve quantifiable milestones

Key Features

    Book Description

    Machine learning is the process of teaching machines to remember data patterns, using them to predict future outcomes, and offering choices that would appeal to individuals based on their past preferences.
    Machine learning is applicable to a lot of what you do every day. As a result, you can’t take forever to deliver your first iteration of software. Learning to build machine learning algorithms within a controlled test framework will speed up your time to deliver, quantify quality expectations with your clients, and enable rapid iteration and collaboration.
    This book will show you how to quantifiably test machine learning algorithms. The very different, foundational approach of this book starts every example algorithm with the simplest thing that could possibly work. With this approach, seasoned veterans will find simpler approaches to beginning a machine learning algorithm. You will learn how to iterate on these algorithms to enable rapid delivery and improve performance expectations.
    The book begins with an introduction to test driving machine learning and quantifying model quality. From there, you will test a neural network, predict values with regression, and build upon regression techniques with logistic regression. You will discover how to test different approaches to naïve bayes and compare them quantitatively, along with how to apply OOP (Object-Oriented Programming) and OOP patterns to test-driven code, leveraging SciKit-Learn.
    Finally, you will walk through the development of an algorithm which maximizes the expected value of profit for a marketing campaign by combining one of the classifiers covered with the multiple regression example in the book.

    What you will learn

    • Get started with an introduction to testdriven development and familiarize yourself with how to apply these concepts to machine learning
    • Build and test a neural network deterministically, and learn to look for niche cases that cause odd model behaviour
    • Learn to use the multiarmed bandit algorithm to make optimal choices in the face of an enormous amount of uncertainty
    • Generate complex and simple random data to create a wide variety of test cases that can be codified into tests
    • Develop models iteratively, even when using a thirdparty library
    • Quantify model quality to enable collaboration and rapid iteration
    • Adopt simpler approaches to common machine learning algorithms
    • Use behaviourdriven development principles to articulate test intent

    Who this book is for

    This book is intended for data technologists (scientists, analysts, or developers) with previous machine learning experience who are also comfortable reading code in Python. This book is ideal for those looking for a way to deliver results quickly to enable rapid iteration and improvement.

    Table of Contents

    1. Introduction to Test Driving Machine Learning
    2. Neurotically test a neural network
    3. Exploring the unknown with multi-armed bandits
    4. Predicting values with regression
    5. Making decisions black and white with logistic regression
    6. Na
    7. Optimizing by choosing a new algorithm (Random Forest)
    8. Exploring SciKit-Learn test first
    9. Bringing it all together
    PDF ISBN: 978-1-78439-636-7
    Publisher: Packt Publishing Limited
    Copyright owner: © 2015 Packt Publishing Limited
    Publication date: 2025
    Language: English
    Pages: 190
    Related subjects:
    BISAC subjects:
    COM051300,
    COM021030,
    COM037000,
    COM004000
    Thema subjects:
    UMB,
    UNC,
    UYA,
    UYQM,
    UYQ

    People also read