JP5501896B2 - Pattern extraction apparatus, pattern extraction method, and pattern extraction program - Google Patents
Pattern extraction apparatus, pattern extraction method, and pattern extraction program Download PDFInfo
- Publication number
- JP5501896B2 JP5501896B2 JP2010180662A JP2010180662A JP5501896B2 JP 5501896 B2 JP5501896 B2 JP 5501896B2 JP 2010180662 A JP2010180662 A JP 2010180662A JP 2010180662 A JP2010180662 A JP 2010180662A JP 5501896 B2 JP5501896 B2 JP 5501896B2
- Authority
- JP
- Japan
- Prior art keywords
- expression
- projection matrix
- data
- class
- compressed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2132—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on discrimination criteria, e.g. discriminant analysis
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
Description
本発明は、教師あり機械学習に係り、特にテキストや画像などのデータをクラス分類するためのパターン抽出方法に関する。 The present invention relates to supervised machine learning, and more particularly to a pattern extraction method for classifying data such as text and images.
従来、パターン抽出方法として、非特許文献1に示すように線形判別分析という手法があった。線形判別分析は次のように、与えられたn組のデータxi∈Rmおよびそのラベルyi∈{1,…,c}からクラス分類が行いやすいパターンzi∈Rc-1,c<mを抽出する。
Conventionally, as a pattern extraction method, there has been a technique called linear discriminant analysis as shown in
wiは、クラス間分散とクラス内分散の比J(w)を最大化するように選ぶ。 w i is selected to maximize the ratio J (w) of the interclass variance to the intraclass variance.
これは、下記の一般化固有値問題を解くことで求められる。 This can be obtained by solving the following generalized eigenvalue problem.
wiは、上位c−1個の固有値の固有ベクトルとなる。 w i is the eigenvector of the upper c-1 eigenvalues.
例えば、図9に示すようなclass1,class2のデータが与えられると、ベクトルwは図9のwで示す直線として求められる。この例は、クラス数c=2で、1(=c−1)次元の特徴が得られる。抽出されるパターンは、図10に示すようになり、class1,class2がx軸上で上手く分離されていることが分かる(なお、図10は、class1,class2の結果が見やすいように、y軸の値をずらしてある。)。
For example, given
しかしながら、上述した線形判別分析では、下記に示す3つの問題点があった。
1.クラス数c−1の次元の特徴しか得られない。
2.各クラスcのデータはガウス分布を仮定しているため、多峰性のデータにフィットしない。
3.各クラスcの平均値を分離する特徴しか得られない。
However, the linear discriminant analysis described above has the following three problems.
1. Only dimensional features of class number c-1 can be obtained.
2. Since each class c data assumes a Gaussian distribution, it does not fit multimodal data.
3. Only features that separate the average values of each class c are obtained.
特に、図11に示すようなclass1,class2のデータが与えられると、ベクトルwは図11のwで示す直線として求められ、抽出されるパターンは、図12に示すようになる。図11のclass1,class2のデータは平均値がほぼ等しく、また、class1のデータが多峰性であることから、class1,class2がx軸上で分離できていない(なお、図12は、class1,class2の結果が見やすいように、y軸の値をずらしてある。)。
In particular, when data of
本発明は上記の課題を解決するものであり、クラス数以上の次元の特徴を得ると共に、多峰性のデータでも分類できるパターン抽出装置を提供することが主な課題となる。 The present invention solves the above-mentioned problems, and it is a main object to provide a pattern extraction device that can obtain features of dimensions more than the number of classes and can also classify even multimodal data.
本発明のパターン抽出装置の一態様は、入力されたデータからクラス分類を行うためのパターンを抽出するパターン抽出装置であって、前記入力されたデータのクラス内類似度を計算するクラス内類似度計算手段と、前記入力されたデータのクラス間距離を計算するクラス間距離計算手段と、入力されたデータと抽出されたパターンとの差異である圧縮歪みを計算する圧縮歪み計算手段と、前記データと圧縮表現から、前記圧縮歪みが小さくなる射影行列を求め、射影行列を正規化する射影行列計算手段と、前記データと射影行列から、圧縮歪み小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる圧縮表現を計算する圧縮表現計算手段と、を備え、前記射影行列と圧縮表現に基づいて、クラス分類を行うためのパターンを抽出することを特徴とする。 One aspect of the pattern extraction apparatus of the present invention is a pattern extraction apparatus that extracts a pattern for class classification from input data, and calculates the intra-class similarity of the input data. A calculation means; an interclass distance calculation means for calculating a distance between classes of the input data; a compression distortion calculation means for calculating a compression distortion that is a difference between the input data and the extracted pattern; and the data And a projection matrix calculation means for obtaining a projection matrix that reduces the compression distortion from the compressed expression and normalizing the projection matrix, and the data and the projection matrix reduce the compression distortion, and the intraclass similarity and the interclass distance And a compressed expression calculation means for calculating a compressed expression that increases, and extracts a pattern for class classification based on the projection matrix and the compressed expression. Characterized in that it.
本発明のパターン抽出方法の一態様は、入力されたデータからクラス分類を行うためのパターンを抽出するパターン抽出方法であって、クラス内類似度計算手段が、前記入力されたデータのクラス内類似度を計算するクラス内類似度計算ステップと、クラス間距離計算手段が、前記入力されたデータのクラス間距離を計算するクラス間距離計算ステップと、圧縮歪み計算手段が、入力されたデータと抽出されたパターンとの差異である圧縮歪みを計算するステップと、射影行列計算手段が、前記データと圧縮表現から、前記圧縮歪みが小さくなる射影行列を求め、射影行列を正規化する射影行列計算ステップと、前記圧縮表現計算手段が、前記データと射影行列から、前記圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる圧縮表現を計算する圧縮表現計算ステップと、を有し、前記射影行列と圧縮表現に基づいて、クラス分類を行うためのパターンを抽出することを特徴とする。 One aspect of the pattern extraction method of the present invention is a pattern extraction method for extracting a pattern for class classification from input data, wherein the intra-class similarity calculation means includes an intra-class similarity of the input data. An intra-class similarity calculation step for calculating a degree, an inter-class distance calculation means for calculating an inter-class distance calculation step for calculating an inter-class distance of the input data, and a compression distortion calculation means for extracting the input data and A step of calculating a compression distortion that is a difference from the pattern formed, and a projection matrix calculation means for obtaining a projection matrix that reduces the compression distortion from the data and the compressed expression, and a projection matrix calculation step of normalizing the projection matrix And the compressed expression calculation means reduces the compression distortion from the data and the projection matrix, and the similarity between classes and the distance between classes are Has a compressed representation calculating step of calculating the listening becomes compressed representation, and based on the compressed representation and the projection matrix, and extracts a pattern for performing the classification.
なお、本発明は、前記パターン抽出装置を構成する各手段としてコンピュータを機能させるためのプログラムとしても構成することができる。このプログラムはネットワークを通じた態様で提供してもよく、記録媒体に格納した状態でもよい。 The present invention can also be configured as a program for causing a computer to function as each means configuring the pattern extraction apparatus. This program may be provided through a network or may be stored in a recording medium.
本発明によれば、クラス数以上の次元の特徴を得ると共に、多峰性のデータでも分類できるパターン抽出装置を提供することが可能となる。 According to the present invention, it is possible to provide a pattern extraction device that can obtain features of dimensions more than the number of classes and can also classify multi-modal data.
本発明は、入力されたデータからクラス分類を行うためのパターンを抽出するものであって、パターンを抽出する際に、クラス内のデータは近くに、クラス間のデータは遠くに配置されるようにパターン修正を行うものである。その結果、抽出されたパターンがクラス間で分離しやすくなる。 The present invention extracts a pattern for class classification from input data. When extracting a pattern, data in a class is arranged close to each other, and data between classes is arranged far away. The pattern is corrected. As a result, the extracted pattern can be easily separated between classes.
また、与えられたデータと抽出されたパターンとの差異(圧縮ひずみ)を小さくすることにより、元のデータの情報を可能な限り保持する働きをする。その結果、クラス数以上の特徴を有効に抽出することが可能となる。 In addition, by reducing the difference (compression distortion) between the given data and the extracted pattern, the information of the original data is held as much as possible. As a result, it is possible to effectively extract features exceeding the number of classes.
[実施形態]
≪構成例≫
図1〜図3に基づき本実施形態におけるパターン抽出装置1を説明する。
[Embodiment]
≪Configuration example≫
The
前記パターン抽出装置1は、教師あり機械学習に用いられ、例えば、テキストや画像等のデータをクラス分類するものである。
The
このパターン抽出装置1は、図3に示すように、コンピュータにより構成され、通常のコンピュータのハードウェアリソース、即ち、ROM11,RAM12,CPU13,通信インターフェイス(I/F)14,ハードディスクドライブ装置15,記憶媒体読取装置16,記憶媒体17などを備えている。
As shown in FIG. 3, the
このハードウェアリソースとソフトウェアリソースとの協働の結果、前記パターン抽出装置1は、図1に示すように、データ入力手段2と、管理手段3と、クラス内類似度計算手段4と、クラス間距離計算手段5と、圧縮歪み計算手段6と、射影行列計算手段7と、圧縮表現計算手段8と、結果出力手段9と、を備える。
As a result of the cooperation between the hardware resource and the software resource, the
本実施形態におけるパターン抽出装置1は、データ入力手段2からデータX(xi,…,xn)を入力し、管理手段3において、全データ(xi,…,xn)の平均値μを算出し、全てのデータ(xi,…,xn)から平均値μを引く。
The
そして、前記クラス内類似度計算手段4でクラス内のデータの類似度を算出し、前記クラス間距離計算手段5でクラス間のデータの距離計算を行う。また、圧縮歪み計算手段6は、与えられたデータと抽出されたパターンとの差異(圧縮歪み)を計算する。
Then, the
射影行列計算手段7は、データと圧縮表現Hから、前記圧縮歪みが小さくなる射影行列Wを求める。圧縮表現計算手段8は、データXと射影行列Wから、圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる圧縮表現Hを求める。 The projection matrix calculation means 7 obtains a projection matrix W that reduces the compression distortion from the data and the compressed expression H. The compressed representation calculation means 8 obtains a compressed representation H from the data X and the projection matrix W that reduces the compression distortion and increases the intraclass similarity and the interclass distance.
本実施形態のパターン抽出装置1は、データX=(х1,…,хn),хi∈Rm,ラベルy∈{1,…c}(cはクラス数),抽出する特徴の次元数k(0<k<m),クラス内類似度を重視する度合いα≧0,クラス間距離を重視する度合いβ≧0,距離のスケールσ>0,及び、繰り返し数T>0を入力とし、射影行列W,全データの平均値μ,圧縮表現Hを出力する。
The
図2は、本実施形態におけるパターン抽出装置1の処理ステップ(S1〜S6)を示すフローチャートである。本発明におけるパターン抽出方法は、以下の手順から成る。
S1:データX,ラベルy,抽出する特徴次元数k,クラス内類似度を重視する度合いα,クラス間距離を重視する度合いβ,距離のスケールσ,繰り返し数Tを入力する。
S2:クラス内類似度LW,クラス間距離LB,圧縮表現Hを初期化する。
(for t=1 to do)
S3:tが繰り返し数Tよりも小さいか否かを判定する。
S4:射影行列Wを計算する。
S5:圧縮表現Hを計算する。
(end for)
S6:射影行列W,平均値μ,圧縮表現Hを出力する。
FIG. 2 is a flowchart showing the processing steps (S1 to S6) of the
S1: Input data X, label y, feature dimension number k to be extracted, degree α emphasizing intraclass similarity, degree β emphasizing distance between classes, distance scale σ, and number of repetitions T.
S2: Intraclass similarity L W , interclass distance L B , and compressed representation H are initialized.
(For t = 1 to do)
S3: It is determined whether or not t is smaller than the repetition number T.
S4: A projection matrix W is calculated.
S5: The compressed expression H is calculated.
(End for)
S6: A projection matrix W, an average value μ, and a compressed expression H are output.
以下、前記各ステップ(S1〜S6)について詳細に説明する。 Hereinafter, each of the steps (S1 to S6) will be described in detail.
S1:(データの入力)
データ入力手段2は、ネットワーク、または、ファイル等から、データХ(х1,…,хn),ラベルy∈{1,…c}(cはクラス数),および、パラメータ(抽出する特徴の次元数k(0<k<m),クラス内類似度を重視する度合いα≧0、クラス間距離を重視する度合いβ≧0、距離のスケールσ>0,及び、繰り返し数T>0)を入力する。
S1: (Data input)
The data input means 2 receives data Х (х 1 ,..., Х n ), label y∈ {1,... C} (c is the number of classes), and parameters (characteristics to be extracted) from a network or a file. Number of dimensions k (0 <k <m), degree α ≧ 0 that emphasizes intra-class similarity, degree β ≧ 0 that emphasizes distance between classes, distance scale σ> 0, and number of repetitions T> 0) input.
S2:(初期化)
[管理手段3]
全てのデータ(x1,…,xn)の平均値μを下記(9)式により算出する。
S2: (Initialization)
[Management means 3]
An average value μ of all data (x 1 ,..., X n ) is calculated by the following equation (9).
下記(10)式に示すように、全てのデータ(x1,…,xn)から平均値μを引く。 As shown in the following equation (10), the average value μ is subtracted from all the data (x 1 ,..., X n ).
射影行列Wのサイズをm×k,圧縮表現Hのサイズをk×nにする。ここで、m,nはデータXの行数,列数、また、kは入力時に指定する特徴の次元数を示す。 The size of the projection matrix W is m × k, and the size of the compressed representation H is k × n. Here, m and n indicate the number of rows and columns of the data X, and k indicates the number of dimensions of features specified at the time of input.
クラス内類似度計算手段4と、クラス間距離計算手段5の初期化を呼び出す。 The initialization of the intraclass similarity calculation means 4 and the interclass distance calculation means 5 is called.
[クラス内類似度計算手段4]
クラス内類似度行列LWを下記(11)式により計算する。なお、下記(11)式のDWはクラス内データの度数行列を示し、SWはクラス内内積行列を示す。ここで、下記(12)式のsij WはSWのij要素を示し、下記(13)式のdij WはDWのij要素を示す。
[Intraclass similarity calculation means 4]
The intraclass similarity matrix L W is calculated by the following equation (11). In the following equation (11), D W represents a frequency matrix of intra-class data, and S W represents an intra-class inner product matrix. Here, s ij W below (12) represents the ij element of S W, d ij W below (13) shows the ij element of D W.
[クラス間距離計算手段5]
クラス間類似度行列LBを下記(14)式により計算する。なお、下記(14)式のDBはクラス間データの度数行列を示し、SBはクラス間内積行列を示す。ここで、下記(15)式のsij BはSBのij要素を示し、下記(16)式のdij BはDBのij要素を示す。
[Distance calculation means 5]
The interclass similarity matrix L B is calculated by the following equation (14). Incidentally, D B below (14) shows the frequency matrix classes between data, S B represents the inter-class inner product matrix. Here, s ij B below (15) represents the ij element of S B, d ij B below (16) shows the ij element of D B.
[管理手段3]
圧縮表現Hを乱数で初期化する。
[Management means 3]
The compressed representation H is initialized with a random number.
S3:(t≦Tの判定)
[管理手段3]
t≦Tか否か判定する。即ち、指定された繰り返し数TだけS4,S5の処理を行っていればS6へ移行し、そうでなければS4へ移行する。
S3: (determination of t ≦ T)
[Management means 3]
It is determined whether t ≦ T. That is, if the processes of S4 and S5 are performed for the designated number of repetitions T, the process proceeds to S6, and otherwise, the process proceeds to S4.
S4:(射影行列Wの計算)
[射影行列計算手段7]
圧縮歪みJC(W,H)と、クラス内距離の総和JW(H)と、クラス間距離の総和JB(H)と、から成る下記(17)式を、射影行列Wに関して最適化する。すなわち、下記(17)式を微分すると下記(18)式となり、この(18)式が0となるように、射影行列Wで最適化する。
S4: (Calculation of projection matrix W)
[Projection matrix calculation means 7]
The following equation (17) consisting of compression distortion J C (W, H), intra-class distance sum J W (H), and inter-class distance sum J B (H) is optimized for the projection matrix W. To do. That is, when the following equation (17) is differentiated, the following equation (18) is obtained, and the projection matrix W is optimized so that this equation (18) becomes zero.
圧縮歪み計算手段6を呼び出し、前記(18)式中の∂JC/∂W(データと抽出されたパターンとの差異を小さくする項)を計算させる。 The compression strain calculation means 6 is called to calculate ∂J C / ∂W (term for reducing the difference between the data and the extracted pattern) in the equation (18).
[圧縮歪み計算手段6]
射影行列計算に際して、圧縮歪みJC(W,H)の下記(19)式の微分値を求め、データと抽出されたパターンとの差異を小さくする項∂JC/∂Wを下記(20)式により計算し、射影行列計算手段7に出力する。
[Compression strain calculation means 6]
In calculating the projection matrix, the differential value of the following equation (19) of the compression distortion J C (W, H) is obtained, and the term ∂ J C / ∂ W that reduces the difference between the data and the extracted pattern is set as (20) Calculation is performed using an equation and output to the projection matrix calculation means 7.
[射影行列計算手段7]
前記(18),(20)式から下記(21)式が成立する。そして、下記(21)式の射影行列の転置行列WTについての連立一次方程式をハウスホルダー変換、または、ガウスの消去法等で解いて、射影行列Wを求める。
[Projection matrix calculation means 7]
The following equation (21) is established from the equations (18) and (20). Then, the projection matrix W is obtained by solving simultaneous linear equations for the transposed matrix W T of the projection matrix of the following formula (21) by Householder transformation or Gaussian elimination.
次に、射影行列Wの各列ベクトルを下記(22)式により、正規化する。 Next, each column vector of the projection matrix W is normalized by the following equation (22).
S5:(圧縮表現Hの計算)
[圧縮表現計算手段8]
圧縮歪みJC(W,H)と、クラス内距離の総和JW(H)と、クラス間距離の総和JB(H)と、から成る下記(23)式を圧縮表現Hに関して最適化する。すなわち、下記(23)式を微分すると下記(24)式となり、下記(24)式が0となるように、圧縮表現Hに関して最適化する。
S5: (Calculation of compressed expression H)
[Compressed expression calculation means 8]
The following expression (23) consisting of compression distortion J C (W, H), intra-class distance sum J W (H), and inter-class distance sum J B (H) is optimized for compressed expression H. . That is, the following expression (23) is differentiated to obtain the following expression (24), and the compressed expression H is optimized so that the following expression (24) becomes zero.
圧縮歪み計算手段6,クラス内類似度計算手段4,クラス間距離計算手段5を呼び出し、前記(24)式中の∂JC/∂H(データと抽出されたパターンとの差異を小さくする項),∂JW/∂H(クラス内距離の総和JWを小さくする項,すなわち,クラス内データの類似度を大きくする項),∂JB/∂H(クラス間データの距離を大きくする項)を計算させる。 The compression strain calculation means 6, the intraclass similarity calculation means 4, and the interclass distance calculation means 5 are called, and ∂J C / ∂H (the term for reducing the difference between the data and the extracted pattern) in the equation (24). ), ∂J W / .differential.H (claim to reduce the sum J W class within the distance, i.e., terms of increasing the degree of similarity of the class in the data), to increase the ∂J B / ∂H (distance interclass data )).
[圧縮歪み計算手段6]
圧縮表現Hの計算に際して、圧縮歪みJC(W,H)の下記(19)式を微分し、データと抽出されたパターンとの差異を小さくする項∂JC/∂Hを下記(25)式により計算し、圧縮表現計算手段8に出力する。
[Compression strain calculation means 6]
In calculating the compressed expression H, the following equation (19) of the compression distortion J C (W, H) is differentiated, and the term ∂J C / ∂H that reduces the difference between the data and the extracted pattern is expressed as (25) It is calculated by the formula and output to the compressed expression calculation means 8.
[クラス内類似度計算手段4]
圧縮表現Hの計算に際して、クラス内距離の総和JW(H)の下記(26)式を微分し、クラス内のデータの類似度を大きくする項∂JW/∂Hを下記(27)式により計算し、圧縮表現計算手段8に出力する。
[Intraclass similarity calculation means 4]
When calculating the compressed expression H, the following expression (26) of the sum J W (H) of the distance within the class is differentiated, and the term ∂ J W / ∂H that increases the similarity of the data in the class is expressed by the following expression (27) And output to the compressed expression calculation means 8.
[クラス間距離計算手段5]
圧縮表現Hの計算に際して、クラス間距離の総和JB(H)の下記(28)式を微分し、クラス間のデータの距離を大きくする項∂JB/∂Hを下記(29)式により計算し、圧縮表現計算手段8に出力する。
[Distance calculation means 5]
In calculating the compressed expression H, the following equation (28) of the sum of distances between classes J B (H) is differentiated, and the term ∂J B / ∂H that increases the data distance between classes is expressed by the following equation (29). Calculate and output to the compressed expression calculation means 8.
[圧縮表現計算手段8]
前記(24),(25),(27),(29)式から下記(30)式が成立する。そして、下記(30)式のvec(H)についての連立一次方程式をハウスホルダー変換、または、ガウス消去法等で解いて、圧縮表現Hを求める。ここで、(30)式中のAは下記(31)式、Cは下記(32)式とする。
[Compressed expression calculation means 8]
The following equation (30) is established from the equations (24), (25), (27), and (29). Then, the simultaneous linear equation for vec (H) in the following equation (30) is solved by Householder transformation, Gaussian elimination, or the like to obtain the compressed expression H. Here, A in the equation (30) is the following equation (31), and C is the following equation (32).
また、vec(・)は、行列の列ベクトルを縦に積み重ねた列ベクトルである。すなわち、下記(33)式,(34)に示すようになる。 Further, vec (•) is a column vector in which matrix column vectors are vertically stacked. That is, the following expressions (33) and (34) are obtained.
S4〜S5の処理ステップをT回繰り返したら、S6へ移行する。 When the processing steps S4 to S5 are repeated T times, the process proceeds to S6.
S6:(結果の出力)
[結果出力手段9]ネットワーク、または、ファイルなどに最後に正規化した射影行列W,平均値μ,および最後に求めた圧縮表現Hを出力する。
S6: (Result output)
[Result output means 9] The projection matrix W last normalized, the average value μ, and the compression expression H obtained last are output to a network or a file.
[具体例]
次に、具体例に基づいて、本実施形態のパターン抽出方法を説明する。
[Concrete example]
Next, the pattern extraction method of this embodiment will be described based on a specific example.
S1:(データの入力)
データ入力手段2は、図4に示すデータXと、ラベルyを入力する。データХの次元m=2,データ数n=200とする。また、他のパラメータ(入力時に指定する特徴の次元数k,クラス内類似度を重視する度合いα,クラス間距離を重視する度合いβ,距離のスケールσ,繰り返し数T)として、下記(35)式〜(39)式を入力する。
S1: (Data input)
The data input means 2 inputs the data X and the label y shown in FIG. It is assumed that the dimension of the data basket m = 2 and the number of data n = 200. In addition, as other parameters (number of feature dimensions k specified at the time of input, degree α of importance in intra-class similarity, degree β of importance of distance between classes, distance scale σ, number of repetitions T), the following (35) Expressions (39) are input.
S2:(初期化)
管理手段3は、データ(xi,…,xn)の平均値μを計算し、全てのデータ(xi,…,xn)から平均値μを引く。本具体例において、平均値μは下記(40)式となる。
S2: (Initialization)
Management means 3, the data (x i, ..., x n ) calculating an average value μ of, all the data (x i, ..., x n ) subtracting the average value μ from. In this specific example, the average value μ is expressed by the following equation (40).
管理手段3は、射影行列Wのサイズを2(m)×1(k),圧縮表現Hのサイズを1(k)×200(n)と設定する。そして、クラス内類似度計算手段4とクラス間距離計算手段5の初期化を呼び出し、クラス内類似度行列LWとクラス間距離行列LBとを計算させる。また、圧縮表現Hを乱数で初期化する。 The management means 3 sets the size of the projection matrix W to 2 (m) × 1 (k) and the size of the compressed expression H to 1 (k) × 200 (n). Then, the initialization of the intraclass similarity calculation means 4 and the interclass distance calculation means 5 is called to calculate the intraclass similarity matrix L W and the interclass distance matrix L B. Also, the compressed expression H is initialized with a random number.
S3:(t≦Tの判定)
管理手段3はループ部(S3〜S5)の処理に入る。t=1の場合、t(=1)<T(=3)であるため、S4へ移行し、管理手段3は射影行列計算手段7を呼び出す。
S3: (determination of t ≦ T)
The management means 3 enters the processing of the loop part (S3 to S5). When t = 1, since t (= 1) <T (= 3), the process proceeds to S4, and the
S4:(射影行列Wの計算)
射影行列計算手段7は、圧縮歪み計算手段6を呼び出し、前記(20)式を計算させ射影行列Wを求め、射影行列Wを正規化する。その結果は、下記(41)式となり、この射影行列Wは図5に示すようになる。
S4: (Calculation of projection matrix W)
The projection matrix calculation means 7 calls the compression distortion calculation means 6 to calculate the expression (20) to obtain the projection matrix W and normalize the projection matrix W. The result is the following equation (41), and this projection matrix W is as shown in FIG.
S5:(圧縮表現Hの計算)
管理手段3は、圧縮表現計算手段8を呼び出す。この圧縮表現計算手段8は、圧縮歪み計算手段6を呼び出して前記(25)式を計算させ、クラス内類似度計算手段4を呼び出して前記(27)式を計算させ、クラス間距離計算手段5を呼び出して前記(29)式を計算させ、圧縮表現Hを求める。
S5: (Calculation of compressed expression H)
The management means 3 calls the compressed expression calculation means 8. The compression expression calculation means 8 calls the compression distortion calculation means 6 to calculate the expression (25), calls the intraclass similarity calculation means 4 to calculate the expression (27), and the interclass distance calculation means 5 To calculate the expression (29) to obtain the compressed expression H.
S3:t=2の場合、t(=2)<T(=3)であるため、S4,S5へ移行し、管理手段3は射影行列計算手段7と圧縮表現計算手段8を呼び出す。
S3: When t = 2, since t (= 2) <T (= 3), the process proceeds to S4 and S5, and the
S4,S5:t=1の時と同様に、射影行列W,圧縮表現Hを計算する。その結果、射影行列Wは下記(42)式に示す値となり、図6に示すようになる。 S4, S5: The projection matrix W and the compressed expression H are calculated in the same manner as when t = 1. As a result, the projection matrix W becomes a value shown in the following equation (42), as shown in FIG.
S3:t=3の場合、t(=3)≦T(=3)であるため、管理手段3は射影行列計算手段7と圧縮表現計算手段8を呼び出し、S4,S5へ移行する。
S3: When t = 3, since t (= 3) ≦ T (= 3), the
S4,S5:射影行列計算手段7と圧縮表現計算手段8において、t=1,2の時と同様に射影行列W,圧縮表現Hを計算する。その結果、射影行列Wは下記(43)式に示す値となり、図7に示すようになる。 S4, S5: The projection matrix calculation means 7 and the compressed expression calculation means 8 calculate the projection matrix W and the compressed expression H in the same manner as when t = 1 and 2. As a result, the projection matrix W becomes a value shown in the following equation (43), as shown in FIG.
S3:t=4の場合、t(=4)>T(=3)であるため、管理手段3はループを終了させ、S6に移行する。
S3: When t = 4, since t (= 4)> T (= 3), the
S6:結果出力手段9は、t=3で正規化した射影行列W,平均値μ,t=3で求めた圧縮表現Hをネットワークやファイルに出力する。 S6: The result output means 9 outputs the projection matrix W normalized by t = 3, the average value μ, and the compressed expression H obtained by t = 3 to the network or file.
上記の処理(S1〜S6)の結果、得られた圧縮表現Hを図8に示す。class1とclass2がx軸上で分離できていることが分かる(なお、class1,class2の結果が見やすいように、y軸の値をずらしてある)。 FIG. 8 shows the compressed expression H obtained as a result of the above processing (S1 to S6). It can be seen that class1 and class2 can be separated on the x-axis (note that the y-axis values are shifted so that the results of class1 and class2 are easy to see).
また、新規のデータХについては、下記(44)式をhについて解くことで得られる。 The new data Х can be obtained by solving the following equation (44) for h.
以上示したように、本実施形態は、クラス内類似度計算手段4とクラス間距離計算手段5が、クラス内のデータは近くに、クラス間のデータは遠くに配置されるようにパターン修正を行う。こうすることで、抽出されたパターンがクラス間で分離しやすくなる。
As described above, in the present embodiment, the intra-class
また、圧縮歪み計算手段6は、与えられたデータと抽出されたパターンとの差異(圧縮歪み)を小さくすることで、元のデータの情報を可能な限り保持する働きをする。こうすることで、クラス数以上の特徴を有効に抽出することができる。 Further, the compression distortion calculation means 6 functions to retain the information of the original data as much as possible by reducing the difference (compression distortion) between the given data and the extracted pattern. By doing so, it is possible to effectively extract features exceeding the number of classes.
その結果、抽出する特徴の次元はパラメータk≦mによって変えることができ、かつ、圧縮歪み計算手段6により、抽出されたパターンと元のデータХとの差異が小さくなるので、有効な特徴が得られる。 As a result, the dimension of the feature to be extracted can be changed by the parameter k ≦ m, and the difference between the extracted pattern and the original data Х is reduced by the compression distortion calculation means 6, so that an effective feature can be obtained. It is done.
また、各クラスのデータがガウス分布であることを仮定しておらず、各クラスのデータが多峰性であったとしても、クラス分類をすることができる。 Further, it is not assumed that the data of each class has a Gaussian distribution, and classification can be performed even if the data of each class is multimodal.
さらに、各クラスの平均値に依存せず、平均値が等しくても分離することが可能となる。 Furthermore, it does not depend on the average value of each class and can be separated even if the average values are equal.
本発明は、前記パターン抽出装置1の各手段2〜9の一部もしくは全部として、コンピュータを機能させるプログラムとしても構成することができる。この場合には、S1〜S6の全てのステップあるいは一部のステップをコンピュータに実行させる。
The present invention can also be configured as a program that causes a computer to function as part or all of the
このプログラムは、webサイトや電子メールなどネットワークを通じて提供することができる。また、プログラムは、CD−ROM,DVD−ROM,CD−R,CD−RW,DVD−R,DVD−RW,MO,HDD,Blu−ray Disk(登録商標)などの記録媒体に記録して、保存・配布することも可能である。この記録媒体は、記録媒体駆動装置を利用して読み出され、そのプログラムコード自体が前記実施形態の処理を実行するので、該記録媒体も本発明を実行する。 This program can be provided through a network such as a web site or electronic mail. Further, the program is recorded on a recording medium such as a CD-ROM, DVD-ROM, CD-R, CD-RW, DVD-R, DVD-RW, MO, HDD, Blu-ray Disk (registered trademark), It can also be stored and distributed. This recording medium is read using a recording medium driving device, and the program code itself executes the processing of the above-described embodiment. Therefore, the recording medium also executes the present invention.
1…パターン抽出装置
2…データ入力手段
3…管理手段
4…クラス内類似度計算手段
5…クラス間距離計算手段
6…圧縮歪み計算手段
7…射影行列計算手段
8…圧縮表現計算手段
9…結果出力手段
DESCRIPTION OF
Claims (9)
前記入力されたデータのクラス内類似度を計算するクラス内類似度計算手段と、
前記入力されたデータのクラス間距離を計算するクラス間距離計算手段と、
入力されたデータと該データの圧縮表現であるパターンとの差異である圧縮歪みを計算する圧縮歪み計算手段と、
前記データと該データの圧縮表現から、前記圧縮歪みが小さくなる射影行列を求め、射影行列を正規化する射影行列計算手段と、
前記データと射影行列から、圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる該データの圧縮表現を計算する圧縮表現計算手段と、を備え、
入力されたデータからクラス分類を行うためのパターン、すなわち、圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる前記圧縮表現を抽出することを特徴とするパターン抽出装置。 A pattern extraction device for extracting a pattern for classifying from input data,
An intraclass similarity calculation means for calculating an intraclass similarity of the input data;
An interclass distance calculation means for calculating an interclass distance of the input data;
Compression distortion calculation means for calculating a compression distortion that is a difference between the input data and a pattern that is a compressed representation of the data ;
A projection matrix calculating means for obtaining a projection matrix that reduces the compression distortion from the data and a compressed representation of the data, and normalizing the projection matrix;
Compression expression calculating means for calculating a compressed expression of the data from which the compression distortion is reduced and the intraclass similarity and the interclass distance are increased from the data and the projection matrix,
A pattern extraction apparatus for extracting a pattern for classifying from input data, that is, the compressed expression that reduces compression distortion and increases the similarity in class and the distance between classes.
前記クラス間距離計算手段は、クラス間距離の総和の微分値を計算し、
前記圧縮歪み計算手段は、圧縮歪みの微分値を計算し、
前記射影行列計算手段は、前記圧縮歪み,クラス内距離の総和,クラス間距離の総和を含む式を射影行列に関して最適化するため、この式を射影行列に関して微分したものをゼロとすることで射影行列に関して最適化する式を求め、さらに、前記圧縮歪みの微分値に基づいてデータと圧縮表現から成る射影行列の連立一次方程式を算出し、この連立一次方程式から射影行列を求め、
前記圧縮表現計算手段は、前記圧縮歪み,クラス内距離の総和,クラス間距離の総和を含む式を圧縮表現に関して最適化するため、この式を圧縮表現に関して微分したものをゼロとすることで圧縮表現に関して最適化する式を求め、該最適化した式から前記圧縮歪みの微分値,クラス内距離の総和の微分値,クラス間距離の総和の微分値に基づいて、データと射影行列から成る圧縮表現の連立一次方程式を算出し、この連立一次方程式から圧縮表現を求めることを特徴とする請求項1記載のパターン抽出装置。 The intraclass similarity calculation means calculates a differential value of the sum of the intraclass distances,
The interclass distance calculation means calculates a differential value of the sum of the interclass distances,
The compression strain calculating means calculates a differential value of the compression strain;
The projection matrix calculation means optimizes the expression including the compression distortion, the sum of the distances within the class, and the sum of the distances between the classes with respect to the projection matrix. Obtaining an expression to be optimized with respect to the matrix, further calculating a simultaneous linear equation of a projection matrix consisting of data and a compressed expression based on the differential value of the compression distortion, obtaining a projection matrix from the simultaneous linear equation,
The compressed expression calculation means optimizes the expression including the compression distortion, the sum of the distances within the class, and the sum of the distances between classes with respect to the compressed expression. An expression that optimizes the expression is obtained, and based on the optimized expression, a compression composed of data and a projection matrix based on the differential value of the compression distortion, the differential value of the sum of the distances within the class, and the differential value of the sum of the distances between the classes. 2. The pattern extraction apparatus according to claim 1, wherein a simultaneous linear equation of expression is calculated, and a compressed expression is obtained from the simultaneous linear equation.
射影行列の連立一次方程式、圧縮表現の連立一次方程式をハウスホルダー変換,またはガウスの消去法で解くことを特徴とする請求項2または3に記載のパターン抽出装置。 The projection matrix calculating means and the compressed expression calculating means are:
4. The pattern extraction apparatus according to claim 2, wherein the simultaneous linear equations of the projection matrix and the simultaneous linear equations of the compressed expression are solved by Householder transformation or Gaussian elimination.
クラス内類似度計算手段が、前記入力されたデータのクラス内類似度を計算するクラス内類似度計算ステップと、
クラス間距離計算手段が、前記入力されたデータのクラス間距離を計算するクラス間距離計算ステップと、
圧縮歪み計算手段が、入力されたデータと該データとの圧縮表現であるパターンとの差異である圧縮歪みを計算するステップと、
射影行列計算手段が、前記データと該データの圧縮表現から、前記圧縮歪みが小さくなる射影行列を求め、射影行列を正規化する射影行列計算ステップと、
前記圧縮表現計算手段が、前記データと射影行列から、前記圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる該データの圧縮表現を計算する圧縮表現計算ステップと、を有し、
入力されたデータからクラス分類を行うためのパターン、すなわち、圧縮歪みが小さくなり、かつ、クラス内類似度およびクラス間距離が大きくなる前記圧縮表現を抽出することを特徴とするパターン抽出方法。 A pattern extraction method for extracting a pattern for classifying from input data,
An intraclass similarity calculating means for calculating an intraclass similarity of the input data;
An interclass distance calculating means for calculating an interclass distance of the input data;
A step of calculating a compression distortion which is a difference between the input data and a pattern which is a compressed expression of the data ;
A projection matrix calculating means for obtaining a projection matrix that reduces the compression distortion from the data and a compressed representation of the data, and normalizing the projection matrix;
Yes said compressed representation calculation means, from the data and the projection matrix, wherein the compressive strain is reduced, and the compressed representation calculating step of calculating a compressed representation of the data distance between classes in similarity and class increases, the And
A pattern extraction method for extracting a pattern for performing class classification from input data, that is, the compressed expression that reduces compression distortion and increases the intraclass similarity and the interclass distance.
前記圧縮歪み計算手段が、圧縮歪みの微分値を計算し、
前記射影行列計算手段が、前記圧縮歪み,クラス内距離の総和,クラス間距離の総和を含む式を射影行列に関して最適化するため、この式を射影行列に関して微分したものをゼロとすることで射影行列に関して最適化する式を求め、さらに、前記圧縮歪みの微分値に基づいてデータと圧縮表現から成る射影行列の連立一次方程式を算出し、この連立一次方程式から射影行列を求め、
前記圧縮表現計算ステップは、
前記クラス内類似度計算手段が、クラス内距離の総和の微分値を計算し、
前記クラス間距離計算手段が、クラス間距離の総和の微分値を計算し、
前記圧縮歪み計算手段が、圧縮歪みの微分値を計算し、
前記圧縮表現計算手段が、前記圧縮歪み,クラス内距離の総和,クラス間距離の総和を含む式を圧縮表現に関して最適化するため、この式を圧縮表現に関して微分したものをゼロとすることで圧縮表現に関して最適化する式を求め、該最適化した式から前記圧縮歪みの微分値,クラス内距離の総和の微分値,クラス間距離の総和の微分値に基づいて、データと射影行列から成る圧縮表現の連立一次方程式を算出し、この連立一次方程式から圧縮表現を求めることを特徴とする請求項5記載のパターン抽出方法。 The projection matrix calculation step includes:
The compression strain calculating means calculates a differential value of the compression strain;
The projection matrix calculation means optimizes the expression including the compression distortion, the sum of the distances within the class, and the sum of the distances between the classes with respect to the projection matrix. Obtaining an expression to be optimized with respect to the matrix, further calculating a simultaneous linear equation of a projection matrix consisting of data and a compressed expression based on the differential value of the compression distortion, obtaining a projection matrix from the simultaneous linear equation,
The compressed expression calculation step includes:
The intraclass similarity calculation means calculates a differential value of the sum of intraclass distances,
The inter-class distance calculation means calculates a differential value of the sum of the inter-class distances,
The compression strain calculating means calculates a differential value of the compression strain;
The compressed expression calculation means optimizes the expression including the compression distortion, the sum of the distances within the class, and the sum of the distances between the classes with respect to the compressed expression. An expression that optimizes the expression is obtained, and based on the optimized expression, a compression composed of data and a projection matrix based on the differential value of the compression distortion, the differential value of the sum of the distances within the class, and the differential value of the sum of the distances between the classes. 6. The pattern extraction method according to claim 5, wherein a simultaneous linear equation of expression is calculated, and a compressed expression is obtained from the simultaneous linear equation.
射影行列の連立一次方程式、圧縮表現の連立一次方程式をハウスホルダー変換,またはガウスの消去法で解くことを特徴とする請求項6または7に記載のパターン抽出方法。 The projection matrix calculation step and the compressed expression calculation step are:
8. The pattern extraction method according to claim 6, wherein the simultaneous linear equations of the projection matrix and the simultaneous linear equations of the compressed expression are solved by Householder transformation or Gaussian elimination.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010180662A JP5501896B2 (en) | 2010-08-12 | 2010-08-12 | Pattern extraction apparatus, pattern extraction method, and pattern extraction program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010180662A JP5501896B2 (en) | 2010-08-12 | 2010-08-12 | Pattern extraction apparatus, pattern extraction method, and pattern extraction program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2012038272A JP2012038272A (en) | 2012-02-23 |
| JP5501896B2 true JP5501896B2 (en) | 2014-05-28 |
Family
ID=45850164
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010180662A Expired - Fee Related JP5501896B2 (en) | 2010-08-12 | 2010-08-12 | Pattern extraction apparatus, pattern extraction method, and pattern extraction program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5501896B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6248774B2 (en) * | 2014-04-17 | 2017-12-20 | 富士通株式会社 | Information processing apparatus and method for nearest neighbor search |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07234853A (en) * | 1994-02-23 | 1995-09-05 | Olympus Optical Co Ltd | Cluster classification device |
| JP5133218B2 (en) * | 2008-11-20 | 2013-01-30 | 日本電信電話株式会社 | Document classification apparatus and method, program, and computer-readable recording medium |
-
2010
- 2010-08-12 JP JP2010180662A patent/JP5501896B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2012038272A (en) | 2012-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8699789B2 (en) | Document classification using multiple views | |
| Bristow et al. | Why do linear SVMs trained on HOG features perform so well? | |
| CN110059288B (en) | System and method for obtaining an optimal mother wavelet for facilitating a machine learning task | |
| CN102667859A (en) | Generic object-based image recognition apparatus with exclusive classifier, and method for the same | |
| Kakani et al. | Big Data and Predictive Analytics for Customer Retention: Exploring the Role of Machine Learning in E-Commerce | |
| CN106203628B (en) | A kind of optimization method and system enhancing deep learning algorithm robustness | |
| Wang et al. | Towards effective codebookless model for image classification | |
| CN102136073A (en) | Learning device and method, recognition device and method, program, and information processing system | |
| US9530042B1 (en) | Method for fingerprint classification | |
| Jiang et al. | Supervised Gaussian process latent variable model for hyperspectral image classification | |
| Cogranne et al. | Theoretical model of the FLD ensemble classifier based on hypothesis testing theory | |
| Shivakumara et al. | A new RGB based fusion for forged IMEI number detection in mobile images | |
| Izquierdo-Verdiguier et al. | Optimized kernel entropy components | |
| JP2012088972A (en) | Data classification device, data classification method and data classification program | |
| JP5501896B2 (en) | Pattern extraction apparatus, pattern extraction method, and pattern extraction program | |
| CN106203321B (en) | A kind of gait recognition method and system | |
| CN113673465B (en) | Image detection method, device, equipment and readable storage medium | |
| JP5545889B2 (en) | Pattern extraction apparatus, pattern extraction method, and pattern extraction program | |
| Shayegan et al. | A New Dataset Size Reduction Approach for PCA‐Based Classification in OCR Application | |
| JP2005352997A (en) | Case database construction method, discrimination device learning method, data discrimination support device, data discrimination support program | |
| CN108229320A (en) | Select frame method and device, electronic equipment, program and medium | |
| Paul et al. | Writer verification using feature selection based on genetic algorithm: A case study on handwritten Bangla dataset | |
| Cheng et al. | Graph-based semi-supervised feature selection with application to automatic spam image identification | |
| CN114463813B (en) | An expression recognition method, system and related devices based on HOG features | |
| CN104112147A (en) | Nearest feature line based facial feature extracting method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120904 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130924 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20131114 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140311 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140312 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5501896 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |