Skip to Content
Learn Python by Building Data Science Applications
book

Learn Python by Building Data Science Applications

by Philipp Kats, David Katz
August 2019
Beginner
482 pages
12h 56m
English
Packt Publishing
Content preview from Learn Python by Building Data Science Applications

Adding features to our service

At this point, our API has two GET calls and one POST call. The GET call estimates the time it will take for each type of complaint to be closed, based on the historic median for each type of call. However, this approach is obviously very naive—it takes into account neither location, time, nor a number of similar complaints in the queue for the same area. To improve our estimate, let's use an ML model, trained to predict a given complaint type, location, and time. You can find all of the details on model training in the 311model.ipynb notebook. What is important is that the trained model is stored as a Pickle file and expects four features (we collected earlier): type of complaint, latitude, longitude, and time ...

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

Python for Data Science

Python for Data Science

Yuli Vasiliev
Introduction to Machine Learning with Python

Introduction to Machine Learning with Python

Andreas C. Müller, Sarah Guido

Publisher Resources

ISBN: 9781789535365Supplemental Content