Skip to Content
精通特征工程
book

精通特征工程

by Alice Zheng, Amanda Casari
April 2019
Intermediate to advanced
172 pages
4h 39m
Chinese
Posts & Telecom Press
Content preview from 精通特征工程
58
4
Test score with bow features: 0.775873066497
Test score with l2-normalized features: 0.763514590974
Test score with tf-idf features: 0.743182905438
事与愿违,结果显示准确率最高的分类器使用的是词袋特征,这真是出乎意料。实际上,
出现这种情况的原因在于分类器没有很好地“调优”,这是在比较分类器时经常犯的错误。
4.2.4
 使用正则化对逻辑回归进行调优
逻辑回归有些不切实际的功能。当特征数量大于数据点数量时,找出最佳模型这个问题就
变得
不确定
了。解决这个问题的一种方法是在训练过程中加入额外的限制条件,这就是
则化
,本节将讨论它的技术细节。
逻辑回归的大多数具体实现都允许正则化。要使用正则化,必须确定一个正则化参数。正
则化参数是一种
超参数
,不能在模型训练过程中自动学习。相反,它们必须根据具体的问
题进行调优,并提供给训练算法,这个过程就是超参数调优。(如果想详细了解如何评价
机器学习模型,参见
Zheng (2015)
。)一种基本的超参数调优方法称为
网格搜索
:先确定一
个超参数网格,然后使用调优程序自动搜索,找到网格中的最优超参数设置。找到最优超
参数设置之后,你可以使用该设置在整个训练集上训练一个模型,然后使用它在测试集上
的表现作为这类模型的最终评价。
重要
比较模型时要对超参数进行调优
当比较模型或特征时,必须对超参数进行调优。软件包的默认设置总是能返 ...
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

精通機器學習

精通機器學習

Aurélien Géron

Publisher Resources

ISBN: 9787115509680