Skip to Content
机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
book

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

by Aurélien Géron
October 2020
Intermediate to advanced
693 pages
16h 26m
Chinese
China Machine Press
Content preview from 机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)
82
|
第
2
章
你一定不要继续调整超参数,不要试图再努力让测试集的结果变得好看一些,因为这些
改进在泛化到新的数据集时又会变成无用功。
现在进入项目预启动阶段:你将要展示你的解决方案(强调学习了什么,什么有用,什
么没有用,基于什么假设,以及系统的限制有哪些),记录所有事情,通过清晰的可视化
和易于记忆的陈述方式制作漂亮的演示文稿(例如,“收入中位数是预测房价的首要指
标”)。在这个加州住房的示例里,系统的最终性能并不比专家估算的效果好,通常会下
降 20% 左右,但这仍然是一个不错的选择,因为这为专家腾出了一些时间以便他们可以
投入更有趣和更有生产力的任务上。
2.8 启动、监控和维护你的系统
很好,你已获准启动生产环境!现在,你需要准备好解决方案以进行上线(例如,完善
代码、编写文档和测试等)。然后你可以将模型部署到生产环境中。一种方法是保存训
练好的 Scikit-Learn 模型(使用 joblib),包括完整的预处理和预测流水线,然后在你
的生产环境中加载经过训练的模型并通过调用 prepare() 方法来进行预测。例如,也
许该模型在网站内使用:用户将输入有关新地区的一些数据,然后单击估算价格按钮。
这将发送一个查询,其中包含数据发送到 Web 服务器,然后将其转发到 Web 应用程序,
最后,你的代码调用模型的 predict() 方法(在服务器启动时加载模型,而不是每
次使用模型时都加载模型)。或者,你可以将模型包装在 Web 应用程序中,使用专用的
Web 服务,通过 REST API 来进行查询 ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111665977