Skip to Main Content
机器学习设计模式
book

机器学习设计模式

by Valliappa Lakshmanan, Sara Robinson, Michael Munn
September 2022
Beginner to intermediate content levelBeginner to intermediate
386 pages
7h 36m
Chinese
Southeast University Press
Content preview from 机器学习设计模式
问题表示设计模式
87
是用来预测何时出生的婴儿在出生时可能需要重症监护,表
3-1
中关于类别的定义就
足够了。
3
-
1
:婴儿体重的桶化输出
类别
描述
高出生体重
8.8
磅以上
平均出生体重
5.5
磅到
8.8
磅之间
低出生体重
3.31
磅到
5.5
磅之间
极低出生体重
低于
3.31
我们的回归模型现在变成了一个多类别分类任务。直觉上,它更容易预测
4
种可
能的分类情况中的一种,而不是从连续的实数中预测单个值——就像预测代表
is_
underweight
的二进制
0
1
相对于预测
4
个单独类别
high_weight
avg_weight
low_weight
very_low_weight
更容易一样。通过使用分类输出,我们的模型在接
近实际输出时偏离中心的程度会较小,因为我们实际上已经将输出从单个实数改为
一个区间。
在与本节配套的
Jupyter notebook
https://github.com/GoogleCloudPlatform/ml-
design-patterns/blob/master/03_problem_representation/reframing.ipynb
)中,我们同
时训练一个回归模型和一个多类别分类模型。回归模型在验证集上实现了
1.3
的均方
根误差,而分类模型实现了
67%
的准确率。因为一个模型的评估指标为均方根误差,
而另一个为准确率,所以难以直接比较这两个模型。最后,选取哪种设计模式是根
据具体用例而定的。如果医疗决策是基于桶化数值的,那么我们的模型应该是使用
这些桶化类别的分类问题 ...
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

PyTorch深度学习

PyTorch深度学习

Posts & Telecom Press, Vishnu Subramanian
数据科学原理

数据科学原理

Posts & Telecom Press, Sinan Ozdemir
Rust程序设计

Rust程序设计

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall

Publisher Resources

ISBN: 9787564196776