JP4494036B2 - Database generation device, data analysis device, and database search device - Google Patents
Database generation device, data analysis device, and database search device Download PDFInfo
- Publication number
- JP4494036B2 JP4494036B2 JP2004049833A JP2004049833A JP4494036B2 JP 4494036 B2 JP4494036 B2 JP 4494036B2 JP 2004049833 A JP2004049833 A JP 2004049833A JP 2004049833 A JP2004049833 A JP 2004049833A JP 4494036 B2 JP4494036 B2 JP 4494036B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- dictionary
- input data
- distributed
- search
- 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 - Lifetime
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
この発明はデータベース技術に関し、特にデータベース生成装置、データ分析装置およびデータベース検索装置に関する。 The present invention relates to database technology, and more particularly to a database generation device, a data analysis device, and a database search device.
従来のデータ検索技術としては、未知のデータが与えられたとき、それと完全に一致するデータを検索する方法については、良いアルゴリズムが知られており、高速に検索を行う技術が確立されている。例えば、アドレスマッピング、ハッシュコード、バイナリサーチ、2分検索木、B木などのアルゴリズムがある。これらのアルゴリズムをもとにしてデータベース構造を定義すれば、目的のデータと一致するものを高速に見つけ出すようなデータ検索処理が実現できる。また、検索範囲を指定した検索も可能であり、例えば、データベースの中から、データの属性Aが100以上200未満、属性Bが1.5以下、かつ、属性CがTRUEであるという条件のものを全て探し出すというような技術は実現されている。 As a conventional data search technique, when unknown data is given, a good algorithm is known as a method for searching for data that completely matches the unknown data, and a technique for performing high-speed search has been established. For example, there are algorithms such as address mapping, hash code, binary search, binary search tree, and B-tree. If a database structure is defined based on these algorithms, a data search process that finds a match with the target data at high speed can be realized. In addition, a search specifying a search range is also possible. For example, in the database, the condition that the attribute A of the data is 100 to 200, the attribute B is 1.5 or less, and the attribute C is TRUE Technology to find all of these has been realized.
未知のデータに対して、データベースの中から最も近いデータを見つけ出す方法も従来から知られている。たとえば、最も簡単な方法として、データベースのデータ全てのデータとの距離計算を行うことにより、最も近いデータを見つけ出すことができる。計算幾何学においては、種々の最近点探索アルゴリズムにより、最も近い点を効率的に探す処理方法が提案されている。これは地図情報システムなどの2次元空間における類似データ検索技術として実用化されている。 Conventionally, a method for finding the nearest data from a database with respect to unknown data is also known. For example, as the simplest method, the nearest data can be found by calculating the distance to all data in the database. In computational geometry, processing methods for efficiently searching for the closest point using various nearest point search algorithms have been proposed. This has been put to practical use as a similar data retrieval technique in a two-dimensional space such as a map information system.
また、パターン認識分野においては、あらかじめ学習データを用いて辞書を作り、認識処理は、入力データと辞書とを何らかの方法で照らし合わせを行う。学習データをたくさん用意すれば性能のよい辞書ができるので、正確に認識処理を行うことができる。例えば、最近接探索法を用いると、学習データを極限まで増やせば認識の誤りを最小にすることができることが理論的に知られている。 In the pattern recognition field, a dictionary is created using learning data in advance, and the recognition process compares the input data and the dictionary by some method. If a large amount of learning data is prepared, a dictionary with good performance can be created, so that recognition processing can be performed accurately. For example, using the nearest neighbor search method, it is theoretically known that recognition errors can be minimized by increasing the learning data to the limit.
特許文献1には、手本パターンに対応した複数の要素からなる特徴ベクトルをもとに特徴集合を形成し、特徴集合とカテゴリーとを対応付けた辞書を作成して、その辞書を用いて入力パターンのカテゴリーを判定するパターン認識装置が開示されている。
しかしながら、与えられたデータに対してなるべく近いデータを検索するための一般的に有効な効率のよいアルゴリズムを開発することは難しい。与えられたデータに対して、データベースを総当りして検索する方法は、データ数が多くなると検索時間が増大するという欠点がある。また、従来技術の範囲検索というのは、ある一定の条件を満たすデータを見つけ出すことができるが、条件に最も合うデータを見つけ出す処理に適しているわけではない。条件に最も近いものから順番に候補を出すことは処理時間がかかるため、データベースが大きくなると、そのような目的を実現することは困難となる。 However, it is difficult to develop a generally effective and efficient algorithm for retrieving data as close as possible to given data. The method of searching all the databases for given data has the disadvantage that the search time increases as the number of data increases. The range search of the prior art can find data that satisfies a certain condition, but is not suitable for the process of finding data that best meets the condition. Since it takes time to process candidates in order from the one closest to the condition, it becomes difficult to realize such an object when the database becomes large.
また、パターン認識の分野では、大規模なパターン認識処理を行わせようとすると、学習空間が巨大なものになり、学習に膨大な時間がかかるか、あるいは、認識に多大な時間がかかるという問題が生じてしまう。また、最近点探索アルゴリズムにおいては、高次元のデータを対象とする高速な検索方法は提案されていない。 Also, in the field of pattern recognition, if you try to perform large-scale pattern recognition processing, the learning space becomes huge, and it takes a lot of time for learning or a lot of time for recognition. Will occur. In the nearest point search algorithm, a high-speed search method for high-dimensional data has not been proposed.
今日では、大量の情報を戦略的に生かすことが求められてきている。すなわち、与えられたデータに対して、過去の膨大な蓄積の事例の中から似通った事例データの候補を見つけ出し、それを参考にして意思決定をするというような情報ツールが必要とされており、本当の意味でのデータ検索とは、このような実際的な検索が行えるべきものと言うことができる。しかしながら、そのためには、似ているデータを大量データの中から高速に見つけ出す処理が必要であり、規模が大きくなると、このような処理を効率よく行う方法は知られていない。 Today, there is a demand for strategically utilizing a large amount of information. In other words, there is a need for an information tool that, for given data, finds similar case data candidates from a huge amount of accumulated cases in the past and makes decisions with reference to them. A true data search can be said to be a practical search of this kind. However, in order to do so, it is necessary to perform processing for quickly finding out similar data from a large amount of data. When the scale increases, there is no known method for efficiently performing such processing.
また、一般に、高速な類似データ検索を実現しようとすると、あらかじめそのような検索用のデータベースを作成しておくための処理時間が多大にかかってしまうという問題がある。 In general, when a high-speed similar data search is to be realized, there is a problem that it takes a lot of processing time to create such a search database in advance.
類似データを高速に検索できる理論的なアルゴリズムとしては、全てのデータの値が取り得るだけのアドレスを用意するという、巨大なメモリ空間を使う方法があるが、これでは、データベースの作成に時間がかかり、また、指数関数的な記憶空間を必要とするので、大量データの場合には現実的ではない。 As a theoretical algorithm that can search for similar data at high speed, there is a method that uses a huge memory space to prepare addresses that all the data values can take, but this requires time to create the database. In addition, since it requires an exponential storage space, it is not practical for a large amount of data.
このように、似ているデータを高速に検索が行えるようなデータベースの高速な作成方法は知られていない。実際問題として、データベース作成時間が遅い場合、データ件数が多くなると、現実的には実現不可能となる。例えば、仮にデータベース作成時間が、データ件数の高々2乗に比例するとしても、データ件数が100万件の場合、1兆単位の時間がかかる。 As described above, there is no known high-speed database creation method capable of searching for similar data at high speed. As a practical matter, when the database creation time is slow, if the number of data increases, it is practically impossible to realize. For example, even if the database creation time is proportional to the square of the number of data items, it takes 1 trillion units if the number of data items is 1 million.
このような状況のもと、データベースの作成を高速に行うことができ、そのデータベースを利用して、似ているデータを高速に検索できる技術が求められている。 Under such circumstances, there is a need for a technique that can create a database at high speed and can use the database to search for similar data at high speed.
本発明はこうした課題に鑑みてなされたものであり、その目的は、大量のデータの中から近いデータを高速に見つけ出し、また、このような高速なデータ検索が行えるデータベースを効率よく作成するためのータベース生成装置、データ分析装置およびデータベース検索装置を提供することにある。また、別の目的は、高性能なデータマイニングや知識情報処理、パターン認識技術に応用できる技術を実現することにある。 The present invention has been made in view of these problems, and an object of the present invention is to quickly find near data from a large amount of data and to efficiently create a database capable of such high-speed data search. To provide a database generation device, a data analysis device, and a database search device. Another object is to realize a technology applicable to high-performance data mining, knowledge information processing, and pattern recognition technology.
本発明のある態様はデータベース生成装置に関する。この装置は、入力データを略直交行列により変換するデータ変換部と、離散空間において、変換後の入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成する辞書生成部とを含み、前記データ変換部が、複数の異なる略直交行列により前記入力データを変換して、前記分散表現生成部に与えることにより、前記入力データに対して複数の分散表現が生成され、分散表現毎に前記辞書が生成される。この構成によれば、入力データの多数の分散表現を用いたデータベースを作成して、検索精度を向上させることができる。 One embodiment of the present invention relates to a database generation apparatus. The apparatus includes a data conversion unit that converts input data using a substantially orthogonal matrix, and a distributed expression generation that generates a distributed expression of the input data by obtaining at least one neighboring point of the converted input data in a discrete space. And a dictionary generation unit that generates a dictionary using each of the at least one neighboring points in the generated distributed representation as a search key, wherein the data conversion unit is configured to input the input data using a plurality of different substantially orthogonal matrices. Is converted and given to the distributed expression generation unit, a plurality of distributed expressions are generated for the input data, and the dictionary is generated for each distributed expression. According to this configuration, a database using a large number of distributed representations of input data can be created to improve search accuracy.
前記辞書生成部は、前記検索キーに前記入力データが分類されるべきカテゴリーの識別情報を対応づけた辞書を生成してもよい。 The dictionary generation unit may generate a dictionary in which identification information of a category in which the input data should be classified is associated with the search key.
本発明の別の態様もデータベース生成装置に関する。この装置は、離散空間において、入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記入力データの識別情報を対応づけて前記辞書に登録する辞書生成部とを含む。この構成によれば、入力データの分散表現を用いたデータベースを作成して、未知データと関連性のある入力データを効率よく検索することができる。 Another embodiment of the present invention also relates to a database generation apparatus. The apparatus includes a distributed representation generation unit that generates a distributed representation of the input data by obtaining at least one nearby point of the input data in a discrete space, and the at least one nearby point in the generated distributed representation. A dictionary generating unit that generates a dictionary with each as a search key, and associates the identification information of the input data with the search key and registers it in the dictionary. According to this configuration, it is possible to create a database using a distributed representation of input data and efficiently search for input data related to unknown data.
本発明のさらに別の態様もデータベース生成装置に関する。この装置は、離散空間において、入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記入力データが分類されるべきカテゴリーの識別情報を対応づけて前記辞書に登録する辞書生成部と、分類先のカテゴリーが既知である入力データの学習サンプル集合をもとに、前記辞書内の第i番目の検索キーに第j番目のカテゴリーが対応づけられる回数Pijを集計し、Pijに対して単調に増加する関数f(Pij)を用いて、分類の際のスコアの加算係数を求め、この加算係数を前記辞書内の前記i番目の検索キーに対応づけられた第j番目のカテゴリーの識別情報に関連づけて登録する加算係数決定部とを含む。この構成によれば、分類の際のスコアの加算係数を調整することで、1つの辞書による認識により、多数の辞書を用いて認識をしたのと同じ効果をもたらすことができ、辞書を格納するための記憶容量を節約するとともに、検索時間も短縮することができる。 Still another embodiment of the present invention also relates to a database generation apparatus. The apparatus includes a distributed representation generation unit that generates a distributed representation of the input data by obtaining at least one nearby point of the input data in a discrete space, and the at least one nearby point in the generated distributed representation. A dictionary generating each of which is used as a search key, a dictionary generation unit for registering the search key in association with identification information of a category to which the input data should be classified, and an input whose classification destination category is known on the basis of the learning sample set of data, said to the i-th of the search key is the j-th category counts the number of times P ij to be associated in the dictionary, it functions to increase monotonically with respect to P ij f (P ij ) is used to determine the addition coefficient of the score at the time of classification, and this addition coefficient is assigned to the j-th category associated with the i-th search key in the dictionary. And an addition coefficient determination unit that is registered in association with the identification information. According to this configuration, by adjusting the score addition coefficient at the time of classification, recognition by one dictionary can bring about the same effect as recognition using a large number of dictionaries, and the dictionary is stored. Thus, the storage time can be saved and the search time can be shortened.
本発明のさらに別の態様はデータ分析装置に関する。この装置は、離散空間において、入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記入力データの識別情報を対応づけて前記辞書に登録する辞書生成部と、前記辞書に新しい入力データの識別情報が検索キーに対応づけられて登録される際、その検索キーに既に登録されている入力データの識別情報との間で識別情報のペアを生成し、当該識別情報のペアをその出現回数とともにテーブルに格納する分析部とを含む。この構成によれば、辞書を作成する過程で、互いに関連性のある入力データのペアを検出することができる。 Yet another embodiment of the present invention relates to a data analysis apparatus. The apparatus includes a distributed representation generation unit that generates a distributed representation of the input data by obtaining at least one nearby point of the input data in a discrete space, and the at least one nearby point in the generated distributed representation. A dictionary generating each of the search keys as a search key, a dictionary generation unit that associates the identification information of the input data with the search key and registers it in the dictionary, and the identification information of the new input data in the dictionary is associated with the search key And generating an identification information pair with the identification information of the input data already registered in the search key, and storing the identification information pair in the table together with the number of appearances thereof including. According to this configuration, it is possible to detect pairs of input data that are related to each other in the process of creating a dictionary.
本発明のさらに別の態様はデータベース検索装置に関する。この装置は、離散空間における登録データの少なくとも1つの近傍点の各々を検索キーとする辞書と、入力データを略直交行列により変換するデータ変換部と、離散空間において、変換後の入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索する検索部とを含み、前記データ変換部が、複数の異なる略直交行列により前記入力データを変換して、前記分散表現生成部に与えることにより、前記入力データに対して複数の分散表現が生成され、分散表現毎に前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書が検索される。 Yet another embodiment of the present invention relates to a database search apparatus. The apparatus includes a dictionary using each of at least one neighboring point of registered data in a discrete space as a search key, a data conversion unit that converts input data using a substantially orthogonal matrix, and at least the input data after conversion in the discrete space. Searching the dictionary using a distributed representation generation unit that generates a distributed representation of the input data by obtaining one nearby point, and using each of the at least one nearby point in the generated distributed representation as a search key A plurality of distributed representations for the input data by the data conversion unit converting the input data using a plurality of different substantially orthogonal matrices and supplying the converted data to the distributed representation generation unit. The dictionary is searched using each of the at least one neighboring points as a search key for each distributed expression.
前記辞書は、前記検索キーに前記登録データの分類先のカテゴリーの識別情報のリストが対応づけられたものであり、前記検索部は、前記入力データの各分散表現における前記少なくとも1つの近傍点の各々を検索キーとする検索でヒットした前記リスト内の前記カテゴリーの識別情報を累積ヒット数とともにテーブルに格納してもよい。 The dictionary is obtained by associating the search key with a list of identification information of categories to which the registered data is classified, and the search unit is configured to store the at least one neighboring point in each distributed representation of the input data. The identification information of the category in the list hit in the search using each as a search key may be stored in a table together with the cumulative number of hits.
本発明のさらに別の態様もデータベース検索装置に関する。この装置は、離散空間における登録データの少なくとも1つの近傍点の各々を検索キーとして、前記検索キーに前記登録データの識別情報のリストを対応づけた辞書と、離散空間において、入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索し、ヒットした前記リスト内の前記登録データの識別情報をテーブルに格納する。 Yet another embodiment of the present invention also relates to a database search apparatus. The apparatus includes a dictionary in which at least one neighboring point of registration data in a discrete space is used as a search key and a list of identification information of the registration data is associated with the search key, and at least one of input data in the discrete space. The dictionary is searched using each of the at least one neighboring point in the generated distributed representation as a search key and a distributed representation generating unit that generates a distributed representation of the input data by obtaining two neighboring points. The identification information of the registered data in the list that has been hit is stored in a table.
前記検索部による検索でヒットした前記登録データと前記入力データ間の距離に関する値を求め、その距離に関する値をヒットした前記登録データの識別情報とともに前記テーブルに格納する検算部をさらに含んでもよい。 The information processing apparatus may further include a calculation unit that obtains a value related to a distance between the registered data hit by the search by the search unit and the input data, and stores the value related to the distance in the table together with identification information of the registered data hit.
本発明のさらに別の態様もデータベース検索装置に関する。この装置は、離散空間における登録データの少なくとも1つの近傍点の各々を検索キーとして、前記検索キーに、前記登録データの分類先のカテゴリーの識別情報と分類の際のスコアの加算係数とからなるペアのリストを対応づけた辞書と、離散空間において、入力データの少なくとも1つの近傍点を求めることにより、前記入力データの分散表現を生成する分散表現生成部と、生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索し、ヒットした前記リスト内の前記カテゴリーの識別情報を前記加算係数の累積値とともにテーブルに格納する。 Yet another embodiment of the present invention also relates to a database search apparatus. This device includes at least one neighboring point of registration data in a discrete space as a search key, and the search key includes identification information of a category to which the registration data is classified and a score addition coefficient for classification. A dictionary in which a list of pairs is associated; a discrete expression that generates a distributed representation of the input data by obtaining at least one neighboring point of the input data in a discrete space; and The dictionary is searched using each of at least one neighboring point as a search key, and the identification information of the category in the list hit is stored in the table together with the cumulative value of the addition coefficient.
なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。 It should be noted that any combination of the above-described constituent elements and a representation of the present invention converted between a method, an apparatus, a system, a computer program, etc. are also effective as an aspect of the present invention.
本発明によれば、効率よくデータベースを作成して、データ検索を高速に行うことができる。 According to the present invention, it is possible to efficiently create a database and perform data search at high speed.
本発明のいくつかの実施の形態を説明する。実施の形態の説明にあたって、詳細な構成と動作については、後述の[1]〜[6]節の技術詳細を適宜参照する。 Several embodiments of the present invention will be described. In the description of the embodiments, the detailed configuration and operation will be referred to as appropriate in the technical details in sections [1] to [6] described later.
実施の形態1
図1は、実施の形態1に係る最近点探索装置100の構成図である。この構成は、ハードウエア的には、任意のコンピュータのCPU、メモリ、その他のLSIで実現でき、ソフトウエア的にはメモリにロードされたプログラムなどによって実現されるが、ここではそれらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックがハードウエアのみ、ソフトウエアのみ、またはそれらの組み合わせによっていろいろな形で実現できることは、当業者には理解されるところである。
FIG. 1 is a configuration diagram of nearest
本実施の形態の最近点探索装置100は、大量のデータの中から未知データに最も近いデータすなわち最近点を探索するために用いられる。学習フェーズにおいて、学習データの集合が与えられ、最近点探索用のデータベースが作成される。認識フェーズにおいて、未知データが与えられ、最近点探索用のデータベースを用いて最も近い学習データが検索される。最近点探索装置100による処理は、[2]節で詳しく説明される。
The nearest
最近点探索装置100における直交変換部10、分散表現生成部20、辞書生成部30、および最近点探索用辞書110を格納したデータベース70の構成は、入力データとして学習データの集合が与えられたとき、学習データの集合から最近点探索用辞書110を作成するものであり、本発明のデータベース生成装置の一例である。
The configuration of the
直交変換部10は、N次元の入力データをランダムな直交行列によって直交変換し、変換後の入力データを分散表現生成部20に与える。ここで直交行列は、N×Nの行列Rの転置行列をRTと表すときに、RTR=Eを満たすような要素を実数にもつ正方行列のことである。ただし、EはN次元の単位行列である。直交行列によって定まる線形変換を直交変換といい、直交変換fは計量ベクトル空間Vにおいて内積を変えない。すなわち、x、yがVの任意のベクトルであるとき、(f(x),f(y))=(x,y)が成り立つ。ただし、(,)は内積を表す。x,yがN次元の超球面上にあり、ベクトルの大きさが一定であるなら、内積はx,y間の距離に相当し、直交変換fはx、y間の距離を保存する変換であるということができる。
The
直交変換部10は、複数の異なるランダムな直交行列により入力データを直交変換することで、複数種類の変換後の入力データを生成して、分散表現生成部20に与える。直交行列は、N個の互いに直交する単位ベクトルを行ベクトルとする行列であるから、一様にランダムな直交行列を作るには、一様にランダムなN個の互いに直交する単位ベクトルを作成すればよい。それには、N個の線形独立なN次元実数ベクトルをランダムに作成し、Gram-Schmidtの直交化法でそれぞれを互いに直交させればよい。
The
このように複数の異なる直交変換により入力データを変換するのは、分散表現生成部20において離散的な空間に変換して量子化する際に、できるだけたくさんの量子化データを得るためである。なお、直交行列は厳密な意味で上記の定義を満たすものでなくてもよく、変換後にほぼ内積が保存されるような略直交行列であってもよい。直交変換部10は、後述の[1.2.2.2]節に記載の処理を行う。
The reason why the input data is converted by a plurality of different orthogonal transforms in this way is to obtain as much quantized data as possible when the distributed
分散表現生成部20は、所定の離散空間において、直交変換部10による変換後の入力データの1つまたは複数の近傍点を求めることにより、入力データの分散表現を生成し、辞書生成部30に与える。ここで近傍点の数に比べて離散空間の点の数は非常に大きいものとする。これにより入力データが1つまたは複数の近傍点に量子化される。
The distributed
分散表現生成部20は、直交変換部10から複数の異なる直交行列により変換された複数種類の入力データを受け取り、1つの入力データに対して複数の分散表現を生成する。仮に分散表現生成部20による分散表現が1つの近傍点しかもたないものであったとしても、複数の異なる直交行列により入力データが変換されることによって、入力データは複数の量子化データにより分散表現されることになる。分散表現生成部20による入力データの分散表現への変換を分散コーディングという。
The distributed
以下、入力データの分散表現をエレメント表現とも呼び、その場合、近傍点をエレメントと呼ぶ。分散表現生成部20によるエレメント表現の具体的な作成方法は、[1]節で詳述する。
Hereinafter, the distributed representation of the input data is also referred to as element representation, and in that case, the neighboring points are referred to as elements. A specific method for creating an element expression by the distributed
辞書生成部30は、入力データの分散表現における各エレメントを検索キーとした最近点探索用辞書110をデータベース70内に生成し、入力データのラベルを検索キーに対応づけて登録する。複数の異なる直交行列による変換で1つの入力データに対して、複数種類の分散表現が作られるため、辞書生成部30は、これらの複数種類の分散表現の各々について最近点探索用辞書110を生成することになる。分散表現毎に最近点探索用辞書110を分けてもよく、すべての種類の分散表現について1つにまとめた最近点探索用辞書110を設けてもよい。
The
辞書生成部30は、学習データの集合に含まれるすべての入力データについて、最近点探索用辞書110に登録する処理を行う。最近点探索用辞書110は、学習データの分散表現に出現するすべてのエレメントを検索キーとしてもつテーブルであり、各検索キーには学習データのラベルがリスト構造でリンクされている。なお、リスト構造と同等の機能を実現する各種の方法を利用してもよい。辞書生成部30による最近点探索用辞書110の生成処理、および最近点探索用辞書110のデータ構造は、[2.2.1]〜[2.2.5]節で詳述する。
The
次に、入力データとして未知データが与えられたとき、未知データに最も近いデータを学習データの集合の中から見つける。最近点探索装置100における直交変換部10、分散表現生成部20、検索部40、および最近点探索用辞書110を格納したデータベース70の構成は、入力データとして未知データが与えられたとき、最近点探索用辞書110を検索して、未知データに近いデータを探索するものであり、本発明のデータベース検索装置の一例である。
Next, when unknown data is given as input data, data closest to the unknown data is found from the set of learning data. The configuration of the
直交変換部10は、未知データを直交変換し、分散表現生成部20に与える。このとき、直交変換部10は、学習データの場合と同一の直交行列により未知データを直交変換し、分散表現生成部20に与える。分散表現生成部20も、学習データの場合と同一の離散空間において、直交変換部10による変換後の未知データの1つまたは複数の近傍点を求め、未知データの分散表現を生成する。直交変換部10が、学習データの場合と同じように、複数の異なる直交行列により未知データを変換することにより、分散表現生成部20において、未知データに対する複数種類の分散表現が生成される。
The
検索部40は、未知データのそれぞれの分散表現における各近傍点(または各エレメント)を検索キーとして、データベース70に格納された最近点探索用辞書110を検索し、検索キーに用いたエレメントにリンクされている学習データのデータラベルのリストを参照し、そのリスト内のすべての学習データのデータラベルをその出現回数とともに最近点候補テーブル130に格納し、検索結果記憶部80に記憶する。
The
検索部40は、未知データの分散表現におけるすべてのエレメントを検索キーとして、最近点探索用辞書110を検索し、得られた学習データのデータラベルを最近点候補のデータラベルとして最近点候補テーブル130に格納していく。その際、すでに最近点候補テーブル130にデータラベルが格納されている場合は、データラベルの出現回数を累積加算する。
The
検索部40により、未知データの分散表現におけるすべてのエレメントについて検索が終わると、検算部50は、検索結果記憶部80に記憶された最近点候補テーブル130を参照して、最近点候補テーブル130内にリストされている最近点候補のデータラベルに対応する学習データと未知データの間の距離に関する評価値を計算する。具体的には、最近点候補である学習データと未知データの内積を計算し、その内積値を最近点候補のデータラベルに対応づけて最近点候補テーブル130に格納する。検算部50は、内積が最も大きい最近点候補を未知データの最近点として出力する。
When the
検算部50は、最近点候補テーブル130内にリストされた最近点候補のすべてについて内積値を計算してもよいが、最近点候補テーブル130に各最近点候補の出現回数が格納されている場合は、出現回数の多い最近点候補から順に内積値を計算し、所定の順位で計算を打ち切って、その時点で内積値が最も大きい最近点候補を未知データの最近点として出力してもよい。
The
なお、検算部50による検算を行わないで、検索部40は、未知データの分散表現におけるすべてのエレメントについて、検索が終わると、検索結果記憶部80に記憶された最近点候補テーブル130を参照して、出現回数の多い順にデータラベルを並べ替え、各データラベルに対応する学習データを未知データの最近点候補のリストとして出力してもよい。また、精度は落ちるが、検算部50は、検算することなく、出現回数の最も大きいデータラベルに対応する学習データを最近点として出力してもよい。
In addition, without performing verification by the
実施の形態2
図2は、実施の形態2に係るパターン認識装置200の構成図である。本実施の形態のパターン認識装置200は、入力データをカテゴリーに分類するものであり、パターン認識に用いられる。学習フェーズにおいて、分類先のカテゴリーが既知の入力データの集合が学習サンプルとして与えられ、パターン認識用のデータベースが生成される。認識フェーズにおいて、未知データが与えられ、パターン認識用のデータベースを用いて未知データがカテゴリーに分類される。パターン認識装置200による処理は、[3]節で詳しく説明される。
FIG. 2 is a configuration diagram of the
パターン認識装置200の直交変換部10および分散表現生成部20は、実施の形態1と同じであるから説明を省略する。辞書生成部30は、入力データの分散表現における各エレメントを検索キーとするパターン認識用辞書210をデータベース70内に作成し、その検索キーに入力データのカテゴリーのラベルを関連づけて登録する。辞書生成部30は、入力データの分散表現におけるすべてのエレメントについてパターン認識用辞書210に登録する処理を行う。複数の入力データについて辞書登録処理が行われることにより、エレメントに入力データのカテゴリーのリストがリンクづけられた構造のパターン認識用辞書210が生成される。
Since the
分類先のカテゴリーが未知である未知データが直交変換部10に入力されると、分散表現生成部20において未知データの分散表現が生成される。検索部40は、未知データの分散表現における各エレメントを検索キーとして用いて、データベース70に格納されたパターン認識用辞書210を検索し、その検索キーにリンクされたカテゴリーのリスト内のすべてのカテゴリーをその出現回数とともにカテゴリー候補テーブル230に格納し、検索結果記憶部80に記憶する。このとき、既にカテゴリーがカテゴリー候補テーブル230に格納されている場合は、カテゴリーの出現回数を1だけインクリメントする。この出現回数がカテゴリーのスコアとなる。
When unknown data whose classification category is unknown is input to the
検索部40により、未知データの分散表現におけるすべてのエレメントを検索キーとしたパターン認識用辞書210の検索が終了すると、検索部40は、出現回数の最も多いカテゴリーを未知データの分類先カテゴリーとして出力する。検索部40は、カテゴリー候補テーブル230に格納されたカテゴリーのリストを出現回数の多い順に並べ替え、上位の所定数のカテゴリーのリストを分類先候補カテゴリーとして出力してもよい。
When the
上記の説明では、検索部40による検索でヒットしたカテゴリーのスコアを単純に出現回数でカウントしたが、カテゴリーのスコアの最適な加算係数を算出してもよい。加算係数決定部35は、パターン認識用辞書210内の検索キーにリンクされたカテゴリー毎に加算係数を算出し、カテゴリーと加算係数からなるペアのリストを検索キーに登録する処理を行う。加算係数決定部35によるカテゴリーのスコアの加算係数の算出処理は、[3.2.2]節に詳述する。
In the above description, the score of the category hit in the search by the
カテゴリーのスコアの加算係数がパターン認識用辞書210に登録されている場合、検索部40は、カテゴリー候補テーブル230にカテゴリーを格納する際、パターン認識用辞書210に登録された加算係数を用いてスコアを累積加算する。検索部40は加算係数により累積加算されたスコアにもとづいて最もスコアの高いカテゴリーを未知データの分類先カテゴリーとして出力する。
When the category score addition coefficient is registered in the
実施の形態3
図3は、実施の形態3に係る最近点対探索装置300の構成図である。本実施の形態の最近点対探索装置300は、入力データの集合が与えられたとき、距離の近い2つの入力データのペアを出力するものであり、[4]節で具体的な処理を説明する。
FIG. 3 is a configuration diagram of nearest point
最近点対探索装置300の直交変換部10、分散表現生成部20、および辞書生成部30の構成は、実施の形態1と同じであるが、辞書生成部30により生成された最近点探索用辞書110はデータベースとして検索用に活用されるのではなく、一時的に辞書記憶部72に記憶され、分析部60において利用された後は、メモリ容量の有効活用のために、適宜消去される。
The configurations of the
分析部60は、辞書生成部30により新しい入力データのラベルが最近点探索用辞書110の検索キーに対応づけられて登録される際、その検索キーに既に登録されている入力データのラベルとの間でペアを生成し、最近点対候補テーブル330にそのラベルのペアを格納し、分析結果記憶部82に記憶する。最近点対候補テーブル330には、ラベルのペアの出現回数を合わせて記憶する。
When the new input data label is registered by the
分析部60は、最近点対候補テーブル330に格納された最近点対のリストを出現回数の多い順に並べ替え、所定の距離以内にある最近点対のリストを出力する。
The
なお、分析部60により最近点対候補テーブル330に格納された最近点対について、検算部50が最近点対の入力データ間の距離すなわち内積を計算してもよい。検算部50は、最近点対候補テーブル330に格納された最近点対のリストを内積値の大きい順に並べ替え、所定の距離以内にある最近点対のリストを出力してもよい。
Note that for the nearest point pair stored in the nearest point pair candidate table 330 by the
さらに、最も距離の近い最近点対が分析結果として得られればよい場合は、検算部50は、分析部60により最近点対候補テーブル330に最近点対が格納される度に、その最近点対について内積を求め、その時点までに得られた最近点対の内積値よりも大きい場合のみ、その最近点対と内積値を分析結果記憶部82に記憶し、そうでない場合は最近点対を破棄してもよい。その時点までに得られた最大の内積値よりも大きな内積値を与える最近点対が新たに得られた場合は、内積の最大値を更新するとともに、その新たな最近点対を記憶し、前の最近点対は消去する。これにより、最近点対候補テーブル330を設けることなく、その時点までに得られた最大の内積値を与える最近点対とその内積値だけを記憶しておけばよく、メモリ容量を節約できる。
Furthermore, when it is sufficient that the nearest point pair having the closest distance is obtained as an analysis result, the checking
以下、本発明の実施の形態で利用される技術の詳細を説明する。 The details of the technology used in the embodiment of the present invention will be described below.
[1]エレメント集合の作成方法
[1.1]準備
データは、数値、項目などから構成され、計算機内部では2進表現されている。データを、ベクトル、点などと呼ぶこともある。最近点探索方法、パターン認識方法においては、あらかじめ用意されているデータのことを、学習データ、学習点、学習ベクトルなどと呼ぶことにする。未知のデータを、未知入力、未知データなどと呼ぶことがある。
[1] Element set creation method [1.1] Preparation Data is composed of numerical values, items, and the like, and is expressed in binary in the computer. Data is sometimes called a vector, a point, or the like. In the nearest point search method and pattern recognition method, data prepared in advance is referred to as learning data, learning points, learning vectors, and the like. Unknown data may be referred to as unknown input, unknown data, or the like.
[1.1.1]データの型
計算機で表現されるデータには、2値データ、実数データなどがある。これは数学的には2進ベクトル、実数ベクトルに対応する。例えば、2進ベクトル(1,0,1,0,1,1,0,0)は、101011002と、8ビットのデータとして表現することができる。実数ベクトル(10.5,30.11,4.02,−1.5)は計算機では一般に浮動小数点形式で32バイトのデータで表すことができる。
[1.1.1] Data type Data represented by a computer includes binary data and real number data. This corresponds mathematically to a binary vector or a real vector. For example, a binary vector (1, 0, 1 , 0, 1 , 1, 0, 0) can be expressed as 101011002 and 8-bit data. Real number vectors (10.5, 30.11, 4.02, and -1.5) can be generally represented by 32-byte data in a floating-point format on a computer.
・バイナリ空間
要素の取り得る値が0か1だけのベクトルが作る空間をバイナリ空間と呼び、{0,1}Nと表記することにする。バイナリ空間のベクトルは、計算機では、Nビットのデータとして表すことができる。
Binary space A space created by a vector whose elements can have only 0 or 1 is called a binary space, and expressed as {0, 1} N. A binary space vector can be represented as N-bit data in a computer.
・コンビネーション空間
バイナリ空間で、かつ要素の値が1である個数がk個であるベクトルが作る空間をコンビネーション空間と呼び、NCkと表記することにする。コンビネーション空間のベクトルは、計算機では、Nビットのデータとして表すことができる。
A space formed by a vector having a combination space binary space and k elements having the value of 1 is called a combination space and expressed as N C k . The vector of the combination space can be expressed as N-bit data in the computer.
・実数空間
要素が実数値を取るベクトルが作る空間を実数空間と呼び、RNと表記することにする。実数空間のベクトルは、計算機では、N個の実数値のデータとして表すことができる。例えば、浮動小数点形式を使用すればでN×8バイトで表現できる。
- real spatial element is referred to as a space to create a vector to take a real-valued real space, to be referred to as R N. The vector of the real number space can be expressed as N pieces of real value data in the computer. For example, if a floating point format is used, it can be expressed by N × 8 bytes.
・階乗空間
0,1,…,N−1のN個の整数が作る置換をベクトルとして、その全体を階乗空間と呼び、N!と表記することにする。例えば、5次元の階乗空間は、(0,1,2,3,4),(0,1,2,4,3),…,(4,3,2,1,0)の120個のベクトル全体が作る空間である。
-
階乗空間のベクトルは、N個の整数値のデータとして表すことができる。4バイトの整数型を使用すれば、N×4バイトで表現できる。ただし、もっと少ないビット数でも表すことができる。0からN−1までの整数を表現するのには、ceil(log2N)ビットあれば足りるから、階乗空間のベクトルはN×ceil(log2N)ビットで表すことができる。ここでceilは切り上げを行う関数である。 A factorial space vector can be represented as N integer data. If an integer type of 4 bytes is used, it can be expressed by N × 4 bytes. However, even a smaller number of bits can be expressed. Since ceil (log 2 N) bits are sufficient to represent integers from 0 to N−1, the factorial space vector can be represented by N × ceil (log 2 N) bits. Here, ceil is a function for rounding up.
・球面空間
空間上の全てのベクトルが同じ大きさのとき、全てのベクトルは原点を中心とする超球面上に乗っている。このような空間を球面空間と呼ぶことにする。
-Spherical space When all the vectors in space are the same size, all the vectors are on the hypersphere centered on the origin. Such a space is called a spherical space.
・単位実数空間
実数空間で、全てのベクトルの大きさが1であるとき、これを単位実数空間と呼び、ENで表記することにする。
- a float space real space, when the magnitude of all the vectors is 1, which is referred to as unit a real space, to be denoted by E N.
・離散的な空間
空間上のベクトルの数が有限個のとき、これを離散的な空間と呼ぶことにする。この空間上のベクトルは有限長のビットデータで表すことができる。
-Discrete space When the number of vectors in the space is finite, this is called a discrete space. A vector in this space can be represented by finite length bit data.
・双極値による空間
バイナリ空間、コンビネーション空間は、ベクトルの要素値として0,1の代わりに+1,−1を取るものも考えられる。これらは、原点を中心とする超球面上に乗っているので、球面空間である。これは、{0,1}値を持つ元の空間を伸縮し、平行移動することによって球面空間に変換できる。
-Space by Bipolar Value In binary space and combination space, it is also possible to take +1, -1 instead of 0, 1 as vector element values. These are spherical spaces because they are on a hypersphere centered on the origin. This can be converted into a spherical space by expanding and contracting the original space having the {0, 1} value and moving in parallel.
同様に階乗空間も、要素の値をk=0〜N−1の代わりに、2k−(N−1)の値を取ることによって球面空間になる。例えば、(0,1,2,3,4,5)は(−5,−3,−1,+1,+3,+5)に変換される。
Similarly, the factorial space becomes a spherical space by taking the value of the element as 2k− (N−1) instead of k = 0 to
[1.1.2]距離の計算
空間上の2つのデータ間の距離を測るには、ユークリッド距離を用いる。または、ユークリッド距離に準じるものでもよい。例えばハミング距離でもよい。もしデータが球面空間上の点であるならば、距離は内積値を求めることによって測ることができる。
[1.1.2] Calculation of distance Euclidean distance is used to measure the distance between two pieces of data in space. Alternatively, it may conform to the Euclidean distance. For example, a Hamming distance may be used. If the data is a point in spherical space, the distance can be measured by finding the inner product value.
[1.2]データのエレメント表現
ベクトルを、たくさんのベクトルの集合によって表現するとき、その集合を構成する個々のベクトルをエレメントと呼び、もとのベクトルをこのように表現することをエレメント表現と呼ぶことにする。エレメントは、もとのベクトルとのなす角がある程度小さい必要がある。また、エレメントはある程度均等に分布している必要がある。
[1.2] Element representation of data When a vector is expressed by a set of many vectors, each vector constituting the set is called an element, and expressing the original vector in this way is an element representation. I will call it. The element needs to have a certain small angle with the original vector. Also, the elements need to be distributed evenly to some extent.
それぞれのエレメントは、何らかの形でもとのデータの情報の一部を保持しており、全体としてもとのベクトルと等価な情報か、または、ほぼ等価な情報を持っている。 Each element holds part of the information of the original data in some form, and has information equivalent to or almost equivalent to the original vector as a whole.
[1.2.1]離散的な空間からのエレメント作成方法
例を挙げて説明する。
(a)
いま、データの型が32ビットの2値データであるとする。例えば、
0000 0000 0000 0000 0000 0000 0000 0000 (1)
とする。
このデータから距離が1のものは、
1000 0000 0000 0000 0000 0000 0000 0000
0100 0000 0000 0000 0000 0000 0000 0000
…
0000 0000 0000 0000 0000 0000 0000 0001
の、32個である。
こうすることによって、もとのデータをこの32個のデータで表現することができる。これはエレメント表現の1つの例である。もとのベクトルが、32ビットの任意の値を取るとき、個々のエレメントの値は232通りの値を取り得る。
[1.2.1] Element creation method from discrete space An example will be described.
(A)
Assume that the data type is binary data of 32 bits. For example,
0000 0000 0000 0000 0000 0000 0000 0000 (1)
And
If the distance is 1 from this data,
1000 0000 0000 0000 0000 0000 0000 0000
0100 0000 0000 0000 0000 0000 0000 0000
...
0000 0000 0000 0000 0000 0000 0000 0001
The number is 32.
By doing so, the original data can be expressed by these 32 pieces of data. This is one example of element representation. When the original vector takes an arbitrary value of 32 bits, the value of each element can take 2 32 different values.
また、(1)のデータについて、距離が2のものは、
1100 0000 0000 0000 0000 0000 0000 0000
1010 0000 0000 0000 0000 0000 0000 0000
…
0000 0000 0010 0000 0000 0001 0000 0000
…
0000 0000 0000 0000 0000 0000 0000 0011
の、496個である。これもエレメント表現として使用することができる。
In addition, for the data of (1), the data with
1100 0000 0000 0000 0000 0000 0000 0000
1010 0000 0000 0000 0000 0000 0000 0000
...
0000 0000 0010 0000 0000 0001 0000 0000
...
0000 0000 0000 0000 0000 0000 0000 0011
496 pieces. This can also be used as an element representation.
(b)
また、データの型が32ビットの2値データで、ビット=1である数が16個であるようなデータであるとする。例えば、
1111 1111 1111 1111 0000 0000 0000 0000 (2)
とする。
このデータから距離が3で、かつ、ビット=1である数が13個であるようなものは、例えば
1101 1011 1111 1110 0000 0000 0000 0000
のようなものであり、これは全部で560個ある。これもエレメント表現として使用することができる。
(B)
It is also assumed that the data type is binary data of 32 bits and the number of bits = 1 is 16. For example,
1111 1111 1111 1111 0000 0000 0000 0000 (2)
And
If the distance from this data is 3 and the number of bits = 1 is 13,
1101 1011 1111 1110 0000 0000 0000 0000
There are 560 in total. This can also be used as an element representation.
(c)
また、いまデータの型が32ビットの2値データであるとする。例えば、
1111 1110 1100 1000 0000 0001 0011 0111 (3)
とする。
32ビットのうちの4ビットを選んで、そのビットを*とする。
**** 1110 1100 1000 0000 0001 0011 0111
いま、ビット0〜3、ビット4〜7、ビット8〜11、ビット12〜15、ビット16〜19、ビット20〜23、ビット24〜27、ビット28〜31のビットを選んで、それぞれ*にすると、8個のエレメントが作成される。このとき、全てのビットが1回ずつ平等に選ばれている。この方法のバリエーションはたくさんある。例えば、もっとたくさんの個数のエレメントで表現することもできる。
(C)
It is assumed that the data type is binary data of 32 bits. For example,
1111 1110 1100 1000 0000 0001 0011 0111 (3)
And
Select 4 bits out of 32 bits and set that bit as *.
**** 1110 1100 1000 0000 0001 0011 0111
Now select bits 0-3, bits 4-7, bits 8-11, bits 12-15, bits 16-19, bits 20-23, bits 24-27, bits 28-31, and each * Then, 8 elements are created. At this time, all the bits are selected equally once. There are many variations of this method. For example, it can be expressed by a larger number of elements.
(d)
また、いまデータが、N次元階乗空間のベクトルであるとする。これは、N次元の整数ベクトルとして表すことができる。例えば、N=32として、
(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31)(4)
とする。
要素が10以上のとき1、それ以外のとき0として、32ビットのデータを作ると、
0000 0000 0011 1111 1111 1111 1111 1111
となる。
また、17以上のとき1、それ以外を0とすると、
0000 0000 0000 0000 0111 1111 1111 1111
となる。
また、25以上のとき2、15以上のとき1、それ以外を0とすると、
0000 0000 0000 0001 1111 1111 1222 2222
となる。
このようなものをたくさん用意すれば、それはエレメント集合となる。その場合、均等に分布しているとはいえないこともあるが、他の方法と組み合わせることによって、大体均等にすることができる。
(D)
Further, it is assumed that the data is a vector of an N-dimensional factorial space. This can be represented as an N-dimensional integer vector. For example, if N = 32,
(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 , 25,26,27,28,29,30,31) (4)
And
When 32 bits of data are created, 1 when the number of elements is 10 or more, and 0 otherwise.
0000 0000 0011 1111 1111 1111 1111 1111
It becomes.
Also, if the number is 17 or more, 1 is set, and other values are set to 0.
0000 0000 0000 0000 0111 1111 1111 1111
It becomes.
Also, if it is 25 or more, 2 if it is 15 or more, and 1 otherwise, 0.
0000 0000 0000 0001 1111 1111 1222 2222
It becomes.
If you have a lot of things like this, it becomes an element set. In that case, it may not be said that it is evenly distributed, but it can be made substantially uniform by combining with other methods.
[1.2.2]実数ベクトルからのエレメント作成方法
[1.2.2.1]実数ベクトルから離散的な空間へのデータの変換
いまデータが、N次元の実数ベクトルであるとする。実数ベクトルから、それになす角が一番近いような、離散的な空間上のベクトルへ変換することができる。例えば、実数ベクトルから、バイナリ空間、コンビネーション空間、階乗空間などへの変換は容易にできる。
[1.2.2] Element creation method from real vector [1.2.2.1] Conversion of data from real vector to discrete space Assume that the data is an N-dimensional real vector. A real vector can be converted into a vector in a discrete space with the closest angle. For example, conversion from a real vector to a binary space, a combination space, a factorial space, or the like can be easily performed.
実数ベクトルを、v=(vi)(i=0〜N−1)とする。
vi>0のとき、1
vi≦0のとき、0
とすると、バイナリ空間のデータとすることができ、Nビットのデータで表せる。
Let the real vector be v = (v i ) (i = 0 to N−1).
1 when v i > 0
0 when v i ≦ 0
Then, it can be set as binary space data and can be represented by N-bit data.
vi(i=0〜N−1)のうちの大きいものk個を選んでビットを1にし、それ以外のビットを0にすると、コンビネーション空間のデータとすることができ、Nビットのデータで表せる。 By selecting the largest k of v i (i = 0 to N−1) and setting the bit to 1 and setting the other bits to 0, the data of the combination space can be obtained. I can express.
いま、ベクトルの要素の大きいものから順番に並べて、
vi0,vi1,vi2,…,viN−1
となったとすると、(i0,i1,…,iN−1)は階乗空間のベクトルであり、これはビットデータとして表すことができる。
Now, arrange in order from the largest vector elements,
v i0 , v i1 , v i2 ,..., v iN−1
(I 0 , i 1 ,..., I N−1 ) is a factorial space vector, which can be represented as bit data.
その他にも、いろいろな離散的な空間のベクトルに変換することができる。例えば、24次元の単位実数空間E24では、
vi>cos(84.8°)≒0.09063のとき、2
vi>cos(−84.8°)≒−0.09063のとき、1
vi≦cos(−84.8°)のとき、0
とすると、これもビットデータで表すことができる。このデータはおよそ224通りの値を取り得る。なお、この閾値はi軸に垂直な平面によって24次元超球面の表面積を3等分する値となっている。他の任意の閾値がデータ変換のために使用できるが、どのような値が適当かは実際の問題に応じて選択すればよい。
In addition, it can be converted into a vector of various discrete spaces. For example, in the 24-dimensional unit real space E 24 ,
When v i > cos (84.8 °) ≈0.09063, 2
When v i > cos (−84.8 °) ≈−0.09063, 1
0 when v i ≦ cos (−84.8 °)
Then, this can also be represented by bit data. This data can take a value of approximately 2 24 ways. This threshold is a value that divides the surface area of the 24-dimensional hypersphere into three equal parts by a plane perpendicular to the i-axis. Any other threshold can be used for data conversion, but what value is appropriate may be selected according to the actual problem.
また、N次元実数ベクトルを、v=(vi)(i=0〜N−1)とするとき、vi0>vi1>vi2>…>viN−1であるとする。このとき、
a0=vi0−vi1
a1=vi1−vi2
…
aN−2=viN−2−viN−1
とおく。それを大きいものから順番に並べて、
aj0,aj1,aj2,…,ajN−2
となったとすると、(i0,i1,…,iN−1,j0,j1,…,jN−2)はある離散的な空間のベクトルである。
Further, when the N-dimensional real vector is v = (v i ) (i = 0 to N−1), it is assumed that v i0 > v i1 > v i2 >...> V iN−1 . At this time,
a 0 = v i0 −v i1
a 1 = v i1 −v i2
...
a N−2 = v iN−2 −v iN−1
far. Arrange them in order from the largest,
a j0 , a j1 , a j2 ,..., a jN−2
(I 0 , i 1 ,..., I N−1 , j 0 , j 1 ,..., J N−2 ) is a vector of a discrete space.
以上はごく一部の例に過ぎず、離散的な空間への変換方法はまだたくさんある。また、いままで述べた方法を部分的に組み合わせることもできる。そうすることによっても、離散的な空間のベクトルに変換できる。変換方法は無数にあることが推察できるであろう。 These are just a few examples, and there are still many ways to convert to discrete space. It is also possible to partially combine the methods described so far. By doing so, it can be converted into a vector in a discrete space. It can be inferred that there are countless conversion methods.
また、ランダムなN×N直交行列を用意し、これをRとする。N次元実数ベクトルvにRをかけてこれをRvとする。すると、Rvを離散的な空間へ変換することができる。ランダムな直交行列は無数に作れるので、このことからもやはり、離散的な空間への変換は無数にあるということが言える。 Also, a random N × N orthogonal matrix is prepared, and this is R. Multiply the N-dimensional real vector v by R to make it Rv. Then, Rv can be converted into a discrete space. Since an infinite number of random orthogonal matrices can be created, it can be said from this that there are innumerable transformations into a discrete space.
[1.2.2.2]複数の離散的な空間
いま、離散的な空間が複数あるとする。実数ベクトルからそれぞれの空間上のベクトルへ変換することで、これはエレメント表現となり得る。ただしエレメントがある程度均等に分布するような離散的な空間を選ぶことが望ましい。
[1.2.2.2] Multiple Discrete Spaces Assume that there are multiple discrete spaces. By converting from a real vector to a vector in each space, this can be an elemental representation. However, it is desirable to select a discrete space in which elements are evenly distributed to some extent.
例えば次のような方法は有効である。ある離散的な空間をQとする。一様にランダムな直交行列を多数用意し、これをR0,R1,…,Rr−1とする。Q上の各点にRをかけてできる空間を、R0(Q),R1(Q),…,Rr−1(Q)とする。実数ベクトルvからR0(Q),R1(Q),…,Rr−1(Q)への変換によって、エレメント表現とすることができる。これらのエレメントはvの近くにランダムに存在するので、ある程度数が多くなると、偏りが少なくなり、ほぼ均等に分布すると見なすことができる。 For example, the following method is effective. Let Q be a discrete space. A large number of uniformly random orthogonal matrices are prepared, and these are assumed to be R 0 , R 1 ,..., R r−1 . Let R 0 (Q), R 1 (Q),..., R r-1 (Q) be a space where R can be applied to each point on Q. Element conversion can be made by conversion from the real vector v to R 0 (Q), R 1 (Q),..., R r-1 (Q). Since these elements are present at random near v, when the number is increased to some extent, the bias is reduced and it can be considered that the elements are distributed almost evenly.
[1.2.3]離散空間上の近傍
今までは、もとのベクトルから離散空間上のなす角が最も小さいベクトルただ1つへ変換することを説明してきたが、なす角の小さい複数のベクトルを選ぶことも可能である。
[1.2.3] Neighbors in discrete space Up to now, we have explained that the original vector is converted to only one vector with the smallest angle in the discrete space. It is also possible to choose a vector.
例えば、いまベクトルが、
(1,2,4,5,6,8,9,10,11,12)であるとする。
これに近いバイナリ空間{−1,+1}Nのベクトル上位16個は、
( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
( 1,-1, 1, 1, 1, 1, 1, 1, 1, 1)
(-1,-1, 1, 1, 1, 1, 1, 1, 1, 1)
( 1, 1,-1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1,-1, 1, 1, 1, 1, 1, 1, 1)
( 1, 1, 1,-1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1,-1, 1, 1, 1, 1, 1, 1)
( 1,-1,-1, 1, 1, 1, 1, 1, 1, 1)
( 1, 1, 1, 1,-1, 1, 1, 1, 1, 1)
(-1,-1,-1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1, 1,-1, 1, 1, 1, 1, 1)
( 1,-1, 1,-1, 1, 1, 1, 1, 1, 1)
(-1,-1, 1,-1, 1, 1, 1, 1, 1, 1)
( 1,-1, 1, 1,-1, 1, 1, 1, 1, 1)
( 1, 1, 1, 1, 1,-1, 1, 1, 1, 1)
となる。これらは、ベクトルの各要素、要素の2項和、3項和の大小関係を調べることにより見つけることができる。
For example, now the vector is
It is assumed that (1, 2, 4, 5, 6, 8, 9, 10, 11, 12).
The closest 16 vectors in the binary space {-1, + 1} N are
(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(1, -1, 1, 1, 1, 1, 1, 1, 1, 1)
(-1, -1, 1, 1, 1, 1, 1, 1, 1, 1)
(1, 1, -1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1, -1, 1, 1, 1, 1, 1, 1, 1)
(1, 1, 1, -1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1, -1, 1, 1, 1, 1, 1, 1)
(1, -1, -1, 1, 1, 1, 1, 1, 1, 1)
(1, 1, 1, 1, -1, 1, 1, 1, 1, 1)
(-1, -1, -1, 1, 1, 1, 1, 1, 1, 1)
(-1, 1, 1, 1, -1, 1, 1, 1, 1, 1)
(1, -1, 1, -1, 1, 1, 1, 1, 1, 1)
(-1, -1, 1, -1, 1, 1, 1, 1, 1, 1)
(1, -1, 1, 1, -1, 1, 1, 1, 1, 1)
(1, 1, 1, 1, 1, -1, 1, 1, 1, 1)
It becomes. These can be found by examining the magnitude relationship of each element of the vector, the binary sum of the elements, and the sum of the three terms.
例えば、[1.2.1]の(b)の例は、32C16空間から32C13空間での近い点上位560個を選ぶことに相当する。 For example, examples of [1.2.1] of (b) is equivalent to choose from 32 C 16 space 32 C 13 upper 560 close points in space.
[1.2.4]ベクトルが超球面上にない場合の扱い
ベクトルが超球面上に乗っていない場合について説明する。いま、XがN次元実数ベクトルであり、どの要素も0.0〜10.0の範囲の値を取るとする。すなわち超立方体の中にある点である。
X=(x0,x1,…,xN−1) 0≦xi<10.0
[1.2.4] Handling when the vector is not on the hypersphere A case where the vector is not on the hypersphere will be described. Now, assume that X is an N-dimensional real vector, and every element takes a value in the range of 0.0 to 10.0. That is, a point in the hypercube.
X = (x 0 , x 1 ,..., X N−1 ) 0 ≦ x i <10.0
このとき、適当なαを選んで、
Y=(y0,y1,…,y2N−2,y2N−1)
y2i=cos(α×xi×2×π/10)
y2i+1=sin(α×xi×2×π/10)
とすると、Yは超球面上の点となり、このような変換をしてデータベース作成、データ検索を行えばよい。
At this time, choose an appropriate α,
Y = (y 0 , y 1 ,..., Y 2N−2 , y 2N−1 )
y 2i = cos (α × xi × 2 × π / 10)
y 2i + 1 = sin (α × xi × 2 × π / 10)
Then, Y becomes a point on the hypersphere, and it is sufficient to perform database conversion and data retrieval by performing such conversion.
なぜなら、近いデータを検索するという目的のためには、局所的な距離関係が保存されればよいから、X1とX2が近いとき、|Y1−Y2|≒α|X1−X2|であるので、このように変換すればよいことがわかる。 Because, for the purpose of searching for close data, it is only necessary to preserve the local distance relationship. Therefore, when X1 and X2 are close, | Y1-Y2 | ≈α | X1-X2 | It can be seen that this conversion is sufficient.
(∵)
(cosαa−cosαb)2+(sinαa−sinαb)2
=2−2(cosαa・cosαb+sinαa・sinαb)
=2−2cosα(a−b)
=2−2(1−2sin2α(a−b)/2)
=(2sinα(a−b)/2)2
α(a−b)/2が0に近いとき、sinα(a−b)/2≒α(a−b)/2と近似できるから、
(2sinα(a−b)/2)2
≒(2α(a−b)/2)2
=α2(a−b)2
(∵)
(Cosαa-cosαb) 2 + (sinαa-sinαb) 2
= 2-2 (cosαa · cosαb + sinαa · sinαb)
= 2-2cos α (ab)
= 2-2 (1-2 sin 2 α (ab) / 2)
= (2 sin α (ab) / 2) 2
When α (ab) / 2 is close to 0, it can be approximated as sin α (ab) / 2≈α (ab) / 2.
(2 sin α (ab) / 2) 2
≒ (2α (ab) / 2) 2
= Α 2 (ab) 2
よって、√Σ(y1j−y2j)2≒α√Σ(x1i−x2i)2
∴|Y1−Y2|≒α|X1−X2|
Therefore, √Σ (y 1j −y 2j ) 2 ≈α√Σ (x 1i −x 2i ) 2
∴ | Y1-Y2 | ≈α | X1-X2 |
このように、一般の実数ベクトルの場合は、超球面上に距離関係が大体保存されるように写像すればよい。距離関係が大体保存されるような写像はこの他にもいろいろある。各種の方法を使用することができる。 In this way, in the case of a general real vector, mapping may be performed so that the distance relation is roughly preserved on the hypersphere. There are many other mappings that preserve the distance relations. Various methods can be used.
[1.3]まとめ
いろいろなデータ型からエレメント集合を作成する方法を具体的に説明した。エレメント作成方法は、いろいろな方法が無数にあり、また、それらをいろいろと組み合わせることもできる。
[1.3] Summary The method of creating an element set from various data types has been specifically described. There are a myriad of methods for creating elements, and they can be combined in various ways.
エレメントの作成は、もとのデータからなす角が小さい位置にあり、エレメント全体は偏りなく大体均等に分布するように作成する必要がある。そうすることによって、与えられたデータから、それに近いデータ、あるいは近いカテゴリーを高速に、精度良く見つけ出す方法が実現できる。詳細についてはこれから説明する。 It is necessary to create the elements so that the angle formed from the original data is at a small position, and the entire element is distributed evenly without any deviation. By doing so, it is possible to realize a method for quickly and accurately finding data or a category close thereto from given data. Details will be described later.
[2]最近点探索方法
[2.1]完全一致検索
あらかじめ多数のデータが与えられており、ある未知のデータが提示されたとき、データの中から一致するものを見つけ出すことを完全一致検索と呼ぶ。このような機能を実現する方法は良く知られており、高速な検索処理を行うための各種の方法が提案されている。
[2] Nearest point search method [2.1] Exact match search When a lot of data is given in advance and certain unknown data is presented, finding a match from the data is called an exact match search. Call. Methods for realizing such functions are well known, and various methods for performing high-speed search processing have been proposed.
与えられているデータ集合に対して、あらかじめ、完全一致検索に向くようなデータ構造を構築してデータを格納しておく。これをデータベースと呼ぶ。データベースはディスク上にある場合やメモリ上にある場合がある。それぞれ完全一致検索を行うための各種の処理方法が存在する。 For a given data set, a data structure suitable for an exact match search is constructed in advance and data is stored. This is called a database. The database may be on disk or in memory. There are various processing methods for performing an exact match search.
メモリ上にデータベースがあるとき、完全一致検索を行う良く知られたアルゴリズムには、2分木、ハッシュ法、バイナリーサーチ、線形サーチ、アドレスを直接参照する方法などがある。そのうちの1つの、ハッシュ法について簡単に説明する。 Well known algorithms for performing exact match searches when a database is in memory include binary trees, hashing, binary search, linear search, and direct address reference methods. One of them, the hash method, will be briefly described.
図4は、ハッシュテーブルの一例を説明する図である。いま、生年月日と氏名の組が多数あるとする。ハッシュ法では、十分な大きさのハッシュテーブルを用意しておいて、生年月日からハッシュ値を計算し、テーブルのそのアドレスに生年月日と氏名を格納する。同じ生年月日を持つ人のデータが発生した場合を考えて、一般的には、生年月日と氏名情報へのリンクを格納しておく。氏名は別の格納場所を確保しておいて、そこに保存する。こうすることにより、任意の生年月日が与えられたとき、その日付と一致する生年月日の人の氏名を調べられるようなデータ構造を実現できる。 FIG. 4 is a diagram illustrating an example of a hash table. Suppose that there are many pairs of birth dates and names. In the hash method, a sufficiently large hash table is prepared, a hash value is calculated from the date of birth, and the date of birth and name are stored at the address of the table. Considering the case where data of a person having the same date of birth is generated, in general, a link to the date of birth and name information is stored. Keep a separate storage location for your name. In this way, when an arbitrary date of birth is given, it is possible to realize a data structure in which the name of a person whose date of birth matches the date can be checked.
本発明の実施の形態では、完全一致検索手法を利用して、未知のデータが与えられたときに、大量のデータの中から近いデータを高速に検索する機能を実現する。本発明の実施の形態ではデータはベクトルで表現できるものとし、近さの尺度としてユークリッド距離を使用する。なおユークリッド距離に準じるものでもよい。 The embodiment of the present invention realizes a function of searching for close data from a large amount of data at high speed when unknown data is given by using an exact search method. In the embodiment of the present invention, data can be expressed as a vector, and Euclidean distance is used as a measure of proximity. It may be based on the Euclidean distance.
[2.2]最近点探索方法
最近点探索方法について説明する。あらかじめ用意されているデータを、学習データ、学習点、学習ベクトルなどと呼ぶことにする。未知のデータを、未知入力、未知データなどと呼ぶことにする。
[2.2] Nearest Point Search Method The closest point search method will be described. Data prepared in advance will be referred to as learning data, learning points, learning vectors, and the like. The unknown data is called unknown input, unknown data, etc.
[2.2.1]NCk空間の最近点探索方法の1例の説明
いま全てのデータが、2進表現で32ビットであるものとし、ビット=1の数が16個であるとする。学習データ数は220=1048576個であるとする。それぞれの学習データには名前(ラベル)が付けられている。それをL0,L1,…,L1048575とする。学習データは、一様にランダムに分布しているものとする。
[2.2.1] Description of an example of the nearest point search method in the N C k space Assume that all data is 32 bits in binary representation, and the number of bits = 1 is 16 . It is assumed that the number of learning data is 2 20 = 1048576. Each learning data is given a name (label). Let it be L 0 , L 1 ,..., L 1048575 . The learning data is assumed to be uniformly distributed at random.
このとき、学習データをデータベースに格納する方法は次のように行う。図6に示すように、データのビット=1である16個の場所のうち14個を選んで、そこのみをビット=1とした32ビットのデータを作成する。このような作成の仕方は組み合わせの数として120通りあるので、120個のデータができる。これをエレメントデータとする。エレメントを検索キーとしてエレメントデータと学習データのラベルの組をデータベースに格納する。これを1048576個の学習データ全てに対して行う。図5に、学習データのエレメントを検索キーとして、そのエレメントに学習データのラベルのリストをリンクさせた最近点探索用辞書の基本的なデータ構造の一例を示す。 At this time, the learning data is stored in the database as follows. As shown in FIG. 6, 14 out of 16 locations where the data bit = 1 is selected, and 32-bit data with only bit = 1 is created. Since there are 120 ways to create such combinations, 120 pieces of data can be created. This is element data. A set of element data and learning data labels is stored in the database using the element as a search key. This is performed for all 1048576 learning data. FIG. 5 shows an example of a basic data structure of a nearest point search dictionary in which a learning data element is used as a search key and a list of learning data labels is linked to the element.
未知のデータが与えられたとき、最近点探索は次のように行う。未知データは学習データと同じく、32ビットで、ビットが1である数は16個であるとする。未知データは一様ランダムに発生するものとする。未知データも学習データに対して行ったのと同様に、120個のエレメントを作成する。すなわち、1の数が14個であるような32ビットのデータが120個できる。 When unknown data is given, the nearest point search is performed as follows. It is assumed that the unknown data is 32 bits as in the learning data, and the number of 1 bits is 16. It is assumed that unknown data is generated uniformly at random. 120 elements are created for unknown data in the same manner as for learning data. That is, 120 pieces of 32-bit data in which the number of 1 is 14 can be created.
そのエレメントをキーとして、データベースの検索を行う。それにより、一致するエレメントに対応する学習データのラベルを取得することができる。見つかった学習データは、未知データと距離が4以内である。すなわち、未知データと高々4ビットの違いしかない。 Search the database using the element as a key. Thereby, the label of the learning data corresponding to the matching element can be acquired. The found learning data is within 4 distances from the unknown data. That is, there is only a difference of 4 bits at most from unknown data.
未知データの120個のエレメント全てについてデータベースを検索することによって、距離が4以内のデータを全て見つけ出すことができる。
未知データと距離=0のものは、120回の検索で120回出現する。
未知データと距離=2のものは、120回の検索で 15回出現する。
未知データと距離=4のものは、120回の検索で 1回出現する。
従って、ラベルごとに出現回数を集計すれば、距離の近いデータ順に順位付けすることができる。
By searching the database for all 120 elements of unknown data, all data within a distance of 4 can be found.
Unknown data and distance = 0 appear 120 times in 120 searches.
Unknown data and distance = 2 appear 15 times in 120 searches.
Unknown data and distance = 4 appear once in 120 searches.
Therefore, if the number of appearances is totaled for each label, the data can be ranked in the order of the closest distance.
検索を行ったがデータを1つも見つけられない確率、すなわち、未知データから距離が4以内のデータが1つも存在しない確率は、7.86×10−12である。従って、近いデータが見つからない可能性はほとんどない。平均的には、25.6個のデータが見つかる。検索回数は、120回で、検索ヒット回数の合計は平均的に約32回である。 The probability that no data is found after the search is performed, that is, the probability that there is no data within a distance of 4 from unknown data is 7.86 × 10 −12 . Therefore, there is almost no possibility that close data cannot be found. On average, 25.6 data are found. The number of searches is 120, and the total number of search hits is about 32 on average.
このようにして、未知データが与えられたとき、それから近いデータの情報を順位付けして正確に、かつ、高速に得ることができる。 In this way, when unknown data is given, information of data close thereto can be ranked and obtained accurately and at high speed.
[2.2.2]非対称検索
先の説明では、学習データと未知データの種類は同じで、エレメントの作成方法も同じであったが、学習データと未知データの種類が異なり、エレメントの作成方法も異なる場合でも検索が可能であることを説明する。
[2.2.2] Asymmetric search In the above explanation, the types of learning data and unknown data are the same, and the element creation method is the same. However, the types of learning data and unknown data are different, and the element creation method is different. Explain that the search can be performed even if they are different.
いま、学習データについては、先に述べた例を利用する。未知データは32ビットで、ビットが1である数が17個であるとする。図6に示すように、17個のうちの14個のビットを1にした32ビットのデータを作成する。これは680個ある。これをエレメントデータとする。これを用いてデータベースを検索する。こうすることによって、未知データから距離が5以内のデータ全てを、順位付けして、正確にかつ高速に見つけ出すことができる。 Now, for the learning data, the example described above is used. It is assumed that the unknown data is 32 bits, and the number of 1 bits is 17. As shown in FIG. 6, 32-bit data in which 14 of 17 bits are set to 1 is created. There are 680. This is element data. Use this to search the database. In this way, all data within a distance of 5 from unknown data can be ranked and found accurately and at high speed.
また、先の説明で、未知データが32ビットでビット=1である数が16個の場合で、120回の検索をしてもデータが見つからなかったとき、未知データと距離が2のデータを作成する。距離が2かつ、ビット=1である数が16個のものであるから、16×16=256により、これは256個ある。このそれぞれに対して120個のエレメントを作成して検索を行う。こうすることにより、いわば非常に見つけにくいデータでも見つけることができるようになる。
In the above description, if the number of unknown data is 32 bits and the number of bits = 1 is 16, and the data is not found even after 120 searches, the unknown data and the data of
[2.2.3]{0,1}N空間の場合の最近点探索方法の1例の説明
学習データは、2進表現で32ビットであるとする。学習データ数は220=1048576個であるとする。学習データは、一様にランダムに分布しているものとする。データの分布が一様ランダムではない場合についての補足説明は後で行う。
[2.2.3] {0, 1} Description of an example of the nearest point search method in the case of N space It is assumed that the learning data is 32 bits in binary representation. It is assumed that the number of learning data is 2 20 = 1048576. The learning data is assumed to be uniformly distributed at random. A supplementary explanation about the case where the data distribution is not uniform random will be given later.
エレメント作成方法を図7を参照して説明する。データ自分自身と同じものをエレメントの1つとする。これを0−エレメントとする。次に、データと1ビットだけ異なるデータは32種類ある。これもエレメントとする。これを1−エレメントとする。次に、データと2ビットだけ異なるデータは496種類ある。これもエレメントとする。これを2−エレメントとする。こうして、529個のエレメントが作成される。 The element creation method will be described with reference to FIG. One element is the same as the data itself. This is the 0-element. Next, there are 32 types of data that differ from the data by one bit. This is also an element. Let this be a 1-element. Next, there are 496 types of data that differ from the data by 2 bits. This is also an element. This is a 2-element. Thus, 529 elements are created.
ここでは、データベースを3つに分離する。データベース0に、0−エレメントと学習データのラベルの情報を格納する。データベース1に、1−エレメントと学習データのラベルの情報を格納する。データベース2に、2−エレメントと学習データのラベルの情報を格納する。それぞれのデータベースでの格納の仕方は、すでに説明してきたとおりである。
Here, the database is divided into three. The
未知データはやはり32ビットであるとし、一様ランダムに発生するものとする。検索は次のように行う。まず、0−エレメントを作成し、データベース0を検索する。もしデータが見つかったならば、それは未知データから距離=0すなわち、未知データと同一のデータである。
It is assumed that unknown data is still 32 bits and is generated uniformly at random. The search is performed as follows. First, 0-element is created and
データが見つからなければ、データベース1を検索する。ここでデータが見つかったならば、それは距離=1のデータである。見つからない場合は、データベース2を検索する。ここで見つかれば、それは距離=2のデータである。
If no data is found, the
いずれの場合も見つからないときは、次に32個の1−エレメントを作成する。そしてデータベース2を検索する。もしデータが見つかったならば、それは距離=3のデータである。
If neither is found, 32 1-elements are created next. Then, the
見つからないときは、496個の2−エレメントを作成し、データベース2を検索する。もしデータが見つかったならば、それは距離=4のデータである。
If not found, 496 2-elements are created and the
もし見つからないときは、未知データに対して3ビットだけ異なる4960個のデータを作成する。すなわちこれは3−エレメントと呼ぶべきものである。そしてデータベース2を検索する。もしデータが見つかったならば、それは距離=5のデータである。
If not found, 4960 data different from the unknown data by 3 bits are created. That is, it should be called a 3-element. Then, the
もし見つからないときは、同様にして、4−エレメント、5−エレメント、6−エレメント …、と順次作成し、データベース2を検索する。それにより、距離=6、距離=7、距離=8 …、のデータを探し出すことができる。
If not found, similarly, 4-element, 5-element, 6-element,... Are sequentially created and the
この方法においては、最近点が複数あった場合、それらを全て列挙することができる。上記方法によって検索したときの検索回数を見積もることができる。例えば未知入力に対する最近点が距離=4であった場合、検索回数は1+1+1+32+496=531回となる。最近点が距離=4以内に存在しない確率は、1.79×10−26である。従って、検索回数は最悪の場合でも、ほぼ確実に531回以下であることが保証される。また、平均検索回数を計算するとおよそ161.2である。 In this method, when there are a plurality of recent points, all of them can be listed. It is possible to estimate the number of searches when searching by the above method. For example, when the closest point to the unknown input is distance = 4, the number of searches is 1 + 1 + 1 + 32 + 496 = 531 times. The probability that the nearest point does not exist within the distance = 4 is 1.79 × 10 −26 . Therefore, even in the worst case, the number of searches is almost certainly guaranteed to be 531 or less. The average number of searches is about 161.2.
[2.2.4]一様ランダムでない場合
ここまでは、データの分布が一様ランダムであるという仮定のもとで、検索回数が少なくできることを見積もっていた。
[2.2.4] Case of non-uniform random So far, it has been estimated that the number of searches can be reduced under the assumption that the distribution of data is uniformly random.
分布が一様ランダムではなく、分布に偏りがある場合について説明する。学習データの分布が一様ランダムでなくても、学習データと未知データの確率的な出現分布は等しいと仮定することができる。多くの実用の場合ではそのような前提を用いてよい。 A case where the distribution is not uniformly random and the distribution is biased will be described. Even if the distribution of learning data is not uniformly random, it can be assumed that the probability distribution of learning data and unknown data is equal. Such assumptions may be used in many practical cases.
未知データが、学習データが疎に分布している場所に発生した場合、検索回数は一様ランダムの場合よりも大きくなる。逆に、未知データが、学習データが密の場所に発生した場合には、検索回数は一様ランダムの場合よりも小さくなる。未知データの発生の全ての場合で平均すると、どのような分布の場合でも、一様ランダムの場合の検索回数より小さくなる。 When unknown data occurs in a place where learning data is sparsely distributed, the number of searches becomes larger than that in the case of uniform randomness. On the other hand, when unknown data occurs in a place where learning data is dense, the number of searches is smaller than in the case of uniform randomness. On average in all cases of occurrence of unknown data, the number of searches in the case of uniform randomness is smaller in any distribution.
[2.2.5]EN空間の場合の最近点探索方法の1例の説明
学習データ、未知データとも32次元実数ベクトルであるとする。これは一般に、計算機の内部表現では、256バイトまたは128バイトのビットデータとして表現することができる。全てのデータは、大きさは1に正規化されているものとする。学習データ数は220=1048576個であるとする。学習データは、一様にランダムに分布しているものとする。学習データをxi(i=0〜1048575)とする。
[2.2.5]
ランダムな32×32直交行列を多数用意する。例えば100個とする。これをR−0〜R−99と名前を付けることにする。学習データに直交行列R−0をかける。これをr0xiとする。r0xから、32C9空間のうちで最も近い32個の点を選ぶ。これらは32ビットでビット=1の数が9個であるデータとして表現することができる。これをエレメントとする。 A large number of random 32 × 32 orthogonal matrices are prepared. For example, 100. These are named R-0 to R-99. The learning data is multiplied by the orthogonal matrix R-0. Let this be r 0 x i . From r 0 x, the closest 32 points in the 32 C 9 space are selected. These can be expressed as data having 32 bits and 9 bits = 1. This is an element.
学習データ全てに対してこの操作を行い、エレメントと学習データの情報をデータベース0に格納する。残りの全ての直交行列に対しても同様の操作を行い、それぞれ、データベース1〜データベース99に情報を格納する。
This operation is performed on all the learning data, and the element and learning data information is stored in the
次に、図8を参照して、未知入力からデータを検索する方法を説明する。未知入力ベクトルをx*とする。基本的に、未知データも同様に、エレメントを作成し、データベース0〜データベース99から学習データのラベルを取り出すのであるが、今まで説明してきた検索方法と異なる部分があるので、そのことを以下に説明する。
Next, a method for retrieving data from unknown input will be described with reference to FIG. Let x * be an unknown input vector. Basically, elements for unknown data are created in the same way, and labels of learning data are taken out from the
いま仮に、1回目のエレメントの検索で、ラベルL7,L20が見つかったとする。図8(a)に示すように、ラベルL7,L20を検索済みテーブルに追加する。x*とx7、x*とx20の内積を計算する。それぞれ、0.70、0,75であるとする。図8(a)に示すように、順位テーブルに、1位=L20,0.75、2位=L7,0.70が入る。 Assume that labels L7 and L20 are found in the first element search. As shown in FIG. 8A, labels L7 and L20 are added to the searched table. Calculate the inner product of x * and x 7 , x * and x 20 . Assume that they are 0.70, 0, and 75, respectively. As shown in FIG. 8A, first rank = L20,0.75, second rank = L7,0.70 is entered in the rank table.
次に、2回目のエレメントの検索で、ラベルL3,L7,L35が見つかったとする。
図8(b)に示すように、ラベルL3は検索済みテーブルにないので、これをテーブルに追加する。そして、x*とx3の内積を計算し、これが0.80であるとする。図8(b)に示すように、順位テーブルの1位にL3,0.80が入り、2位以下の順位が繰り下がる。
Next, it is assumed that labels L3, L7, and L35 are found in the second element search.
As shown in FIG. 8B, since the label L3 is not in the searched table, it is added to the table. Then, the inner product of x * and x 3 is calculated, and this is 0.80. As shown in FIG. 8 (b), L3 and 0.80 are entered in the first place of the order table, and the order of the second place or less is lowered.
L7は検索済みテーブルにあるので、内積計算は行わない。L35は検索済みテーブルにないので、図8(b)に示すように、テーブルに追加する。そして、x*とx35の内積を計算し、これが0.72であるとするとき、図8(b)に示すように、順位テーブルの3位に入り、以下の順位が繰り下がる。 Since L7 is in the searched table, the inner product calculation is not performed. Since L35 is not in the searched table, it is added to the table as shown in FIG. Then, to calculate the inner product of x * and x 35, which when is assumed to be 0.72, as shown in FIG. 8 (b), enters the 3-position of the ranking table, drops repeatedly following order.
エレメント検索操作を何回か行った状態を図8(c)に示す。検索回数が多くなるほど、順位テーブルの1位に正解が入る可能性が高くなるし、また、2位以下も正しい順位となっている可能性が高くなる。 FIG. 8C shows a state where the element search operation is performed several times. As the number of searches increases, there is a higher possibility that the correct answer will be placed in the first place in the ranking table, and there is a higher possibility that the second or lower place is in the correct order.
エレメント検索を320回行ったとき、最近接点が見つかる確率は5割程度である。1024回の検索では約9割であり、3200回行ったときはおよそ0.999となる。 When element search is performed 320 times, the probability of finding the closest point is about 50%. It is about 90% for 1024 searches, and approximately 0.999 when 3200 searches are performed.
この方法により、次のような機能を実現することができる。不正確な答えでも良いから、短い時間で未知入力に近い何らかのデータの情報が得たい場合には、検索を少ない回数で打ち切る。処理時間に余裕があるとき、あるいは、正確な答えを得たい場合には、検索回数を多く行う。時間をかけるほど精度の高い答えを得ることができる。このように、適応的に処理時間と精度を調節できる性質は実用的に有効である。 By this method, the following functions can be realized. Inaccurate answers are acceptable, so if you want to get information about any data close to unknown input in a short time, you can stop the search in a small number of times. When there is a margin in processing time, or when you want to get an accurate answer, perform a large number of searches. The more time you spend, the more accurate you can get. As described above, the property of adaptively adjusting the processing time and accuracy is practically effective.
[2.2.6]精度を高める方法
前述した方法において、精度をさらに高める手段について説明する。1つは、学習データに対するエレメントの作成方法を変えること、すなわち一般にはエレメント数を多くするようにすれば良い。また、直交行列の数を多くすることも有効である。デメリットとして、これはデータベースのサイズを大きくする要因になる。
[2.2.6] Method for Increasing Accuracy In the method described above, means for further improving accuracy will be described. One is to change the element creation method for the learning data, that is, to generally increase the number of elements. It is also effective to increase the number of orthogonal matrices. As a disadvantage, this increases the size of the database.
2つめの方法としては、未知データのエレメント数を多くすることである。非対称検索として説明した方法が利用できる。デメリットとして、これは処理時間を増大させる要因になる。 The second method is to increase the number of elements of unknown data. The method described as an asymmetric search can be used. As a demerit, this increases the processing time.
実際の目的とする処理に合わせて適切なパラメータを選択すればよい。 Appropriate parameters may be selected in accordance with the actual target processing.
[2.2.7]一般的なパラメータを決定する方法
今までの説明では、具体的なデータ型、次元数、学習データ数を与えて、特定のエレメント作成方法を示して説明をしてきた。
[2.2.7] Method for Determining General Parameters In the above description, a specific element creation method has been described by giving a specific data type, number of dimensions, and number of learning data.
本発明は特定の問題の状態に限定されず、もっと一般的に、不特定の問題にそれぞれ対処することができる。それにはデータ型、次元数、学習データ数に応じて、適切なエレメント作成方法などのパラメータを決定させてやればよい。エレメント作成方法についてはすでに説明したとおり、無数の各種の方法がある。 The present invention is not limited to a particular problem state, and more generally can address each unspecified problem. For this purpose, parameters such as an appropriate element creation method may be determined according to the data type, the number of dimensions, and the number of learning data. As described above, there are innumerable various methods for creating elements.
データ型、次元数、学習データ数が与えられて、データの分布が仮定できるとき、エレメント作成方法ごとに、データサイズ、検索時間などの値が理論的に計算できる。従って、目的とする処理に応じて適切なパラメータを選択すればよい。現実的な応用の場面においては、データの分布型がわからないことも多々ある。その場合には、実際のデータを用いて、実験的にパラメータを見つけ出すことができる。 When the data type, the number of dimensions, and the number of learning data are given and the distribution of data can be assumed, values such as data size and search time can be theoretically calculated for each element creation method. Therefore, an appropriate parameter may be selected according to the target process. In realistic application situations, the distribution type of data is often unknown. In that case, parameters can be found experimentally using actual data.
実際の問題に対して、要求される検索速度、検索の精度、使用可能データ容量に応じて、最適なパラメータを選択すればよい。 For an actual problem, an optimum parameter may be selected according to a required search speed, search accuracy, and usable data capacity.
[3]パターン認識方法
本発明により、大量のデータの中から最近点探索を高速に行えることを説明してきたが、この方法はパターン認識にも利用できる。パターン認識は、未知のデータが与えられたとき、そのデータがどのカテゴリーに一番近いかを判定する問題である。カテゴリーの集合はあらかじめ決まっている。
[3] Pattern Recognition Method According to the present invention, it has been described that the nearest point search can be performed at a high speed from a large amount of data. However, this method can also be used for pattern recognition. Pattern recognition is a problem of determining which category the data is closest to when given unknown data. The set of categories is predetermined.
一般的なパターン認識の方法は、たくさんのデータとカテゴリーのラベルの組(これを学習データ、教師信号などと呼ぶ)を入手しておいて、そのデータを使って精度の高い認識が行えるようなデータ構造をあらかじめ作っておく。 A general pattern recognition method is to obtain a large number of sets of data and category labels (called learning data, teacher signals, etc.) and use that data for highly accurate recognition. Create a data structure in advance.
[3.1]NN(Nearest Neighbor)法
NN法は、学習データを辞書に格納しておき、未知のパターンが与えられたとき、辞書を検索して、一番距離の近いデータを特定し、そのデータに対応するカテゴリーを答えとして返す。
[3.1] NN (Nearest Neighbor) Method The NN method stores learning data in a dictionary, and when an unknown pattern is given, searches the dictionary to identify the closest data, The category corresponding to the data is returned as an answer.
NN法では、学習データをたくさん辞書に格納しておくことにより、認識率を極限まで高くできることが理論的に明らかとなっている。しかしながら、学習データを大量に辞書に使用すると、検索に時間がかかるので、認識速度が遅くなるという欠点があることも良く知られている。 In the NN method, it is theoretically clear that the recognition rate can be increased to the limit by storing a large amount of learning data in a dictionary. However, it is well known that when a large amount of learning data is used in a dictionary, it takes a long time to search, so that the recognition speed is slow.
本発明の実施の形態では、すでに説明したとおり、大量のデータに対して最近点探索が高速に行えるので、これによりNN法の認識処理を高速にさせることができる。図9、図10に、本発明の実施の形態においてNN法を実現させるデータベース構造の一例を示す。図9は、学習データのエレメントを検索キーとして、そのエレメントにデータラベルのリストをリンクさせた最近点探索用辞書のデータ構造を示す。図10は、学習データのデータラベルとカテゴリーの対応テーブルを示す。図9の最近点探索用辞書により最近点探索を行い、見つかった最近点について、図10のテーブルを参照し、対応するカテゴリーを見つけることで、NN法を実現することができる。 In the embodiment of the present invention, as already described, the nearest point search can be performed at a high speed for a large amount of data, so that the recognition process of the NN method can be performed at a high speed. 9 and 10 show an example of a database structure for realizing the NN method in the embodiment of the present invention. FIG. 9 shows the data structure of a nearest point search dictionary in which an element of learning data is used as a search key and a list of data labels is linked to the element. FIG. 10 shows a correspondence table between data labels and categories of learning data. The NN method can be realized by performing a nearest point search using the nearest point search dictionary of FIG. 9 and referring to the table of FIG. 10 for the found nearest point and finding a corresponding category.
[3.2]単層識別構造
[3.2.1]データベース構造
上に説明した方法を変形することによって、パターン認識を実現する別の方法が構築できる。いままでは、エレメントからデータラベルへの情報をデータベースに格納していたが、データラベルの代わりにカテゴリーラベルを記憶させることができる。
[3.2] Single layer identification structure [3.2.1] Database structure By modifying the method described above, another method for realizing pattern recognition can be constructed. The information from the element to the data label is stored in the database as it is, but the category label can be stored instead of the data label.
この方法のメリットをこれから説明する。あるエレメントe1からデータラベルへのリンク情報が次のものであるとする。
e1→L1,L3,L6,L8
いま、データに対応するカテゴリー(カテゴリーラベル)が次の通りであるとする。
L1→C1
L3→C1
L6→C4
L8→C1
The merits of this method will now be described. Assume that link information from a certain element e1 to a data label is as follows.
e1 → L1, L3, L6, L8
Assume that the categories (category labels) corresponding to the data are as follows.
L1 → C1
L3 → C1
L6 → C4
L8 → C1
データベースに、データラベルの代わりにカテゴリーラベルを格納させると、重複する情報を省略できるので、次のようにできる。
e1→C1,C4
あるいは重複する数を保持しても良い。その場合は次のようになる。
e1→C1×3,C4×1
If category labels are stored in the database instead of data labels, duplicate information can be omitted.
e1 → C1, C4
Or you may hold | maintain the number which overlaps. In that case:
e1 → C1 × 3, C4 × 1
このようなデータ表現は、データベースのサイズを小さくさせる効果がある。平均的に1つのエレメントからたくさんのデータラベルの情報がリンクしているような状態は、検索回数よりも検索ヒット回数が多いので、最近点探索の場合には処理時間を増大させる要因になる。しかしながら、本発明における最近点探索のデータ件数は数万から数億を想定することができるが、パターン認識の場合は、普通はカテゴリー数は、2個〜数千個程度であるので、処理時間の問題はほとんどない。 Such data representation has the effect of reducing the size of the database. In a state where a lot of data label information is linked from one element on average, the number of search hits is larger than the number of searches, and this increases the processing time in the case of the nearest point search. However, although the number of data of the nearest point search in the present invention can be assumed to be tens of thousands to hundreds of millions, in the case of pattern recognition, the number of categories is usually about 2 to several thousand, so the processing time There is almost no problem.
パターン認識方法においても、最近点探索のときと同じく、どのようなエレメント集合作成方法を用いるかは具体的な問題ごとに適切な方法を選択すればよい。 In the pattern recognition method, as in the closest point search, what kind of element set creation method is used may be selected for each specific problem.
[3.2.2]得点の計算方法
パターン認識の場合には、カテゴリーごとに得点を集計し、一番得点の高いカテゴリーを答えとして返す。あるいは、得点の順番にカテゴリーの列を返す。得点の計算方法は、エレメントを検索して、ヒットしたカテゴリーの得点を1点加算し、それをすべてのエレメントについて繰り返し行い、合計点を求めればよい。また、図11に示すように、カテゴリーラベルと加算係数をペアでデータベースに格納しておけば、検索ヒットしたときに、その加算係数を加算するようにすればよい。
[3.2.2] Score calculation method In the case of pattern recognition, the score is totaled for each category, and the category with the highest score is returned as an answer. Or return a column of categories in the order of the scores. The score may be calculated by searching for elements, adding one score for the hit category, repeating it for all elements, and calculating the total score. In addition, as shown in FIG. 11, if the category label and the addition coefficient are stored in the database as a pair, the addition coefficient may be added when a search hit occurs.
[3.2.2.1]加算係数の決定方法
(a)
いま、あるエレメントからカテゴリー情報へのリンクが次のようであるとする。
e1→C1,C4,C8
この表現は、加算係数を省略した形式で、この場合は、検索にヒットしたときは、カテゴリーC1,C4,C8にそれぞれ1点加算する。
(b)
e1→(C1,0.3),(C4,1.2),(C8,0.5)
カテゴリーと加算係数をペアにしてデータベースに格納してある。この場合は、ヒットしたカテゴリーごとに加算係数を加算する。
[3.2.2.1] Addition coefficient determination method (a)
Assume that a link from an element to category information is as follows.
e1 → C1, C4, C8
This expression is in a form in which the addition coefficient is omitted. In this case, when the search is hit, one point is added to each of the categories C1, C4, and C8.
(B)
e1 → (C1, 0.3), (C4, 1.2), (C8, 0.5)
The category and the addition coefficient are paired and stored in the database. In this case, an addition coefficient is added for each hit category.
一般に、(b)の方が認識率をよくできるが、(a)の方法はデータベースサイズを縮小させる効果がある。実際の目的に応じて適切な方法を選択すればよい。 In general, the recognition rate can be improved in (b), but the method (a) has the effect of reducing the database size. An appropriate method may be selected according to the actual purpose.
加算係数は、認識性能が極大になるように、辞書作成時に学習データから決定する。加算係数の決定方法には各種ある。その方法の一例をこれから説明する。 The addition coefficient is determined from the learning data when creating the dictionary so that the recognition performance is maximized. There are various methods for determining the addition coefficient. An example of the method will now be described.
いま、学習用のデータは大量にあるものとする。いま辞書に使用するデータ数をある数nLに固定して、学習用データからnL個のデータをランダムに抽出し、(a)形式の辞書を作成するものとする。nL個のデータを抽出する操作はいくらでもできるので、たくさんの辞書を作成することができる。 It is assumed that there is a large amount of data for learning now. Assume that the number of data used in the dictionary is fixed to a certain number nL, and nL data are randomly extracted from the learning data to create a dictionary in the (a) format. Since any number of operations for extracting nL data can be performed, a large number of dictionaries can be created.
1つの辞書で認識させて得点を計算し、たくさんの辞書で同様にそれを行ない、カテゴリーごとに全ての辞書での得点を合計させて、その総得点によって認識結果を出すとき、一般に認識率はよくなる。このことの理論はアンサンブル学習と呼ばれ、理論的に説明されている。 When a single dictionary is used to calculate the score, the same is done for many dictionaries, and the scores for all dictionaries are summed up for each category. Get better. The theory of this is called ensemble learning and is theoretically explained.
たくさんの辞書で認識させるということは、加算係数を調整して1つの辞書にまとめることができる。 Recognizing in many dictionaries means that the addition coefficient can be adjusted and combined into one dictionary.
学習用のデータの中からカテゴリーC1のデータを1個を任意に選んだとき、あるエレメントe1に対してC1がリンクする確率をPr((e1,C1))とする。 When one piece of data of category C1 is arbitrarily selected from the learning data, the probability that C1 is linked to a certain element e1 is Pr ((e1, C1)).
nL個の学習データで辞書を作るとき、得点が加算される期待値は、1−(1−Pr(e1,C1))nLとなる。従ってたくさんの辞書で認識させたときは、平均的にこの値に近づく。 When creating a dictionary with nL learning data, the expected value to which the score is added is 1- (1-Pr (e1, C1)) nL . Therefore, when it is recognized by many dictionaries, it approaches this value on average.
全てのエレメントejとカテゴリーCkについて確率Pr((ej,Ck))を求める。実際には、手に入った学習データからその推定値を求めることができる。そして、1−(1−Pr(ej,Ck))nLを加算係数として辞書を作る。テスト用データを用意して、nLを変化させて認識率を調査する。認識率が最大となるところのnLを見つけることによって、最適な加算係数が決定できる。 The probability Pr ((e j , C k )) is obtained for all the elements e j and the category C k . Actually, the estimated value can be obtained from the learning data obtained. Then, a dictionary is created with 1- (1-Pr (e j , C k )) nL as an addition coefficient. Test data is prepared and the recognition rate is investigated by changing nL. By finding the nL where the recognition rate is maximized, the optimum addition coefficient can be determined.
以下、確率Pr((ej,Ck))を推定し、加算係数を決定する方法についてより詳しく説明する。 Hereinafter, a method for estimating the probability Pr ((e j , C k )) and determining the addition coefficient will be described in more detail.
いまN個の学習サンプルがあるとする。これを学習サンプルの母数とする。N個の学習サンプルから、第i番目の検索キーに第j番目のカテゴリー対応づけられる確率Pijを推定する方法を説明する。 Assume that there are N learning samples. This is set as the learning sample parameter. A method of estimating the probability Pij that is associated with the i-th search key and the j-th category from N learning samples will be described.
N個の学習サンプルを使って、第i番目の検索キーに第j番目のカテゴリー対応づけられる回数を集計する。これをKijとする。 Using N learning samples, the number of times the j-th category is associated with the i-th search key is tabulated. Let this be K ij .
推定値Pijは、
Pij=Kij/N
で与えられる。
統計学における大数の法則により、Nが大きいほど良い推定値となる。
The estimated value P ij is
P ij = K ij / N
Given in.
According to the law of large numbers in statistics, the larger N, the better the estimated value.
次にこのPijを使って辞書作成、認識を行なう方法を説明する。いま、母数Nの学習サンプルの集団の中からランダムにM個を取り出す。これを辞書作成用の学習サンプルとする。 Next, a method for creating and recognizing a dictionary using this Pij will be described. Now, M pieces are randomly extracted from the group of learning samples having the parameter N. This is a learning sample for creating a dictionary.
M個の学習サンプルを使って辞書を作成するとき、辞書内の第i番目の検索キーに第j番目のカテゴリーが対応づけられる確率は、1−(1−Pij)Mである。 When a dictionary is created using M learning samples, the probability that the j-th category is associated with the i-th search key in the dictionary is 1- (1-P ij ) M.
M個の学習サンプルで作成した辞書で認識をした場合、得点の期待値は、加算係数を1−(1−Pij)Mとしたときに等しい。 When recognition is performed using a dictionary created with M learning samples, the expected value of the score is equal when the addition coefficient is 1- (1-P ij ) M.
M個の学習サンプルで作成した辞書で、加算係数を1とした場合の得点計算により認識をした場合と、母数Nの集団からPijを求め、加算係数を1−(1−Pij)Mとしたときの得点計算により認識をした場合では、一般に、後者の方が認識率は良くなる。これは単純アンサンブル学習の効果である。すなわち、一般に、正解のカテゴリーの得点がその他のカテゴリーの得点より低くなる確率を極限まで低くできる効果がある。 In a dictionary created with M learning samples, P ij is obtained from a group of parameters N when recognition is performed by scoring when the addition coefficient is 1, and the addition coefficient is 1- (1-P ij ). In the case of recognition by scoring when M is assumed, the latter generally has a better recognition rate. This is an effect of simple ensemble learning. That is, in general, there is an effect that the probability that the score of the correct category is lower than the score of the other category can be lowered to the limit.
加算係数を決定する1−(1−Pij)Mという式は、Pijに対して単調増加関数であるから、現実的には、その代わりとなる何らかの単調増加関数f(Pij)を用いることによっても、やはり認識率をよくすることができる。 Since the expression 1- (1-P ij ) M that determines the addition coefficient is a monotonically increasing function with respect to P ij , in reality, some monotonically increasing function f (P ij ) is used instead. As a result, the recognition rate can be improved.
さて、いま加算係数が1−(1−Pij)Mであるとき、認識率は、Mを変化させると、上に凸の曲線を描き、極大値を取るところがある。従って、このときのMの値を用いて、関数f(Pij)=1−(1−Pij)Mとすると、最も優れた認識性能を実現することができる。 Now, when the addition coefficient is 1- (1-P ij ) M , when the recognition rate is changed, there is a place where a convex curve is drawn upward and takes a maximum value. Therefore, when the value of M at this time is used and the function f (P ij ) = 1− (1−P ij ) M , the most excellent recognition performance can be realized.
しかしながら、関数fとしては、もっと簡単な、
f(Pij)=Pij、
f(Pij)=Kij
のような線形関数、または、
f(Pij)=1 (Pij>threshold=0.3)
=0 (Pij<threshold=0.3)
のようなしきい関数などを採用しても良い。これは計算時間を速くする効果や、辞書サイズを小さくする効果がある。
However, the function f is simpler,
f (P ij ) = P ij ,
f (P ij ) = K ij
Or a linear function like
f (P ij ) = 1 (P ij > threshold = 0.3)
= 0 (P ij <threshold = 0.3)
A threshold function such as This has the effect of speeding up the calculation time and reducing the dictionary size.
加算係数の決定方法にはこの他にもいろいろある。各種の最適化問題を解くアルゴリズムを適用することができる。 There are various other methods for determining the addition coefficient. Algorithms that solve various optimization problems can be applied.
[4]最近点対探索方法
最近点対探索は、与えられた点集合の中から最も距離の近い2点を探す問題である。この派生として、ある距離以内の点の組を全て列挙するという問題もある。応用例について先に挙げておく。
[4] Nearest Point Pair Search Method The nearest point pair search is a problem of searching for two nearest points from a given point set. As a derivative of this, there is also a problem of enumerating all pairs of points within a certain distance. The application examples are listed above.
[4.1]点の相互距離を扱う問題の例
・点の均等配置問題
ある領域と点の数が与えられたとき、最近点対距離を最大にするようにその領域内に点を配置する問題
[4.1] Examples of problems dealing with mutual distances between points-Even point placement problem Given a region and the number of points, place the points in that region to maximize the distance between the nearest points problem
・異常接近しているデータの発見
例えば、多数の飛行機が飛行しているとき、互いに接近しすぎないように管制官は監視しなければならない。これは3次元空間である距離以内の最近点対を全て発見する問題に相当する。実用的な問題で、もっと高次元の問題も存在する。
• Finding abnormally close data For example, when a large number of airplanes are flying, the controller must monitor to avoid being too close to each other. This corresponds to the problem of finding all nearest point pairs within a distance that is a three-dimensional space. There are practical problems and higher-dimensional problems.
・カオス性の検出
多数の多次元データから何らかの法則性を見つけようとする分析方法の1つとして、そのデータがカオスであるかどうかを判定する。GP法(Grassberger-Procaccia algorithm)はカオス性検出の1つの方法であり、相関積分法とも呼ばれる。ある点から、半径r以内の点の数を数える。rを変化させると、半径r以内の点の数はあるカーブで増加していく。N次元のデータで全くランダムであれば、N次曲線となる。それより小さい次数の増加曲線であれば、カオスである可能性がある。
Detecting Chaos As one of analysis methods for finding some kind of law from a large number of multidimensional data, it is determined whether or not the data is chaotic. The GP method (Grassberger-Procaccia algorithm) is one method of chaotic detection and is also called a correlation integration method. From a certain point, the number of points within the radius r is counted. When r is changed, the number of points within the radius r increases along a certain curve. If N-dimensional data is completely random, an N-th order curve is obtained. If it is an increase curve of a smaller order, it may be chaotic.
・クラスタリング
多数の点を、まとまりのあるいくつかのグループに分ける。
・ Clustering Divide a large number of points into several groups.
[4.2]最近点対探索のアルゴリズム
最近点対探索の基本的な考え方は、意味としては、最近点探索方法と同じである。与えられた点集合から辞書を作り、与えられた点集合全てに対して、その辞書を使って最近点を探索し、最終的に最も距離の小さい点の組を求める。ただし、アルゴリズムの形は若干異なる。
[4.2] Nearest Point Pair Search Algorithm The basic concept of the nearest point pair search is the same as the nearest point search method in terms of meaning. A dictionary is created from the given point set, and the nearest point is searched using the given point set for all the given point set, and finally a set of points with the shortest distance is obtained. However, the algorithm is slightly different.
[4.2.1]32C16空間の場合の例
データの集合を{xi}とする。全てのデータは32ビットでビット=1の数は16個であるとする。xiからビット=1である16個の場所のうち14個を選んで、そこのみビット=1とした32ビットのデータを作成する。120個のデータができる。全てのデータに対してこの操作を行なう。
[4.2.1] Example of 32 C 16 Space A set of data is {x i }. It is assumed that all data is 32 bits and the number of bits = 1 is 16. From x i, 14 out of 16 locations where bit = 1 are selected, and 32-bit data with bit = 1 is created only there. 120 data can be created. This operation is performed for all data.
いま、空のデータベースを用意して、エレメントとデータラベルを順次格納する。図12(a)〜(d)は、最近点対探索の過程で生成される辞書と最近点対候補テーブルを説明する図である。
(1)いまx2はエレメント表現としてエレメントaを含んでいるとする。このとき、データベースの場所aからデータラベルL2にリンクする(図12(a))。
(2)x4もエレメントaを含んでいるとする。場所aはL2にリンクしている。このとき、L2とL4のペアをテーブルに記憶する。そして、L4はデータベースのL2の次にリンクする(図12(b))。
(3)x5もエレメントaを含んでいるとする。場所aからリンクを辿り、L2,L4を見つけることができるので、テーブルに(L2,L5)、(L4,L5)を記憶する(図12(c))。なお、テーブルに同じものがすでにある場合は、その出現回数を記録する。
Now, prepare an empty database and store the elements and data labels sequentially. 12A to 12D are views for explaining a dictionary and a closest point pair candidate table generated in the process of searching for a closest point pair.
(1) Now x 2 is to include an element a as an element representation. At this time, the data label L2 is linked from the database location a (FIG. 12A).
(2) x 4 also to contain elements a. Location a is linked to L2. At this time, the pair of L2 and L4 is stored in the table. L4 is then linked to L2 in the database (FIG. 12B).
(3) x 5 also to contain elements a. Since links L2 and L4 can be found from the location a, (L2, L5) and (L4, L5) are stored in the table (FIG. 12 (c)). If the same table already exists, the number of appearances is recorded.
全てのデータについて同じ処理を行なっていく。図12(d)は途中経過を示す図である。全てのデータについて行なうと、テーブルにはデータのペアと出現回数の最終的な情報を得ることができる。 The same processing is performed for all data. FIG. 12 (d) is a diagram showing the progress of the process. If it is performed for all the data, the table can obtain the final information of the data pair and the number of appearances.
32C16空間で32C14の120個のエレメントを作成した今の例では、距離≦4以内のデータのペアを全て列挙することができる。このとき、距離=0のものは出現回数120、距離=2のものは出現回数=15、距離=4のものは出現回数=1である。 In the present example where 120 elements of 32 C 14 are created in 32 C 16 space, all pairs of data within a distance ≦ 4 can be listed. At this time, the number of appearances is 120 for the distance = 0, the number of appearances = 15 for the distance = 2, and the number of appearances = 1 for the distance = 4.
この場合は、一定の距離以内の点の組を全て見つけるタイプのアルゴリズムの説明である。 In this case, it is an explanation of an algorithm of a type that finds all pairs of points within a certain distance.
[4.2.2]{0,1}32の場合の例
データ集合{xi}は32ビットデータとする。まず、xiから距離=0と1のものをエレメントとし、[4.2.1]で説明したようなアルゴリズムにより、データのペアを探す。このときに見つけることができるのは、距離=0,1,2のものである。もし、データの組を見つけることができなかったならば、距離≦2以内の最近点対が存在しないということである。
[4.2.2] Example of {0, 1} 32 The data set {x i } is 32-bit data. First, the elements of those from x i distance = 0 and 1, the algorithm as described in [4.2.1], find data pairs. What can be found at this time is one with distance = 0,1,2. If the data set cannot be found, there is no nearest point pair within a distance ≦ 2.
次に、xiから距離=1と2のものをエレメントとし、同様の操作を行なう。このときに見つけることができるのは、距離=2,3,4のものである。 Next, the elements of those from x i distance = 1 and 2, the same procedure. What can be found at this time is one at distance = 2,3,4.
データの組が見つからなかったならば、次は、xiから距離=2と3のものをエレメントとし、同様の操作を行なう。このときに見つけることができるのは、距離=4,5,6のものである。 If the data set is not found, next, the elements of those from x i in the distance = 2 and 3, the same procedure. What can be found at this time are those of distance = 4, 5, 6.
この場合は、最近点対の距離は指定しないで、答えを必ず見つけ出すタイプのアルゴリズムということになる。 In this case, the distance between the nearest points is not specified, and the algorithm is a type that always finds the answer.
[4.2.3]実数球面空間の場合の例
{xi}をN次元単位実数球面空間の点集合とする。適当な量子化空間Qを用意する。一様ランダムなN×N直交行列を多数用意する。これでQを変換すれば、いくらでも量子化空間を作ることができる。実装上は、Qを変換するのではなくて{xi}を変換することがあるが、意味は同じである。
[4.2.3] Example in Real Spherical Space Let {x i } be a point set in an N-dimensional unit real spherical space. An appropriate quantization space Q is prepared. A large number of uniform random N × N orthogonal matrices are prepared. If Q is transformed by this, any number of quantization spaces can be created. In implementation, {x i } may be converted instead of Q, but the meaning is the same.
各xiに直交行列R1をかける。これをr1xiとする。r1xiをQで量子化する。これをq(r1xi)とする。これはエレメントである。[4.2.1]と同様に、q(r1xi)とLiをデータベースに格納する。 Each x i is multiplied by an orthogonal matrix R 1 . Let this be r 1 x i . Quantize r 1 x i with Q. Let this be q (r 1 x i ). This is an element. Similarly to [4.2.1], q (r 1 x i ) and Li are stored in the database.
図13(a)、(b)は、最近点対探索の過程で生成される辞書と、内積値を格納した最近点対候補テーブルを説明する図である。図13(a)に示すように、いま場所aにL31とL89が格納されたとする。このとき、内積(x31,x89)を計算する。図13(b)に示すように、テーブルには、内積値が上位であるものの点のペアと内積値を記憶しておく。もし、ただ1つの最近点対の解を得ることが目的ならば、最大の内積値を示したペア1つだけを記憶する領域を用意しておけばよい。 FIGS. 13A and 13B are diagrams for explaining a dictionary generated in the process of searching for a nearest point pair and a nearest point pair candidate table storing inner product values. As shown in FIG. 13A, it is assumed that L31 and L89 are stored at the location a. At this time, the inner product (x31, x89) is calculated. As shown in FIG. 13B, the table stores a pair of points and an inner product value, although the inner product value is higher. If the purpose is to obtain a solution of only one nearest point pair, an area for storing only one pair showing the maximum inner product value may be prepared.
全てのxiについてここまでの処理が一通り終わったならば、別の直交行列R2を用いて、同様の処理をする。そのとき、それまで得られたテーブルの情報はそのまま保持しておいて引き続き使用する。 When the processing up to this point is completed for all x i , the same processing is performed using another orthogonal matrix R 2 . At that time, the information of the table obtained so far is kept as it is and used continuously.
R1,R2,R3,...と、統計的に十分信頼がおける回数を行なう。こうして得られた、内積が最大値を取る点のペアが最近点対となる。 R 1 , R 2 , R 3 ,... And the number of times that are statistically sufficiently reliable. The pair of points obtained in this way having the maximum inner product is the closest point pair.
例えば、{xi}を20次元の実数球面空間の点とする。Rを20×20直交行列とする。Rx1とRx2は、{0,1}20に量子化することによって、同じ20ビットのデータになるかもしれないし、ならないかもしれない。x1とx2の距離が近いほど、同じになる確率は高くなる。一様ランダムな直交行列をたくさん用意して、試行回数を多くすれば、最近点対のペアが一致する20ビットのデータになるケースが1回以上生じる確率は1に非常に近くなる。 For example, let {x i } be a point in a 20-dimensional real spherical space. Let R be a 20 × 20 orthogonal matrix. Rx 1 and Rx 2 may or may not be the same 20-bit data by quantizing to {0, 1} 20 . The closer the distance between x1 and x2, the higher the probability of being the same. If a large number of uniform random orthogonal matrices are prepared and the number of trials is increased, the probability that one or more cases of 20-bit data with matching pairs of closest points will be very close to 1.
[4.2.4]最近点対探索型のアルゴリズムの特徴
最近点対探索型のアルゴリズムで、最近点探索方法やパターン認識方法と大きく異なるのは、使用するデータ領域が、点の数のオーダーだけで済むことである。
[4.2.4] Features of the nearest point pair search type algorithm The nearest point pair search type algorithm differs greatly from the nearest point search method and pattern recognition method in that the data area used is in the order of the number of points. It is only necessary.
点の数をNPとすると、例えばハッシュテーブルを使用すれば、テーブルサイズはNP×1.5〜2.0程度でよい。一方、最近点対探索方法においては、32C16空間で点数220のときは、220×120に比例したデータ領域が必要であった。 Assuming that the number of points is NP, for example, if a hash table is used, the table size may be about NP × 1.5 to 2.0. On the other hand, the nearest point pair search method requires a data area proportional to 2 20 × 120 when the score is 2 20 in 32 C 16 space.
また、[4.2.3]のようなアルゴリズムでは、量子化空間を動的に変えることができる。一般に|Q|の大きさが小さいほど、最近点対を見つけやすくなるが、たくさんのペアが見つかってしまう。処理の途中でQを適当に変えれば、見つかるペアが少なくなるので、計算時間の削減につながる。 In addition, an algorithm such as [4.2.3] can dynamically change the quantization space. In general, the smaller the size of | Q | is, the easier it is to find a pair of points, but many pairs are found. If Q is appropriately changed during the process, fewer pairs are found, leading to a reduction in calculation time.
[5]実施例
実施例として、分散コーディングによるパターン認識を説明する。分散コーディングによる学習・認識手法の1つのモデルを構築し、考察を与える。この手法では、認識時間は学習サンプル数に依存せず定数時間となり、この手法の最も単純なモデルでは、学習時間は学習サンプル数に比例する。そのため、大量のサンプルからの学習が可能で、複雑なパターン認識問題に適用が期待できる。
[5] Embodiment As an embodiment, pattern recognition by distributed coding will be described. A model of learning / recognition method by distributed coding is constructed and given consideration. In this method, the recognition time does not depend on the number of learning samples and is a constant time. In the simplest model of this method, the learning time is proportional to the number of learning samples. Therefore, learning from a large number of samples is possible, and application to a complicated pattern recognition problem can be expected.
[5.1]分散コーディングによるパターン認識の基本原理
[5.1.1]ベクトルの分散表現
パターンベクトル空間として、原点を中心とするN次元の超球面上の空間を考える。すなわち、パターン空間上の任意のベクトルの大きさは一定であるものとする。いま、パターンベクトルxを複数のベクトルに分割して表現することを考える。すなわち、複数のベクトルによって、
x=αΣej (j=0,…,Ne−1) (5.1)
となるような、ベクトルの集合{ej}による表現を考える。これをxの{ej}による分散表現と呼ぶことにする。
[5.1] Basic Principle of Pattern Recognition by Distributed Coding [5.1.1] Distributed Expression of Vector Consider a space on an N-dimensional hypersphere centered at the origin as a pattern vector space. That is, the size of an arbitrary vector on the pattern space is assumed to be constant. Now, consider that the pattern vector x is divided into a plurality of vectors. That is, by a plurality of vectors,
x = αΣe j (j = 0,..., N e −1) (5.1)
Consider an expression by a set of vectors {e j } such that This is referred to as a distributed representation of x by {e j }.
Qを離散的な超球面空間とする。Qの点でxから近いもの上位p個を選ぶ。これをxのQ上のp−近傍点と呼び、Q(x,p)と表記することにする。近傍点を作成するためのこのような空間を複数個用意してもよい。いまNQ個の異なる空間Q0,…,QNQ−1からそれぞれQk(x,pk)を作成すると、全体ではΣpk個の点が選ばれる。 Let Q be a discrete hyperspherical space. Select the top p items that are close to x at point Q. This is called a p-neighbor point on Q of x, and is expressed as Q (x, p). A plurality of such spaces for creating neighborhood points may be prepared. Now, when Q k (x, p k ) is created from N Q different spaces Q 0 ,..., Q NQ−1 , Σp k points are selected as a whole.
近傍点は、意味としてはxのまわりに分布している。これは式(5.1)で提示したxの分散表現になっている(Ne=Σpkとする)。 Neighboring points are distributed around x in meaning. This is (the N e = Σp k) has become distributed representation of the presented x in the equation (5.1).
後述するパターン認識の効果を高めるには、空間Qとしては、|Q|が非常に大きな数であるようなものを選ぶ。pは小さな数を採用する。 In order to enhance the effect of pattern recognition described later, the space Q is selected so that | Q | is a very large number. p is a small number.
本手法では、高次元空間の直交傾向と、分布が密であるならばその近傍に点が統計的に安定して存在するという原理を、暗に使っている。このような性質を用いた連想記憶手法の1つが[6]で述べるカネルバの疎分散記憶である。 This method implicitly uses the principle of orthogonality in a high-dimensional space and the principle that if the distribution is dense, points are statistically stable in the vicinity. One of the associative memory methods using such properties is Canelva's sparse distributed memory described in [6].
[5.1.2]分散表現の例
分散表現を行うには、元のパターンベクトル空間は超球面上の空間であればどのようなものであってもよいし、Qとpの選び方も無数にある。以下に単純な例を示す。なお、特定の空間を定義する下記の記号を使用する。
[5.1.2] Example of distributed representation In order to perform distributed representation, the original pattern vector space may be any space on the hypersphere, and there are numerous ways to select Q and p. It is in. Here is a simple example. The following symbols that define a specific space are used.
・バイナリ空間:
{0,1}N≡{x|x=(xi),xi∈{0,1},i=0,…,N−1}
{−1,+1}N≡{x|x=(xi),xi∈{−1,+1},i=0,…,N−1}
・ Binary space:
{0, 1} N ≡ {x | x = (x i ), x i ε {0, 1}, i = 0,..., N−1}
{−1, + 1} N ≡ {x | x = (x i ), x i ∈ {−1, + 1}, i = 0,..., N−1}
・コンビネーション空間:
NCk≡{x|x∈{0,1}N,|x|=k}
NCk ±≡{x|x∈{−1,+1}N,|x|=2k−N}
・ Combination space:
N C k ≡ {x | x∈ {0,1} N , | x | = k}
N C k ± ≡ {x | x∈ {−1, + 1} N , | x | = 2k−N}
・階乗空間:
N!={x=(x0,x1,…,xN−1)|
xi∈{0,1,…,N−1},xi≠xj(i≠j)}
N!±={x=(x0,x1,…,xN−1)|
xi∈{2k−N+1}(k=0,…,N−1),xi≠xj(i≠j)}
・ Floor space:
N! = {X = (x 0 , x 1 ,..., X N−1 ) |
x i ∈ {0, 1,..., N−1}, x i ≠ x j (i ≠ j)}
N! ± = {x = (x 0 , x 1 ,..., X N−1 ) |
x i ε {2k−N + 1} (k = 0,..., N−1), x i ≠ x j (i ≠ j)}
例1
x∈NCN/2,Q=NCN/2−d/2
xからQの点でハミング距離=d/2であるものは、N/2CN/2−d/2個存在するので、Q(x,N/2CN/2−d/2)はxの分散表現となる。
x=(2/N/2CN/2−d/2)Σej,ej∈NCN/2−d/2
例えば、32C16のベクトルを120個の32C14のベクトルによる分散表現で表すことができる。
Example 1
x∈ N C N / 2 , Q = N C N / 2−d / 2
Since there are N / 2 C N / 2−d / 2 hamming distances at the point from x to Q, Q (x, N / 2 C N / 2−d / 2 ) is This is a distributed representation of x.
x = (2 / N / 2 C N / 2-d / 2 ) Σe j , e j ∈ N C N / 2-d / 2
For example, 32 C 16 vectors can be represented by a distributed representation of 120 32 C 14 vectors.
例2
x∈N!±,Qk=NC1 ±,NC2 ±,…,NCN−1 ±
xから、NC1,NC2,…,NCN−1への最近傍点をそれぞれ求める。こうしてN−1個のベクトルによる分散表現となる。
Example 2
x∈N! ±, Q k = N C 1 ±,
From x, nearest points to N C 1 , N C 2 ,..., N C N−1 are obtained. In this way, a distributed expression with N-1 vectors is obtained.
[5.1.3]パターン認識方法
本節では、前節で述べたような表現を用いたパターン認識の基本的な手法を示す。
[5.1.3] Pattern recognition method This section shows the basic method of pattern recognition using expressions as described in the previous section.
Q(x,p)はQの部分集合であるから、冪集合2Qの元である。つまり、Q(x,p)を{0,1}|Q|の元として表すことができる。NQ個の空間Qkからそれぞれこのようなものを作るとき、これらのベクトルの要素を全て並べて、非常に高次元の2値ベクトル:
b=(bi)∈{0,1}Σ|Qk|
を作ることができる。
Since Q (x, p) is a subset of Q, it is an element of 冪 set 2 Q. That is, Q (x, p) can be expressed as an element of {0, 1} | Q | . When creating each of these from N Q spaces Q k , all the elements of these vectors are lined up to give a very high-dimensional binary vector:
b = (b i ) ∈ {0, 1} Σ | Qk |
Can be made.
このことは、xを非常に高次元の空間に写像することに相当する。元のパターンの分布がどのようであっても、次元がサンプル数よりも高いような非常に高次元の空間に写像すれば必ず線形分離可能となる。従って、図14に示すように、入力層がΣ|Qk|個、出力層がNC個の仮想的な単層識別関数を構築することができる。ここで、カテゴリをCj(j=0,…,NC−1)とする。 This is equivalent to mapping x to a very high dimensional space. Whatever the distribution of the original pattern, linear separation is always possible if it is mapped to a very high-dimensional space whose dimension is higher than the number of samples. Therefore, as shown in FIG. 14, a virtual single-layer discriminant function having Σ | Qk | input layers and N C output layers can be constructed. Here, the category is Cj (j = 0,..., N C −1).
未知パターンxの認識は、xをbに変換し、
score(x,Cj)=Σbiwij (5.2)
を計算し、
k=argmax{score(x,Cj)}
となるカテゴリCkが認識結果となる。score()は類似度に相当するものであり、ここでは得点と呼ぶことにする。
The recognition of the unknown pattern x converts x to b,
score (x, C j ) = Σb i w ij (5.2)
Calculate
k = argmax {score (x, C j )}
The category Ck becomes the recognition result. score () corresponds to the similarity and will be referred to as a score here.
この構造において、学習サンプルを完全に識別できるような重み係数wijは簡単に決定できる。 In this structure, a weighting factor w ij that can completely identify the learning sample can be easily determined.
始めは全てのwijを0にしておく。カテゴリCjに属する学習サンプルxをbに変換する。bの要素biが1であるとき、wijを1にする。これを全ての学習サンプルに対して行う。学習したパターンに対しては得点は必ず満点になるので、複数のカテゴリの得点が満点で同点の場合を除いては、必ず正解になる。 Initially , all w ij are set to 0. The learning sample x belonging to the category C j is converted into b. When the element b i of b is 1, w ij is set to 1. This is performed for all learning samples. Since the score is always a perfect score for the learned pattern, it is always correct except when the scores of multiple categories are full and equal.
辞書は、wij=1となるところのi,jの情報だけ記憶できればよい。また、得点の計算はbi=1となっているところのwijが0であるか1であるかが判定できればよい。いま学習サンプル数をNLとすると、このような要件を満たす辞書を作成し、学習時間がO(Ne×NL)で、かつ認識時間がO(Ne)となるようなアルゴリズムが存在する。また、辞書サイズはO(Ne×NL)を下回る。すなわち学習時間は学習サンプル数に比例し、認識時間は辞書サイズに依存せず、定数時間である。 The dictionary only needs to be able to store information on i and j where w ij = 1. Further, the calculation of the score only needs to be able to determine whether w ij where b i = 1 is 0 or 1. Now, assuming that the number of learning samples is NL , there is an algorithm that creates a dictionary that satisfies these requirements, has a learning time of O (N e × N L ), and a recognition time of O (N e ). To do. The dictionary size is less than O (N e × N L ). That is, the learning time is proportional to the number of learning samples, and the recognition time is a constant time without depending on the dictionary size.
[5.2]分散コーディングによる認識実験と学習法の改良
[5.2.1] 重み係数の改良
本手法の構造は、(5.2)式のような高次元の線形識別関数となっているから、重み係数wを調整することが考えられる。本節では単純アンサンブル学習の考え方を適用する。
[5.2] Recognition experiment by distributed coding and improvement of learning method [5.2.1] Improvement of weighting coefficient The structure of this method is a high-dimensional linear discriminant function as shown in equation (5.2). Therefore, it is conceivable to adjust the weighting coefficient w. In this section, the concept of simple ensemble learning is applied.
いま、サンプルは多数あるものとし、これらは真の分布に従っているものとする。この中からランダムにサンプルをNL個取り出して辞書を作成する。NL個のサンプルを取り出す操作を独立に多数回繰り返すことにより多数の辞書ができる。それぞれの辞書で認識を行い、得られた得点を合計したものを最終的な認識結果とすれば、一般に、その認識率は1つの辞書で認識したときよりも良くなる。 It is assumed that there are a large number of samples and these follow a true distribution. From this, N L samples are randomly extracted to create a dictionary. A large number of dictionaries can be created by repeating the operation of taking out N L samples many times independently. If recognition is performed in each dictionary and the sum of the obtained scores is used as a final recognition result, generally, the recognition rate is better than when recognition is performed with one dictionary.
この場合の各カテゴリの得点の期待値を計算する。いま、ランダムにカテゴリCに属する1個のパターンxを取り出して辞書を作成したとき、wij=1となる確率をpijとおくと、xをb=(bi)に変換したとき、
pij=Pr(bi=1 and C=Cj)
となる。
In this case, the expected value of the score of each category is calculated. Now, when one pattern x belonging to category C is randomly extracted and a dictionary is created, the probability that w ij = 1 is set as p ij , and when x is converted to b = (b i ),
p ij = Pr (b i = 1 and C = C j )
It becomes.
NL個のサンプルで辞書を作成したときwij=1となる確率は、pijを使って1−(1−pij)NLと書ける。 N L pieces of the probability of w ij = 1 when you create a dictionary in the sample can be written and use the p ij 1- (1-p ij ) NL.
従って、多数の辞書による認識結果を平均するときの極限は、入力パターンをx*→B*=(bi *)とすると、
E[score(x*,Cj)]=Σbi *E[wij]=Σbi *(1−(1−pij)NL)
となる。
Therefore, the limit when averaging the recognition results from a large number of dictionaries is that the input pattern is x * → B * = (b i * ).
E [score (x * , C j )] = Σb i * E [w ij ] = Σb i * (1- (1-p ij ) NL )
It becomes.
結局、図15のように、重み係数wijを1−(1−pij)NLとした1つの線形識別関数にすることができる。 Eventually, as shown in FIG. 15, one linear discriminant function in which the weight coefficient w ij is 1- (1-p ij ) NL can be obtained.
こうすることによって、記憶領域も増えず、認識速度もシンプルなアルゴリズムと同等することができる。 By doing so, the storage area does not increase and the recognition speed can be equivalent to a simple algorithm.
現実には真の出現確率pijを求めることはできないが、多数のサンプルから近似値pij^を知ることができるのでこれを利用する。最適なNLを決定するためには、学習用サンプルデータの他にテスト用データを用意する。NLを変化させると認識率の極大値を取る場所があるので、最適な値を探索することは容易である。 In reality, the true appearance probability p ij cannot be obtained, but since the approximate value p ij ^ can be known from a large number of samples, this is used. In order to determine the optimum N L , test data is prepared in addition to the learning sample data. Since there is a place where the maximum value of the recognition rate is obtained when N L is changed, it is easy to search for the optimum value.
なお、サンプル数を増やして推定値pij^が真の値に近づくとき、最適なNLは単調に減少し、[5.1.3]節で示した基本アルゴリズムにおける学習の飽和点のサンプル数に収束する。このとき、学習サンプルの極限における認識率は、それ以上向上しない限界値に行きあたり、一般には最良の認識率までは到達することはできない。そうではあるが、現実の適用においてはある程度の有効性を認めることができる。このような、重み係数を出現頻度の関数で調節する構造を改良アルゴリズムと呼ぶ。 Note that when the number of samples is increased and the estimated value p ij ^ approaches a true value, the optimal NL decreases monotonically, and the sample of the saturation point of learning in the basic algorithm shown in section [5.1.3] Converge to a number. At this time, the recognition rate at the limit of the learning sample reaches a limit value that does not increase any more, and generally the best recognition rate cannot be reached. Nevertheless, a certain degree of effectiveness can be recognized in real applications. Such a structure in which the weight coefficient is adjusted by a function of the appearance frequency is called an improved algorithm.
[5.3]まとめ
分散コーディングによる一連のパターン認識のアルゴリズムを提示した。以下にアルゴリズムの性質をまとめる。
[5.3] Summary A series of pattern recognition algorithms by distributed coding was presented. The algorithm properties are summarized below.
・辞書は単層識別構造をしており、認識は高速に行える。全てのカテゴリに対して類似度が求められる。多数のカテゴリの識別問題に対して適用が可能である。 -The dictionary has a single-layer identification structure, and recognition can be performed at high speed. Similarities are found for all categories. It can be applied to many categories of identification problems.
・基本アルゴリズム:全学習サンプルを1回参照するだけで学習が行える。辞書は単層識別構造で、重み係数は0,1である。学習の飽和が起こることがある。 -Basic algorithm: Learning can be performed by referring to all learning samples once. The dictionary has a single-layer identification structure, and weighting factors are 0 and 1. Saturation of learning may occur.
・改良アルゴリズム:学習は高速である。重み係数はエレメントの出現頻度の関数で、実数値を取る。学習の頭打ちが起こることがある。 -Improved algorithm: Learning is fast. The weight coefficient is a function of the appearance frequency of the element and takes a real value. The learning peak may occur.
認識速度は学習サンプル数に影響を受けず高速である。このことから、大量のサンプルを学習することによって、認識率が高く、かつ認識速度が高速なプログラムを実現することができる。 The recognition speed is not affected by the number of learning samples and is high speed. Therefore, by learning a large number of samples, a program with a high recognition rate and a high recognition speed can be realized.
[6]カネルバの疎分散記憶との違い
本発明の実施の形態で用いた分散コーディングによる手法と、カネルバ(Kanerva)による疎分散記憶(Sparse Distributed Memory)の違いについて補足する。疎分散記憶では、球面空間にランダムな多数の点を分散させておき、そのうちのxから距離r以内の点について、書き込んである情報を読み出して総合することによって、xの最近点を漸近的に想起していきます。疎分散記憶の詳細は、P. Kanerva, "Sparse Distributed Memory", MIT Press, November, 1988に記載されている。
[6] Difference from Kanelva's sparse distributed memory The difference between the distributed coding technique used in the embodiment of the present invention and Kanerva's sparse distributed memory will be supplemented. In the sparse distributed memory, a large number of random points are dispersed in a spherical space, and the written information is read and integrated for points within a distance r from x, thereby asymptotically determining the closest point of x. I will recall. Details of sparse distributed memory are described in P. Kanerva, "Sparse Distributed Memory", MIT Press, November, 1988.
カネルバの疎分散記憶の例
ここでは、N,N',Xを集合を表す記号とする。x,yを点とする。
N={0,1}1000とする。N上でランダムに100万点を選んだ点の集合をN’とする。これをハードロケーションと呼ぶ。Nの点1万点の集合Xを学習データとする。
Example of Canelva's sparse distributed storage Here, N, N ′, and X are symbols representing sets. Let x and y be points.
Let N = {0, 1} 1000 . A set of points on which one million points are randomly selected on N is N ′. This is called a hard location. A set X of 10,000 N points is set as learning data.
[6.1]データの書き込み
x∈Xなるxからハミング距離451以内のN’の点全てにxの情報を書き込む。複数のXの点が同じハードロケーションに書き込みを行なうときは、その点の平均、正確には書き込まれる全ての点の平均に最も近い{0,1}1000の点を書き込む。
[6.1] Writing of data The information of x is written to all N ′ points within the Hamming distance 451 from x where x∈X. When multiple X points write to the same hard location, the {0, 1} 1000 points that are closest to the average of the points, more precisely the average of all points written, are written.
[6.2]データの読み出し
未知の点をyとする。yからハミング距離451以内のN’の点全ての情報を読み出し、それを平均し、W1(y)とする。W1(y)に対して、同じことをする。これをW2(y)とする。これを繰り返すと、Wt(y)はある点に収束する。これはyからXで最も近い点である。
[6.2] Reading data Let y be an unknown point. Information on all points N ′ within a Hamming distance 451 from y is read out and averaged to obtain W 1 (y). Do the same for W 1 (y). This is defined as W 2 (y). If this is repeated, W t (y) converges to a certain point. This is the closest point from y to X.
[6.3]本発明の実施の形態と疎分散記憶との違い
(1)疎分散記憶では、ある点xから、書き込むべき、または読み出すべき距離451以内のN’の点全てを効率的に見つけ出すアルゴリズムが存在しない。通常の計算機では効率的に処理できず、並列的な処理が行なえるニューロコンピュータを必要とする。
[6.3] Difference between Embodiment of the Present Invention and Sparsely Distributed Storage (1) In sparsely distributed storage, all points N ′ within a distance 451 to be written to or read from a certain point x are efficiently processed. There is no algorithm to find out. A normal computer cannot be processed efficiently, and a neurocomputer capable of parallel processing is required.
(2)ある点からハミング距離451以内のN’の点はおよそ1000個ある。これは、ベクトルをN’の1000近傍点で表現するエレメント表現に相当する。しかし、ハミング距離451は、N’の0.001に相当する。これは1000次元の空間としては非常に大きな数である。1000次元でハミング距離451の点へは、なす角が約84.376°に相当する。ある点aからなす角が84.376°以内である2つの点x、yの相互位置関係は、なす角が0°〜168.752°でなる。すなわち、非常に離れた点どうしがエレメントを共有することになる。 (2) There are approximately 1000 N ′ points within a Hamming distance 451 from a certain point. This corresponds to an element expression that expresses a vector by N ′ 1000 neighboring points. However, the Hamming distance 451 corresponds to N ′ of 0.001. This is a very large number for a 1000-dimensional space. The angle formed with respect to the point of the Hamming distance 451 in 1000 dimensions corresponds to about 84.376 °. The mutual positional relationship between two points x and y whose angle formed from a point a is within 84.376 ° is such that the angle formed is 0 ° to 168.752 °. That is, very distant points share an element.
一方、本発明の実施の形態において、[2.2.1]の32C16空間の例では、エレメントは32C14空間のうちの16C14個であるから、120/471435600=0.000000254と小さい数になる。このような小さい比率にすることは、ヒットするデータを少なくする効果があり、計算時間を速くすることができる。なぜなら、入力データとエレメントのなす角は28.955°であるので、エレメントを共有する2点のなす角は、0°〜57.91°の範囲であり、近い点としかエレメントを共有しないからである。 On the other hand, in the example of the 32 C 16 space of [2.2.1] in the embodiment of the present invention, since the number of elements is 16 C 14 out of the 32 C 14 space, 120/471435600 = 0.000000254 is small. Become a number. Such a small ratio has the effect of reducing the hit data, and the calculation time can be increased. Because the angle between the input data and the element is 28.955 °, the angle between the two points sharing the element is in the range of 0 ° to 57.91 °, and the element is shared only with a close point. It is.
(3)同じアドレスに複数のデータを書き込むとき、疎分散記憶では、全てのデータの平均値を書き込んでいる。それに対して本発明では、リンク形式により複数のデータを全て記憶させる。もっとも、「リンク形式」と言っているが、必ずしも狭い意味でのリンク形式を取るわけではない。例えば、ハッシュ法であればオープンアドレス法というものも存在する。意味はリンク形式と全く同じである。 (3) When writing a plurality of data at the same address, the average value of all data is written in sparse distributed storage. On the other hand, in the present invention, a plurality of data are all stored in the link format. However, although it is called "link format", it does not necessarily take a link format in a narrow sense. For example, there is an open address method for the hash method. The meaning is exactly the same as the link format.
以上、本発明を実施の形態をもとに説明した。これらの実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。 The present invention has been described based on the embodiments. It is understood by those skilled in the art that these embodiments are exemplifications, and that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. By the way.
そのような変形例を説明する。実施の形態では、分散コーディングの適用分野として、最近点探索、パターン認識、および最近点対探索を挙げたが、適用分野はこれに限られない。たとえば、本発明を連想記憶型のデータ検索方法に適用することができる。連想記憶型のデータ検索では、検索対象ベクトルをX(t)とし、初期状態はX(0)=Xとする。検索において、見つかったエレメント全ての平均ベクトルをX(t+1)とする。これを繰り返すと,X(t)はあるベクトルに収束する。これを検索結果とする。連想記憶型検索では、新しく発生した事例に対して、過去の事例データを検索して、最適な行動を決定することができる。このとき、複数の候補の中から総合的に判断することができる。また、処理時間の制約に応じて、判断の精度を変えることができる。例えば、緊急の場合にも処理が破綻せず、適応的な行動をするロボットを作ることが可能となる。 Such a modification will be described. In the embodiment, as the application field of distributed coding, the closest point search, the pattern recognition, and the closest point pair search are given, but the application field is not limited to this. For example, the present invention can be applied to an associative memory type data search method. In the associative memory type data search, the search target vector is X (t), and the initial state is X (0) = X. In the search, let X (t + 1) be the average vector of all found elements. If this is repeated, X (t) converges to a certain vector. This is the search result. In the associative memory type search, it is possible to search past case data for a newly generated case and determine an optimum action. At this time, it is possible to comprehensively judge from a plurality of candidates. In addition, the accuracy of determination can be changed according to processing time constraints. For example, even in an emergency, it is possible to make a robot that does not break down and performs adaptive behavior.
実施の形態では、入力データを複数の直交行列により変換して、入力データの多数の分散表現を生成したが、厳密な直交行列を使わずに、ランダムな行列により入力データを変換してもよい。精度は落ちるが、多数のランダムな行列で変換することにより、統計的に安定することが期待できる。 In the embodiment, the input data is converted by a plurality of orthogonal matrices to generate a large number of distributed representations of the input data. However, the input data may be converted by a random matrix without using a strict orthogonal matrix. . Although the accuracy is reduced, it can be expected to be statistically stable by transforming with a large number of random matrices.
最近点探索および最近点対探索における検算は、用途や目的により必要な場合と必要でない場合とがある。実数データの場合は、スコアで1位になったとしても、それが正解であるとは限らず、本当に正解であるかどうかは検算してみなければわからない。したがって、たいていの場合には検算をすることが必要であるが、目的によっては必要でない場合もある。たとえば、不完全な検索でもよいから、とにかく提示されたデータに近いデータを検索したい場合がある。連想記憶、発想支援のような目的が使われる場合や、限られた時間内で動的に判断しなければならないようなリアルタイム性のある処理系で使われる場合などである。 The verification in the nearest point search and the nearest point pair search may or may not be necessary depending on the application and purpose. In the case of real number data, even if it reaches the first place in the score, it is not always the correct answer, and it is impossible to know if it is really correct or not. Therefore, in most cases, it is necessary to check, but depending on the purpose, it may not be necessary. For example, since an incomplete search may be performed, there is a case where it is desired to search for data close to the presented data. This is the case when an object such as associative memory or idea support is used, or when it is used in a processing system having real-time characteristics that must be determined dynamically within a limited time.
また、100回の試行で1位の得点が50点、2位の得点が1点、3位以下は0点のような検索結果が得られた場合は、検算するまでもなく、統計的にほぼ絶対、得点1位のデータは正解であると判断することができる。 In addition, if a search result such as 50 points for the first place, 1 point for the second place, 1 point for the third place and 0 points for the third place or less after 100 trials, there is no need to check and statistically Almost absolutely, the data with the highest score can be determined to be correct.
また、点の相互距離を扱う問題では必ずしも検算をしないことがある。点の均等配置問題では、最初のうちは検算をしないで、2点間の距離が近いと思われるペアを多数見つけることが優先される。 In addition, the problem of handling the mutual distance between points is not always verified. In the point distribution problem, priority is given to finding a large number of pairs that are considered to be close to each other without being checked at first.
10 直交変換部、 20 分散表現生成部、 30 辞書生成部、 35 加算係数決定部、 40 検索部、 50 検算部、 60 分析部、 70 データベース、 72 辞書記憶部、 80 検索結果記憶部、 82 分析結果記憶部、 100 最近点探索装置、 110 最近点探索用辞書、 130 最近点候補テーブル、 200 パターン認識装置、 210 パターン認識用辞書、 230 カテゴリー候補テーブル、 300 最近点対探索装置、 330 最近点対候補テーブル。
DESCRIPTION OF
Claims (10)
離散空間に配置された有限個の点の内、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成する辞書生成部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記学習データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成することにより、前記学習データに対して複数の分散表現が生成され、分散表現毎に前記辞書が生成されることを特徴とするデータベース生成装置。 A data conversion unit that converts learning data represented as points in a real space created by a real vector whose real values can be taken by each component by a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the converted learning data in order from the closest one , obtain at least one neighboring point of the converted learning data , A distributed representation generating unit that generates a distributed representation of the learning data representing learning data by the at least one neighboring point ;
A dictionary generation unit that generates a dictionary using each of the at least one neighboring points in the generated distributed representation as a search key;
The data conversion unit converts the learning data using a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points closest to the converted learning data in order from the closest one. by at least one selected by generating at least one obtains a point near, distributed representation of the training data representing the learning data the at least one near point learning data after conversion, the training data A database generating apparatus, wherein a plurality of distributed expressions are generated for each of the plurality of distributed expressions, and the dictionary is generated for each distributed expression.
離散空間に配置された有限個の点の内、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記学習データの識別情報を対応づけて前記辞書に登録する辞書生成部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記学習データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成することにより、前記学習データに対して複数の分散表現が生成され、分散表現毎に前記辞書が生成されることを特徴とするデータベース生成装置。 A data conversion unit that converts learning data represented as points in a real space created by a real vector whose real values can be taken by each component by a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the converted learning data in order from the closest one , obtain at least one neighboring point of the converted learning data , A distributed representation generating unit that generates a distributed representation of the learning data representing learning data by the at least one neighboring point ;
A dictionary generation unit that generates a dictionary using each of the at least one neighboring point in the generated distributed representation as a search key, and associates the identification information of the learning data with the search key and registers the dictionary in the dictionary. See
The data conversion unit converts the learning data using a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points closest to the converted learning data in order from the closest one. The learning data is obtained by obtaining at least one neighboring point of the converted learning data by selecting at least one and generating a distributed representation of the learning data in which the learning data is represented by the at least one neighboring point. A database generating apparatus , wherein a plurality of distributed expressions are generated for each of the plurality of distributed expressions, and the dictionary is generated for each distributed expression .
離散空間に配置された有限個の点の内、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記学習データが分類されるべきカテゴリーの識別情報を対応づけて前記辞書に登録する辞書生成部と、
分類先のカテゴリーが既知である学習データの学習サンプル集合をもとに、前記辞書内の第i番目の検索キーに第j番目のカテゴリーが対応づけられる回数Pijを集計し、Pijに対して単調に増加する関数f(Pij)を用いて、分類の際のスコアの加算係数を求め、この加算係数を前記辞書内の前記i番目の検索キーに対応づけられた第j番目のカテゴリーの識別情報に関連づけて登録する加算係数決定部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記学習データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の学習データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の学習データの少なくとも1つの近傍点を求め、前記学習データを前記少なくとも1つの近傍点で表した前記学習データの分散表現を生成することにより、前記学習データに対して複数の分散表現が生成され、分散表現毎に前記辞書が生成されることを特徴とするデータベース生成装置。 A data conversion unit that converts learning data represented by points in a real space created by a real vector whose values that each component can take are real numbers, using a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the converted learning data in order from the closest one , obtain at least one neighboring point of the converted learning data , A distributed representation generating unit for generating a distributed representation of the learning data representing learning data by the at least one neighboring point ;
A dictionary having each of the at least one neighboring points in the generated distributed representation as a search key is generated, and identification information of a category into which the learning data should be classified is associated with the search key and registered in the dictionary. A dictionary generator,
Based on the learning sample set of learning data whose classification category is known, the number of times P ij associated with the i-th search key in the dictionary is tabulated, and P ij Using the function f (P ij ) that increases monotonically, the addition coefficient of the score at the time of classification is obtained, and this addition coefficient is associated with the i-th search key in the dictionary. And an addition coefficient determination unit that registers in association with the identification information of
The data conversion unit converts the learning data using a plurality of different random matrices and gives the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points closest to the converted learning data in order from the closest one. The learning data is obtained by obtaining at least one neighboring point of the converted learning data by selecting at least one, and generating a distributed representation of the learning data in which the learning data is represented by the at least one neighboring point. A database generation apparatus , wherein a plurality of distributed expressions are generated for each of the expressions, and the dictionary is generated for each distributed expression .
離散空間に配置された有限個の点の内、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとする辞書を生成し、前記検索キーに前記入力データの識別情報を対応づけて前記辞書に登録する辞書生成部と、
前記辞書に新しい入力データの識別情報が検索キーに対応づけられて登録される際、その検索キーに既に登録されている入力データの識別情報との間で識別情報のペアを生成し、当該識別情報のペアをその出現回数とともにテーブルに格納する分析部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記入力データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成することにより、前記入力データに対して複数種類の分散表現が生成され、分散表現毎に前記辞書が生成されることを特徴とするデータ分析装置。 A data conversion unit that converts input data represented by points in a real space created by a real vector whose values that each component can take are real numbers, using a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the input data after conversion in order from the closest one , obtain at least one neighboring point of the input data after conversion , A distributed representation generation unit for generating a distributed representation of the input data representing the input data by the at least one neighboring point ;
A dictionary generating unit that generates a dictionary using each of the at least one neighboring point in the generated distributed representation as a search key, and associates the identification information of the input data with the search key and registers the dictionary in the dictionary;
When identification information of new input data is registered in the dictionary in association with a search key, an identification information pair is generated with the identification information of the input data already registered in the search key, and the identification look including an analysis unit to be stored in a table together with the number of occurrences of the pair information,
The data conversion unit converts the input data by a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points close to the converted input data in order from the closest one. By selecting at least one, at least one neighboring point of the input data after conversion is obtained, and by generating a distributed representation of the input data in which the input data is represented by the at least one neighboring point, the input data A data analysis apparatus characterized in that a plurality of types of distributed representations are generated for each and the dictionary is generated for each distributed representation .
各成分が取り得る値が実数である実数ベクトルが作る実数空間における点として表される入力データをランダムな行列により変換するデータ変換部と、
離散空間に配置された有限個の点の内、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索する検索部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記入力データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成することにより、前記入力データに対して複数の分散表現が生成され、分散表現毎に前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書が検索されることを特徴とするデータベース検索装置。 A dictionary generated by the database generation device according to claim 1 for each of a plurality of distributed representations for registered data represented as points in a real space created by a real vector whose values that each component can take are real numbers. A dictionary with each of the at least one neighboring points in each distributed representation of the registration data as a search key;
A data conversion unit that converts input data represented by points in a real space created by a real vector whose values that each component can take are real numbers, using a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the input data after conversion in order from the closest one , obtain at least one neighboring point of the input data after conversion , A distributed representation generation unit for generating a distributed representation of the input data representing the input data by the at least one neighboring point ;
A search unit that searches the dictionary using each of the at least one neighboring point in the generated distributed representation as a search key;
The data conversion unit converts the input data by a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points close to the converted input data in order from the closest one. By selecting at least one, at least one neighboring point of the input data after conversion is obtained, and by generating a distributed representation of the input data in which the input data is represented by the at least one neighboring point, the input data A database search device, wherein a plurality of distributed expressions are generated for each of the plurality of distributed expressions, and the dictionary is searched using each of the at least one neighboring points as a search key for each distributed expression.
前記検索部は、前記入力データの各分散表現における前記少なくとも1つの近傍点の各々を検索キーとする検索でヒットした前記リスト内の前記カテゴリーの識別情報を累積ヒット数とともにテーブルに格納することを特徴とする請求項6に記載のデータベース検索装置。 The dictionary is obtained by associating a list of identification information of categories to which the registration data is classified with the search key,
The search unit stores the identification information of the category in the list that has been hit by a search using each of the at least one neighboring points in each distributed representation of the input data as a search key together with a cumulative hit number in a table. The database search apparatus according to claim 6, wherein the database search apparatus is a database search apparatus.
各成分が取り得る値が実数である実数ベクトルが作る実数空間における点として表される入力データをランダムな行列により変換するデータ変換部と、
離散空間に配置された有限個の点の内、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索し、ヒットした前記リスト内の前記登録データの識別情報をテーブルに格納する検索部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記入力データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成することにより、前記入力データに対して複数の分散表現が生成され、分散表現毎に前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書が検索されることを特徴とするデータベース検索装置。 A dictionary generated by the database generation device according to claim 3 for each of a plurality of distributed representations for registered data represented as points in a real space created by a real vector whose values that each component can take are real numbers. A dictionary in which each of the at least one neighboring points in each distributed representation of registration data is used as a search key, and a list of identification information of the registration data is associated with the search key;
A data conversion unit that converts input data represented by points in a real space created by a real vector whose values that each component can take are real numbers, using a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the input data after conversion in order from the closest one , obtain at least one neighboring point of the input data after conversion , A distributed representation generation unit for generating a distributed representation of the input data representing the input data by the at least one neighboring point ;
A search unit that searches the dictionary using each of the at least one neighboring point in the generated distributed representation as a search key, and stores identification information of the registered data in the list that has been hit in a table ,
The data conversion unit converts the input data by a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points close to the converted input data in order from the closest one. By selecting at least one, at least one neighboring point of the input data after conversion is obtained, and by generating a distributed representation of the input data in which the input data is represented by the at least one neighboring point, the input data A database search device , wherein a plurality of distributed expressions are generated for each of the plurality of distributed expressions, and the dictionary is searched using each of the at least one neighboring points as a search key for each distributed expression .
各成分が取り得る値が実数である実数ベクトルが作る実数空間における点として表される入力データをランダムな行列により変換するデータ変換部と、
離散空間に配置された有限個の点の内、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成する分散表現生成部と、
生成された前記分散表現における前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書を検索し、ヒットした前記リスト内の前記カテゴリーの識別情報を前記加算係数の累積値とともにテーブルに格納する検索部とを含み、
前記データ変換部が、複数の異なるランダムな行列により前記入力データを変換して、前記分散表現生成部に与え、前記分散表現生成部が、変換後の入力データに近い点を最も近いものから順に少なくとも1つ選択することにより、変換後の入力データの少なくとも1つの近傍点を求め、前記入力データを前記少なくとも1つの近傍点で表した前記入力データの分散表現を生成することにより、前記入力データに対して複数の分散表現が生成され、分散表現毎に前記少なくとも1つの近傍点の各々を検索キーとして用いて、前記辞書が検索されることを特徴とするデータベース検索装置。 A dictionary generated by the database generation device according to claim 4 for each of a plurality of distributed representations for registered data represented as points in a real space created by a real vector whose values that each component can take are real numbers. Each of at least one neighboring point in each distributed representation of registration data is used as a search key, and the search key includes a pair of identification information of a category to which the registration data is classified and an addition coefficient of a score at the time of classification A dictionary associated with lists,
A data conversion unit that converts input data represented by points in a real space created by a real vector whose values that each component can take are real numbers, using a random matrix;
Of the finite number of points arranged in the discrete space, by selecting at least one point closest to the input data after conversion in order from the closest one , obtain at least one neighboring point of the input data after conversion , A distributed representation generation unit for generating a distributed representation of the input data representing the input data by the at least one neighboring point ;
The dictionary is searched using each of the at least one neighboring point in the generated distributed representation as a search key, and the identification information of the category in the list that has been hit is stored in a table together with the cumulative value of the addition coefficient And a search section to
The data conversion unit converts the input data by a plurality of different random matrices and provides the distributed representation generation unit, and the distributed representation generation unit sequentially selects the points close to the converted input data in order from the closest one. By selecting at least one, at least one neighboring point of the input data after conversion is obtained, and by generating a distributed representation of the input data in which the input data is represented by the at least one neighboring point, the input data A database search device , wherein a plurality of distributed expressions are generated for each of the plurality of distributed expressions, and the dictionary is searched using each of the at least one neighboring points as a search key for each distributed expression .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004049833A JP4494036B2 (en) | 2004-02-25 | 2004-02-25 | Database generation device, data analysis device, and database search device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004049833A JP4494036B2 (en) | 2004-02-25 | 2004-02-25 | Database generation device, data analysis device, and database search device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005242562A JP2005242562A (en) | 2005-09-08 |
| JP4494036B2 true JP4494036B2 (en) | 2010-06-30 |
Family
ID=35024260
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004049833A Expired - Lifetime JP4494036B2 (en) | 2004-02-25 | 2004-02-25 | Database generation device, data analysis device, and database search device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4494036B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6773972B2 (en) * | 2016-09-30 | 2020-10-21 | 富士通株式会社 | Data conversion program, data conversion method, and data conversion device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2004046612A (en) * | 2002-07-12 | 2004-02-12 | Techno Network Shikoku Co Ltd | Data matching method and device, data matching program, and computer readable recording medium |
-
2004
- 2004-02-25 JP JP2004049833A patent/JP4494036B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005242562A (en) | 2005-09-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Ivanov et al. | Anonymous walk embeddings | |
| Wang et al. | Hashing for similarity search: A survey | |
| Raginsky et al. | Locality-sensitive binary codes from shift-invariant kernels | |
| US11048966B2 (en) | Method and device for comparing similarities of high dimensional features of images | |
| He et al. | Scalable similarity search with optimized kernel hashing | |
| Marussy et al. | Success: a new approach for semi-supervised classification of time-series | |
| Cao et al. | Towards information-theoretic k-means clustering for image indexing | |
| Rafailidis et al. | A unified framework for multimodal retrieval | |
| Zhen et al. | Spectral multimodal hashing and its application to multimedia retrieval | |
| WO2013129580A1 (en) | Approximate nearest neighbor search device, approximate nearest neighbor search method, and program | |
| Gupta et al. | Comparison of algorithms for document clustering | |
| CN114882531B (en) | A cross-domain person re-identification method based on deep learning | |
| Yu et al. | Binary set embedding for cross-modal retrieval | |
| CN116524301A (en) | 3D point cloud scene instance shape searching and positioning method based on contrast learning | |
| Li et al. | Hashing with dual complementary projection learning for fast image retrieval | |
| CN114328920A (en) | Text clustering method and system based on consistent manifold approximation and projection | |
| Du et al. | Inner product similarity search using compositional codes | |
| CN113761151A (en) | Synonym mining, question answering method, apparatus, computer equipment and storage medium | |
| Qian et al. | Fast pairwise query selection for large-scale active learning to rank | |
| JP4494036B2 (en) | Database generation device, data analysis device, and database search device | |
| CN115470315A (en) | Approximate nearest text semantic retrieval method, device, equipment and storage medium | |
| CN114020948A (en) | Sketch image retrieval method and system based on sorting clustering sequence identification selection | |
| Matsui et al. | Pqtable: Nonexhaustive fast search for product-quantized codes using hash tables | |
| Vural et al. | Deep multi query image retrieval | |
| Lin et al. | Structured learning of binary codes with column generation for optimizing ranking measures |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061114 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090908 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20091109 |
|
| 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: 20100330 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100407 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130416 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130416 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160416 Year of fee payment: 6 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |