Skip to Content
学習アルゴリズム
book

学習アルゴリズム

by George Heineman
March 2025
Intermediate to advanced
280 pages
4h 16m
Japanese
O'Reilly Media, Inc.
Content preview from 学習アルゴリズム

第1章. 問題解決

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

アルゴリズムとは何か?

アルゴリズムがどのように機能するかを説明することは、物語を語るようなものだ。各アルゴリズムは、通常の解決策を改善する斬新な概念やイノベーションを導入している。この章では、アルゴリズムの性能に影響を与える要因を説明するために、単純な問題に対するいくつかの解を探索する。その過程で、実装に依存しないアルゴリズムのパフォーマンスを分析するためのテクニックを紹介するが、実際の実装から得られた経験的証拠も必ず提供する。

アルゴリズムとは、コンピュータプログラムとして実装され、予測可能な時間で正しい結果を返す、段階的な問題解決メソッドのことである。アルゴリズムの研究は、正しさ(このアルゴリズムはすべての入力に対して機能するか)と性能(これはこの問題を解く最も効率的な方法か)の両方に関係する。

これが実際にどのようなものか、問題解決メソッドの例を見てみよう。順序なしリストの中で最大の値を発見したいとしたらどうなるだろうか?図1-1の各Pythonリストは問題インスタンスであり、アルゴリズム(円柱で示される)によって処理される入力である。 このアルゴリズムはどのように実装されているか?異なる問題インスタンスに対してどのように実行するか? 100万個の値のリストから最大の値を発見するのに必要な時間を予測できるか?

Algorithm Processing
図1-1. アルゴリズムによって処理される3つの異なる問題インスタンス

アルゴリズムは単なる問題解決手法ではない。プログラムは予測可能な時間で完了する必要もある。Pythonの組み込み関数max() はすでにこの問題を解決している。さて、ランダムなデータを含む問題インスタンスに対するアルゴリズムの性能を予測するのは難しいかもしれないので、注意深く構築された問題インスタンスを特定する価値がある。

表1-1はサイズNの2種類の問題インスタンスに対するタイミングmax() の結果を示している:リストが昇順整数を含むものと、リストが降順整数を含むものである。 あなたの実行は表とは異なる結果をもたらすかもしれないが,あなたの計算機システムの構成に基づけば,以下の2つの文の検証は可能である.

  • max() のタイミングは、Nが十分に大きくなると、昇順の方が降順よりも常に遅くなる。

  • その後の行でNが10倍になるにつれて、max() 、有効期間も10倍になる。

この問題では最大値が戻り、入力は変更されない。場合によっては、アルゴリズムは新しい値を計算する代わりに、問題インスタンスを直接更新する-例えば、 ...

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

データサイエンスのための実践線形代数

データサイエンスのための実践線形代数

Mike X Cohen
データ分析によるネットワークセキュリティ

データ分析によるネットワークセキュリティ

Michael Collins, 中田 秀基, 木下 哲也

Publisher Resources

ISBN: 9798341626317