Skip to Content
戦略的データサイエンス入門 ―ビジネスに活かすコンセプトとテクニック
book

戦略的データサイエンス入門 ―ビジネスに活かすコンセプトとテクニック

by Foster Provost, Tom Fawcett, 竹田 正和, 古畠 敦, 瀬戸山 雅人, 大木 嘉人, 藤野 賢祐, 宗定 洋平, 西谷 雅史, 砂子 一徳, 市川 正和, 佐藤 正士
July 2014
Beginner to intermediate
456 pages
11h 26m
Japanese
O'Reilly Japan, Inc.
Content preview from 戦略的データサイエンス入門 ―ビジネスに活かすコンセプトとテクニック
161
161
6.2 最近傍を使った推論
近傍を得る際には目的変数を使わないという点に注意してください。というのも、
そもそも目的変数自体を予測しようとしているからです。従って
6-1
では収入
を距離の計算に含めていましたが、ここでは含めていません。しかし、他の値がわ
かっている変数は何であれ距離の計算に含めることができます。
6.2.3
 近傍の数とその影響はどれくらいか
クラス分類、回帰、スコアリングの説明を行う過程では、
3
つの近傍を使った例のみを紹
介してきました。その中で疑問が浮かんだことでしょう。まず、なぜ「
3
個」の近傍なのか、
1
個や
5
個、
100
個ではだめなのでしょうか。そして、すべての近傍を同等に扱ってよいの
でしょうか。全部「最」近傍と呼んでいるけれども、他より近くに位置しているサンプルも
あるから、そうした点も考慮して扱わなくてよいのでしょうか。
何個の近傍を使うべきか、これに対する単純な答えはありません。奇数であれば
2
クラス
への分類に際し、多数決で引き分けにならないので便利でしょう。最近傍アルゴリズムは省
略して
k-NN
とよく呼ばれます。
k
は近傍の数を表し、例えば
3-NN
というように表現され
ます。
一般的には、
k
が大きくなればなるほど予測の値も近傍に対して平滑化されていきます。
もしこれまでの内容を全部理解していれば、
k
の値を最大限に大きくする(つまり
k
n
する)と、どんな予測についてもデータセット全体が使われる、ということにすぐ気付くは
ずです。こうなると、見事にどんなサンプルに対してもデータセット全体の平均を予測とし ...
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

デザインスプリント ―プロダクトを成功に導く短期集中実践ガイド

デザインスプリント ―プロダクトを成功に導く短期集中実践ガイド

Richard Banfield, C. Todd Lombardo, Trace Wax, 安藤 幸央, 佐藤 伸哉, 牧野 聡

Publisher Resources

ISBN: 9784873116853Other