プリンキピア

第22章付録:深層学習のための数学

22.9.2. The Probabilistic Model for Classification22.9.2 分類のための確率モデル

In a classification task, we map an example into a category. Here an example is a grayscale 28×28 image, and a category is a digit. (Refer to Section 4.1 for a more detailed explanation.) One natural way to express the classification task is via the probabilistic question: what is the most likely label given the features (i.e., image pixels)? Denote by 𝐱∈ℝd the features of the example and y∈ℝ the label. Here features are image pixels, where we can reshape a 2-dimensional image to a vector so that d=282=784, and labels are digits. The probability of the label given the features is p(y∣𝐱). If we are able to compute these probabilities, which are p(y∣𝐱) for y=0,…,9 in our example, then the classifier will output the prediction yˆ given by the expression:
英語のヒント
分類のタスクでは、例をカテゴリに写す。ここでは、例は28×28のグレースケール画像で、カテゴリは数字である。(より詳しい説明は4.1節を参照されたい。)分類のタスクを表す自然な方法の一つは、確率的な問いを通じたものである。特徴(つまり画像の画素)が与えられたとき、最も尤もらしいラベルは何か。例の特徴を𝐱∈ℝd、ラベルをy∈ℝで表す。ここで特徴は画像の画素であり、2次元の画像をd=282=784となるようにベクトルに変形でき、ラベルは数字である。特徴が与えられたときのラベルの確率はp(y∣𝐱)である。これらの確率、この例ではy=0,…,9についてのp(y∣𝐱)を計算できれば、分類器は次の式で与えられる予測yˆを出力する。
yˆ=argmaxp(y∣𝐱).(22.9.1)
Unfortunately, this requires that we estimate p(y∣𝐱) for every value of 𝐱=x1,...,xd. Imagine that each feature could take one of 2 values. For example, the feature x1=1 might signify that the word apple appears in a given document and x1=0 would signify that it does not. If we had 30 such binary features, that would mean that we need to be prepared to classify any of 230 (over 1 billion!) possible values of the input vector 𝐱.
英語のヒント
残念ながら、これには𝐱=x1,...,xdのすべての値についてp(y∣𝐱)を推定する必要がある。各特徴が2個の値のうち一つをとりうると想像しよう。たとえば、特徴x1=1は、与えられた文書に単語appleが現れることを表し、x1=0は現れないことを表すかもしれない。このような二値の特徴が30個あれば、入力ベクトル𝐱のありうる230個(10億以上!)の値のどれでも分類する準備をしておく必要があることになる。
Moreover, where is the learning? If we need to see every single possible example in order to predict the corresponding label then we are not really learning a pattern but just memorizing the dataset.
英語のヒント
そもそも、学習はどこにあるのか。対応するラベルを予測するのに、ありうるすべての例を一つ残らず見る必要があるなら、それは本当はパターンを学習しているのではなく、データセットを暗記しているだけである。