Skip to Content
Hands-On Automated Machine Learning
book

Hands-On Automated Machine Learning

by Sibanjan Das, Umit Mert Cakmak
April 2018
Beginner to intermediate content levelBeginner to intermediate
282 pages
6h 52m
English
Packt Publishing
Content preview from Hands-On Automated Machine Learning

Code profiling in Python

Some applications will require your machine learning models to be performant in terms of training and scoring time. For example, a recommender engine might require you to generate recommendations in less than a second and if you have more than a second latency, profiling is one way to understand intensive operations. Code profiling will help you a lot to understand how different parts of your program are executed. Profiling stats will give metrics, such as the number of calls, the total time spent to execute a function call including/excluding calls to its sub-functions, and incremental and total memory usage.

The cProfile module in Python will help you to see time statistics for every function. Here's a small example: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Automated Machine Learning

Automated Machine Learning

Adnan Masood
R: Unleash Machine Learning Techniques

R: Unleash Machine Learning Techniques

Raghav Bali, Dipanjan Sarkar, Brett Lantz, Cory Lesmeister

Publisher Resources

ISBN: 9781788629898Supplemental Content