JP6721535B2 - LLE calculation device, LLE calculation method, and LLE calculation program - Google Patents

LLE calculation device, LLE calculation method, and LLE calculation program Download PDF

Info

Publication number
JP6721535B2
JP6721535B2 JP2017093347A JP2017093347A JP6721535B2 JP 6721535 B2 JP6721535 B2 JP 6721535B2 JP 2017093347 A JP2017093347 A JP 2017093347A JP 2017093347 A JP2017093347 A JP 2017093347A JP 6721535 B2 JP6721535 B2 JP 6721535B2
Authority
JP
Japan
Prior art keywords
calculated
data points
data point
lle
calculation
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.)
Active
Application number
JP2017093347A
Other languages
Japanese (ja)
Other versions
JP2018190251A (en
Inventor
靖宏 藤原
靖宏 藤原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2017093347A priority Critical patent/JP6721535B2/en
Publication of JP2018190251A publication Critical patent/JP2018190251A/en
Application granted granted Critical
Publication of JP6721535B2 publication Critical patent/JP6721535B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、LLE計算装置、LLE計算方法及びLLE計算プログラムに関する。 The present invention relates to an LLE calculation device, an LLE calculation method, and an LLE calculation program.

LLE(Locally Linear Embedding)は非線形次元削減の代表的な手法の一つである。LLEの基本的アイデアはそれぞれのデータポイントをそれらの近傍のデータポイントによる回帰によって近似し、各データポイントの低次元への埋め込みを計算するというものである。LLEでは再構築コストと埋め込みコストを最小化する二つの最適化問題を解く。これらの最適化において乱数による初期値の生成や学習率の設定等は必要でないため、LLEは効果的に次元削減を行うことができる。 LLE (Locally Linear Embedding) is one of the typical methods for reducing nonlinear dimensions. The basic idea of LLE is to approximate each data point by regression with its neighboring data points and calculate the embedding of each data point into the low dimension. LLE solves two optimization problems that minimize reconstruction cost and embedding cost. In these optimizations, generation of initial values by random numbers, setting of learning rate, etc. are not necessary, so that LLE can effectively reduce the dimension.

Sam T. Roweis and Lawrence K. Saul, Nonlinear Dimensionality Reduction by Locally Linear Embedding, Science, 290(5500):2323-2326, 2000.Sam T. Roweis and Lawrence K. Saul, Nonlinear Dimensionality Reduction by Locally Linear Embedding, Science, 290(5500):2323-2326, 2000.

しかしながら、従来のLLEには計算に要するコストが高いという問題があった。例えば、Kを各データポイントへの近傍のノードからのエッジの数とすると、従来のLLEのアルゴリズムは各データポイントに対してK×Kの大きさのグラム行列を計算し、ラグランジュの未定乗数法を用いてグラム行列の逆行列からエッジの重みを計算する(例えば、非特許文献1を参照)。逆行列を計算するコストは各データポイントへのエッジの数の3乗であるため、Nをデータポイントの数としたときにエッジの重みを計算するコストはO(NK)となる。 However, the conventional LLE has a problem that the calculation cost is high. For example, where K is the number of edges from neighboring nodes to each data point, the conventional LLE algorithm calculates a Gram matrix of size K×K for each data point, and the Lagrange undetermined multiplier method. Is used to calculate the edge weight from the inverse matrix of the Gram matrix (for example, see Non-Patent Document 1). Since the cost of calculating the inverse matrix is the cube of the number of edges to each data point, the cost of calculating the edge weight is O(NK 3 ) when N is the number of data points.

また各データポイントの低次元への埋め込みを計算するために従来のLLEのアルゴリズムはLLEカーネルの固有値ベクトルを計算する。LLEカーネルの大きさはN×Nであるため、固有ベクトルを計算するために必要なコストはO(N)となる。さらに固有値ベクトルを保持するためにO(N)のメモリコストが必要となる。そのため大規模なデータに対してLLEを適用することは多くの計算コストとメモリコストが必要となるため非現実的であった。 Also, the conventional LLE algorithm calculates the eigenvalue vector of the LLE kernel in order to calculate the embedding of each data point in the lower dimension. Since the size of the LLE kernel is N×N, the cost required to calculate the eigenvector is O(N 3 ). Furthermore, a memory cost of O(N 2 ) is required to hold the eigenvalue vector. Therefore, applying LLE to large-scale data is unrealistic because it requires a large amount of calculation cost and memory cost.

本発明のLLE計算装置は、複数のデータポイントを有する多次元行列の特異値分解を計算する特異値分解計算部と、前記複数のデータポイントから計算対象のデータポイントを選択するデータポイント選択部と、前記複数のデータポイントのそれぞれについて、前記計算対象のデータポイントとの間の近似の距離を、前記特異値分解に基づいて計算する近似距離計算部と、前記近似の距離が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離の推定値を計算する距離推定部と、前記ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離を計算し、当該計算したユークリッド距離が所定値以下であるデータポイントを、前記計算対象のデータポイントの近傍のデータポイントに確定する近傍確定部と、前記計算対象のデータポイントと前記計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算するエッジ重み計算部と、前記エッジの重みに基づいて、前記複数のデータポイントについてのLLEカーネルの固有ベクトルを計算するベクトル計算部と、を有することを特徴とする。 The LLE calculation device of the present invention includes a singular value decomposition calculation unit that calculates a singular value decomposition of a multidimensional matrix having a plurality of data points, and a data point selection unit that selects a data point to be calculated from the plurality of data points. For each of the plurality of data points, an approximate distance between the data point to be calculated and an approximate distance calculation unit that calculates based on the singular value decomposition, and the approximate distance is less than or equal to a predetermined value. A distance estimation unit that calculates an estimated value of the Euclidean distance between each of the data points and the data point of the calculation target, each of the data points for which the estimated value of the Euclidean distance is a predetermined value or less, and the calculation target A proximity determining unit that determines the Euclidean distance between the data point and the data point whose calculated Euclidean distance is less than or equal to a predetermined value as a data point near the data point to be calculated, and the calculation target. Edge weight calculator for calculating the edge weight between each data point and each of the data points in the vicinity of the data point to be calculated, and an LLE kernel for the plurality of data points based on the edge weight. And a vector calculation unit that calculates an eigenvector of

本発明によれば、LLEの計算に要するコストを低減させることができる。 According to the present invention, the cost required for calculating LLE can be reduced.

図1は、第1の実施形態に係るLLE計算装置の構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of the configuration of the LLE calculation device according to the first embodiment. 図2は、補題1を示す図である。FIG. 2 is a diagram showing Lemma 1. 図3は、補題2を示す図である。FIG. 3 is a diagram showing Lemma 2. 図4は、補題3を示す図である。FIG. 4 is a diagram showing Lemma 3. 図5は、第1の実施形態に係るLLE計算処理のアルゴリズムの一例を示す図である。FIG. 5 is a diagram illustrating an example of an algorithm of the LLE calculation process according to the first embodiment. 図6は、定理1、定理2及び定理3を示す図である。FIG. 6 is a diagram showing Theorem 1, Theorem 2 and Theorem 3. 図7は、第1の実施形態に係るLLE計算装置の処理の流れを示すフローチャートである。FIG. 7 is a flowchart showing a processing flow of the LLE calculation device according to the first embodiment. 図8は、LLE計算プログラムを実行するコンピュータの一例を示す図である。FIG. 8 is a diagram illustrating an example of a computer that executes the LLE calculation program.

以下に、本願に係るLLE計算装置、LLE計算方法及びLLE計算プログラムの実施形態を図面に基づいて詳細に説明する。なお、本発明は、以下に説明する実施形態により限定されるものではない。 Hereinafter, embodiments of an LLE calculation device, an LLE calculation method, and an LLE calculation program according to the present application will be described in detail with reference to the drawings. The present invention is not limited to the embodiments described below.

[従来のLLE]
まず従来のLLEの説明を行う。X∈RN×MをM次元からなるN個のデータポイントの行列とする。x=(x[1],x[2],...,x[M])を行列Xのi番目の行ベクトルとすると、xはi番目のデータポイントに対応する。
[Conventional LLE]
First, the conventional LLE will be described. Let XεR N×M be a matrix of N data points of M dimensions. Let x i =(x i [1], x i [2],..., x i [M]) be the i th row vector of matrix X, then x i corresponds to the i th data point.

LLEは高次元のデータセットXから低次元のデータセットY∈RN×mを計算する。y=(y[1],y[2],...,y[m])を長さがmの行ベクトルとすると、yはデータポイントxの低次元へのマッピングに対応する。LLEにおける基本的考えはデータポイントは大域的に非線形な構造を持っていたとしても、各データポイントとそれらの近傍のデータポイントは局所的に線形に近似できるというものである。近傍から各データポイントを表現することでLLEは高次元のデータを低次元で表現することができる。 LLE computes a low-dimensional dataset YεR N×m from a high-dimensional dataset X. Let y i =(y i [1], y i [2],..., y i [m]) be a row vector of length m, and y i is the mapping of data point x i to the low dimension. Corresponding to. The basic idea in LLE is that even if a data point has a globally nonlinear structure, each data point and its neighboring data points can be locally linearly approximated. By expressing each data point from the neighborhood, LLE can express high-dimensional data in low dimension.

従来のLLEのアルゴリズムは再構築コストと埋め込みコストを最小化する二つの最適化問題を解くパートから構成される。はじめのパートでは各データポイントに対してユークリッド距離から近傍のデータポイントを計算し、それらの回帰分析によりエッジの重みを計算する。xを回帰分析によって表現するデータポイントとすると、従来のLLEのアルゴリズムは式(1)の再構築コストを最小化する。 The conventional LLE algorithm is composed of two optimization problem solving parts that minimize the reconstruction cost and the embedding cost. In the first part, for each data point, the neighboring data points are calculated from the Euclidean distance, and the edge weight is calculated by their regression analysis. The conventional LLE algorithm minimizes the reconstruction cost of equation (1), where x p is the data point represented by the regression analysis.

Figure 0006721535
Figure 0006721535

式(1)において||・||はベクトルのL2ノルムであり、は式(2)のように計算されるxの回帰分析の結果である。ここで・は・の直上にが記された記号を示すものとする。 || · || in formula (1) is the L2 norm of the vector, the ~ x p is the result of regression analysis of the calculated x p by the equation (2). Here, ~ -indicates a symbol in which ~ is written immediately above.

Figure 0006721535
Figure 0006721535

式(2)においてN[x]はデータポイントxのK個の近傍のデータポイントの集合であり、W[i,j]はデータポイントxからxのエッジの重みである。重みを計算するために、式(1)においてデータポイントxに対するエッジの重みの和が1になるように再構築コストを最小化する。再構築コストを最小化するためにグラム行列にラグランジュの未定乗数法を適用する。具体的にはxとxをデータポイントxに対するK近傍とすると、データポイントxに対するK×Kのグラム行列Gの要素は、G[i,j]をグラム行列Gの[i,j]成分としたときに式(3)のように計算される。 In Equation (2), N[x p ] is a set of K neighboring data points of the data point x p , and W[i,j] is an edge weight of the data points x j to x i . To calculate the weights, the reconstruction cost is minimized so that the sum of the edge weights for the data points x p in equation (1) is 1. Apply Lagrange's undetermined multiplier method to the Gram matrix to minimize the reconstruction cost. And in particular with the K near the x i and x j for the data points x p, elements of the Gram matrix G p of K × K for the data point x p is, G p [i, j] the Gram matrix G p When the [i,j] component is used, it is calculated as in Expression (3).

Figure 0006721535
Figure 0006721535

ここで<・,・>は二つのベクトルの内積とする。G −1を行列Gの逆行列としたときに各データポイントのエッジの重みは式(4)のように計算される。 Here, ···· is the inner product of two vectors. When G p −1 is an inverse matrix of the matrix G p , the edge weight of each data point is calculated as in Expression (4).

Figure 0006721535
Figure 0006721535

式(4)のようにエッジの重みを計算するには逆行列G −1を求める必要がある。LLEのアルゴリズムの二つ目のパートでは式(5)の埋め込みコストを最小化することでデータポイントxに対するベクトルyを求める。 In order to calculate the edge weight as in Expression (4), it is necessary to obtain the inverse matrix G p −1 . The second part of the LLE algorithm determining the vector y p for the data points x p by minimizing the embedded cost of formula (5).

Figure 0006721535
Figure 0006721535

Iを単位行列としたときにK=(I−W)(I−W)をN×Nの大きさのLLEカーネルとし、WをN×Nのエッジの重みの行列とすると、埋め込みコストはYKYと書き換えることができる。ここで・は行列・の転置行列とする。 When I is an identity matrix and K=(I−W) T (I−W) is an LLE kernel of size N×N, and W is a matrix of N×N edge weights, the embedding cost is It can be rewritten as Y T KY. Here, · T is a transposed matrix of matrix.

埋め込みコストには二つの制約がある。はじめの制約はYY=Iというものである。これは解がランクmということである。また0を零ベクトルとしたときにΣ=0であるというものである。よってLLEのアルゴリズムの二つ目のパートは式(6)の最適化問題を解くこととなる。 There are two restrictions on the embedding cost. The first constraint is that Y T Y=I. This means that the solution is rank m. Further, when 0 is a zero vector, Σ p y p =0. Therefore, the second part of the LLE algorithm is to solve the optimization problem of equation (6).

Figure 0006721535
Figure 0006721535

式(6)はカーネルKの底のm+1個の固有ベクトルが解となる固有値問題である。なおここで最小の固有値の固有ベクトルは全ての要素が同一になるため破棄される。 Expression (6) is an eigenvalue problem in which the m+1 eigenvectors at the bottom of the kernel K are solutions. Here, the eigenvector having the smallest eigenvalue is discarded because all the elements are the same.

従来のLLEのアルゴリズムは高い計算コストが必要になる。はじめのパートでは行列Gを計算し、その逆行列を計算する。行列Gの大きさがK×Kであり、その要素が長さMのベクトルの内積から計算されるため、行列Gを全てのデータポイントに対して求める計算コストはO(NKM)となる。また行列Gの逆行列を計算する必要があるため、エッジの重みを求めるためにO(NK)の計算コストが必要になる。さらにすべてのノードに対して近傍を求めるのにO(NM)の計算コストが必要になる。また二つ目のパートではO(N)の計算コストが必要になる。これはN×NのカーネルKの固有値分解を行う必要があるからである。そのため従来のLLEの計算コストはO(N(KM+K)+NM+N)となる。またメモリコストはカーネルKの固有値分解を行うためO(N)となる。結果として大規模なデータに対してLLEを適用するのは現実的ではない。 The conventional LLE algorithm requires high calculation cost. In the first part, the matrix G p is calculated and its inverse matrix is calculated. Since the size of the matrix G p is K×K and its elements are calculated from the inner product of the vectors of length M, the calculation cost for obtaining the matrix G p for all data points is O(NK 2 M). Becomes Further, since it is necessary to calculate the inverse matrix of the matrix G p , the calculation cost of O(NK 3 ) is required to obtain the edge weight. Further, the calculation cost of O(N 2 M) is required to obtain the neighbors for all the nodes. In addition, the second part requires a calculation cost of O(N 3 ). This is because it is necessary to perform the eigenvalue decomposition of the N×N kernel K. Therefore, the calculation cost of the conventional LLE is O(N(K 2 M+K 3 )+N 2 M+N 3 ). The memory cost is O(N 2 ) because the eigenvalue decomposition of the kernel K is performed. As a result, it is not realistic to apply LLE to large-scale data.

[第1の実施形態の構成]
図1を用いて、第1の実施形態の構成について説明する。図1は、第1の実施形態に係るLLE計算装置の構成の一例を示す図である。図1に示すように、LLE計算装置10は、特異値分解計算部101、データポイント選択部102、近似距離計算部103、距離推定部104、近傍確定部105、エッジ重み計算部106、並び替え部107、LU分解計算部108及びベクトル計算部109を有する。
[Configuration of First Embodiment]
The configuration of the first embodiment will be described with reference to FIG. FIG. 1 is a diagram illustrating an example of the configuration of the LLE calculation device according to the first embodiment. As shown in FIG. 1, the LLE calculation device 10 includes a singular value decomposition calculation unit 101, a data point selection unit 102, an approximate distance calculation unit 103, a distance estimation unit 104, a neighborhood determination unit 105, an edge weight calculation unit 106, and rearrangement. It has a unit 107, an LU decomposition calculation unit 108, and a vector calculation unit 109.

[第1の実施形態のLLE]
まず本実施形態におけるLLEの計算方法及び数理的な背景について説明する。その後、LLE計算装置10の各機能部によって行われる処理について説明する。
[LLE of the first embodiment]
First, the calculation method of LLE and the mathematical background in this embodiment will be described. Then, the processing performed by each functional unit of the LLE calculation device 10 will be described.

本実施形態では多次元空間において二つのデータポイントが近くにあればそれらの近傍の大部分は共通するという知見に基づいてLLEを高速に計算する。ここで、式(3)のグラム行列の定義に見られるように、従来のLLEにおいては、データポイントxとxをデータポイントxのK近傍とすると、データポイントxのグラム行列の[i,j]はG[i,j]=<x−xi,−x>となる。そのため、x=xであるようなデータポイントxとxに対して、xとxがデータポイントxとxを近傍として共有したとしてもそれらのグラム行列の[i,j]成分は同じにならない。 In the present embodiment, if two data points are close to each other in a multidimensional space, the LLE is calculated at high speed based on the knowledge that most of their neighborhoods are common. Here, equation (3) as seen in the definition of Gram matrix of, in the conventional LLE, when the data points x i and x j and K near the data points x p, the data point x p of the Gram matrix [I,j] becomes G p [i,j]=<x p −x i, x p −x j >. Therefore, x p = x to the data points x p and x q such that q, x p and x q are [i their Gram matrix even share data points x i and x j as a neighboring, j] components are not the same.

そこで、本実施形態では、高速に処理を行うため、オリジナルのアルゴリズムとは異なる方法でラグランジュの未定乗数法をデータポイントxに対して適用し、行列Cを計算する。本実施形態では、行列Cの[i,j]成分はC[i,j]=<xi,>となるため、もし同じデータポイントを近傍として共有していれば、異なるデータポイントに対して行列Cは同じ成分を保持することとなる。そのため高速に行列Cを計算することが可能になる。 Therefore, in the present embodiment, in order to perform the processing at high speed, the Lagrange's undetermined multiplier method is applied to the data points x p by a method different from the original algorithm, and the matrix C p is calculated. In the present embodiment, since the [i,j] component of the matrix C p is C p [i,j]=<x i, x j >, different data can be obtained if the same data point is shared as a neighborhood. The matrix C p will hold the same components for the points. Therefore, the matrix C p can be calculated at high speed.

さらにこの手法を用いることで逆行列を高速に計算することが可能になる。具体的には、この手法により行列Cは行列Cと同じ成分を有するため、Woodburyの公式を用いることにより、行列C −1から漸進的に行列C −1を計算することができる。 Furthermore, by using this method, the inverse matrix can be calculated at high speed. Specifically, since the matrix C p has the same components as the matrix C q by this method, the matrix C p −1 can be gradually calculated from the matrix C q −1 by using the Woodbury formula. ..

埋め込みコストを下げるために、本発明では逆ベキ乗法を用いてカーネルKの固有値ベクトルを高速に計算する(例えば、参考文献1(Brian Bradie, A Friendly Introduction to Numerical Analysis, 2007, Pearson.)を参照)。しかし本実施形態ではナイーブにこの手法は用いない。それはこの手法を用いるのにカーネルKの逆行列を計算する必要があり、それによりO(N)の計算コストが発生するからである。またO(N) のメモリコストが発生するという問題もある。先に述べたとおりカーネルKはK=(I−W)(I−W)と計算される。ここでWは近傍のデータポイントからのエッジの重みから計算されるため、カーネルKは疎なデータ構造となる。しかしカーネルKが疎であってもその逆行列は密な構造となり、高い計算コストとメモリコストが必要になる。 In order to reduce the embedding cost, the present invention calculates the eigenvalue vector of the kernel K at high speed using the inverse power method (see, for example, Reference 1 (Brian Bradie, A Friendly Introduction to Numerical Analysis, 2007, Pearson.)). ). However, in this embodiment, this method is not used for naiveness. This is because it is necessary to calculate the inverse matrix of the kernel K in order to use this method, which causes a calculation cost of O(N 3 ). There is also a problem that a memory cost of O(N 2 ) occurs. As described above, the kernel K is calculated as K=(I−W) T (I−W). Here, since W is calculated from edge weights from neighboring data points, the kernel K has a sparse data structure. However, even if the kernel K is sparse, its inverse matrix has a dense structure, which requires high calculation cost and memory cost.

これらの問題を解決するために、本実施形態では行列I−WのLU分解を計算し、カーネルKの固有ベクトルを計算する。ここでLU分解とは行列を下三角行列と上三角行列に分解する手法である(例えば、参考文献2(William H. Press, Saul A. Teukolsky, William T Vetterling, Brian P. Flannery, Numerical Recipes 3rd Edition, 2007, Cambridge University Press.)を参照)。下三角行列と上三角行列から固有ベクトルを計算できるため、カーネルKの計算を避けることができる。また下三角行列と上三角行列は疎なデータ構造を持つため、計算コストとメモリコストを抑えることができる。 In order to solve these problems, in this embodiment, the LU decomposition of the matrix I-W is calculated, and the eigenvector of the kernel K is calculated. Here, the LU decomposition is a method of decomposing a matrix into a lower triangular matrix and an upper triangular matrix (for example, reference 2 (William H. Press, Saul A. Teukolsky, William T Vetterling, Brian P. Flannery, Numerical Recipes 3rd. Edition, 2007, Cambridge University Press.)). Since the eigenvector can be calculated from the lower triangular matrix and the upper triangular matrix, the calculation of the kernel K can be avoided. Further, since the lower triangular matrix and the upper triangular matrix have a sparse data structure, the calculation cost and the memory cost can be suppressed.

本実施形態は従来のLLEのアルゴリズムと同じ計算結果となる。これは本実施形態が再構築コストと埋め込みコストを最小化するような計算を行うからである。すなわち本実施形態はオリジナルのアルゴリズムの計算結果を変えることなく、少ない計算コストとメモリコストで次元削減を行うことができる。 The present embodiment has the same calculation result as the conventional LLE algorithm. This is because the present embodiment performs calculations that minimize the reconstruction cost and the embedding cost. That is, this embodiment can reduce the dimension with a small calculation cost and memory cost without changing the calculation result of the original algorithm.

[第1の実施形態のエッジの重みの計算]
次にエッジの重みを高速計算するための手法について述べる。本発明ではラグランジュの未定乗数法を用いてデータポイントxの行列Cを計算する。ラグランジュの未定乗数法は、複数の変数を持つ関数の一定の制約下における定常状態を求めることができる(例えば、参考文献3(Christopher M. Bishop, Pattern Recognition and Machine Learning, 2010, Springer.)を参照)。LLEの場合、変数は再構築コストを最小化するエッジの重みであり、制約は各データポイントへのエッジの重み和が1になるというものである。γをラグランジュの未定乗数とすると、各データポイントに対してラグランジュ関数Lは以下のようになる。
[Calculation of Edge Weight in First Embodiment]
Next, a method for calculating edge weights at high speed is described. In the present invention, the Lagrange undetermined multiplier method is used to calculate the matrix C p of the data points x p . The Lagrangian undetermined multiplier method can obtain a steady state of a function having a plurality of variables under constant constraints (for example, see Reference 3 (Christopher M. Bishop, Pattern Recognition and Machine Learning, 2010, Springer.). reference). In LLE, the variable is the edge weight that minimizes the reconstruction cost, and the constraint is that the sum of the edge weights for each data point is one. Letting γ be a Lagrange undetermined multiplier, the Lagrange function L for each data point is:

Figure 0006721535
Figure 0006721535

よってx∈N[x]であるようなデータポイントxのエッジの重みW[p,i]に対して関数LがW[p,i]に対して定常状態になる条件は∂L/∂W[p,i]=0となる。同様にγに対して関数Lの条件は∂L/∂γ=0となる。そのため関数Lが定常状態になる条件は式(12)のようになる。 Therefore, for the edge weight W[p,i] of the data point x i such that x i εN[x p ], the condition for the function L to be in a steady state for W[p,i] is ∂L /∂W[p,i]=0. Similarly, the condition of the function L for γ is ∂L/∂γ=0. Therefore, the condition that the function L is in the steady state is as shown in Expression (12).

Figure 0006721535
Figure 0006721535

式(12)においてCは(K+1)×(K+1)の行列であり、wとpは以下で与えられる長さがK+1の列ベクトルである。 In Equation (12), C p is a (K+1)×(K+1) matrix, and w and p are column vectors of length K+1 given below.

Figure 0006721535
Figure 0006721535

ここでx,x∈N[x]である。式(13)から行列Cの要素はC[i,j]=<x,x>と計算することができ、行列Cの要素はxとは独立に計算することができることがわかる。このためもしデータポイントxとxが同じ近傍を共有するとき、データポイントxの行列Cの要素はデータポイントxの行列Cを参照することで高速に計算することができる。もしdがデータポイントxとxで異なる近傍の数とすると(すなわちd=K−|N[x]∩N[x]|のとき)、本実施形態では行列Cを求めるためにO(dKM)の計算コストが必要となる。 Here, x i , x j εN[x p ]. The elements of the matrix C p from equation (13) C p [i, j] = <x i, x j> can be calculated with the elements of the matrix C p be can be calculated independently of x p I understand. Therefore, if the data points x p and x q share the same neighborhood, the elements of the matrix C p of the data points x p can be calculated at high speed by referring to the matrix C q of the data points x q . If d is the number of different neighbors at the data points x p and x q (that is, d=K−|N[x p ]∩N[x q ]|), the matrix C p is obtained in this embodiment. Requires a calculation cost of O(dKM).

[第1の実施形態の逆行列の計算]
次にWoodburyの公式を用いて行列Cの逆行列C −1を高速に求める手法について述べる。式(14)の通り、ベクトルwのiの要素はエッジの重みW[p,i]に対応する。そのためC −1が行列Cの逆行列である式(12)からエッジの重みをw=C −1と計算することができる。しかし直接行列Cから行列C −1を求めるにはO(K)の計算コストがかかるため、この手法の計算コストは高くなる。
[Calculation of Inverse Matrix of First Embodiment]
Then we describe a method for obtaining the inverse matrix C p -1 of the matrix C p at high speed using the formula Woodbury. As shown in Expression (14), the element of i in the vector w corresponds to the edge weight W[p,i]. Therefore, the edge weight can be calculated as w=C p −1 from the equation (12) in which C p −1 is the inverse matrix of the matrix C p . But since the directly from the matrix C p Request matrix C p -1 consuming computational cost O (K 3), calculate the cost of this approach is high.

Woodburyの公式を用いてエッジの重みを高速に計算する手法を述べるが、まずd=1である場合、すなわちデータポイントxがデータポイントxに対して一つだけ異なる近傍を持つ場合(K−|N[x]∩N[x]|=1)について述べる。xをデータポイントxにおけるただ一つの異なる近傍のデータポイントとし、xをデータポイントxのxに対する近傍のデータポイントとする。そのためx=N[x]−N[x]∩N[x]でありx=N[x]−N[x]∩N[x]となる。 A method for calculating edge weights at high speed using the Woodbury formula will be described. First, when d=1, that is, when the data point x p has only one different neighborhood with respect to the data point x q (K - | N [x p] ∩N [x q] | = 1) is described. Let x k be the only different neighbor data point at data point x p , and let x k be the data point neighbor of data point x q with respect to x k . Therefore x k = N [x p] -N [x p] is ∩N [x q] x k = N [x q] -N [x p] ∩N [x q] become.

ここで、データポイントに対応する各ベクトルの分散は1であること、すなわち<xi,>=1であることを仮定する。この仮定は後に外す。行列CとCのk番目の行及び列にデータポイントxとxk´が対応する逆行列C −1を更新するときに、以下の行列ΔCを用いる。 Here, it is assumed that the variance of each vector corresponding to a data point is 1, that is <x i, x i >=1. This assumption will be removed later. The following matrix ΔC is used when updating the inverse matrix C p −1 corresponding to the data points x k and x k′ in the k th row and column of the matrices C p and C q .

Figure 0006721535
Figure 0006721535

行列ΔCに対して図2に示す補題1(補助定理1)が成り立つ。図2は、補題1を示す図である。また、補題1は、行列ΔCは非対称行列CとCから計算されるが対称行列であり、行列ΔCのkの行及び列のみが非ゼロ要素を持つことを示している。この補助定理より行列ΔCについての図3に示す補題2(補助定理2)が成り立つ。図3は、補題2を示す図である。 The lemma 1 (lemma 1) shown in FIG. 2 holds for the matrix ΔC. FIG. 2 is a diagram showing Lemma 1. Further, Lemma 1 shows that the matrix ΔC is a symmetric matrix calculated from the asymmetric matrices C p and C q , and only k rows and columns of the matrix ΔC have nonzero elements. From this lemma, Lemma 2 (lemma 2) for the matrix ΔC shown in FIG. 3 is established. FIG. 3 is a diagram showing Lemma 2.

V=Iであり、ΔCv=||f||vかつΔCv=−||f||vであるため、補助定理2は補助定理1とともに、式(19)は行列ΔCのランク2の固有値分解に対応していることがわかる。この式を用いることにより行列VとFをO(K)の計算コストで求めることができる。これはベクトルfの長さがK+1だからである。そのため補助定理2から行列ΔCの固有値分解をO(K)の計算コストで求めることができる。 Since V T V=I and ΔCv 1 =||f||v 1 and ΔCv 2 =−||f||v 2 , the lemma 2 and the formula (19) are the matrix ΔC. It can be seen that it corresponds to the eigenvalue decomposition of rank 2. By using this formula, the matrices V and F can be obtained at a calculation cost of O(K). This is because the length of the vector f is K+1. Therefore, the eigenvalue decomposition of the matrix ΔC can be obtained from the lemma 2 at a calculation cost of O(K).

Woodburyの公式を用いることでデータポイントxの逆行列C −1からデータポイントxの逆行列C −1を漸進的に更新することができる。式(16)からC=C+ΔCであるため、補助定理2からC=C+ΔCとなる。そのためWoodburyの公式を用いることで逆行列C −1を以下のように計算できる。 It can be progressively updated inverse matrix C p -1 data points x p from the inverse matrix C q -1 of the data points x q by using the official Woodbury. Since a C p = C q + ΔC from equation (16), consisting of Lemma 2 and C p = C q + ΔC. Therefore, the inverse matrix C p −1 can be calculated as follows by using the Woodbury formula.

Figure 0006721535
Figure 0006721535

式(20)においてF−1とV −1Vは2×2の行列であるため、逆行列(F−1+V −1V)−1を求める計算コストは一定になる。また行列C −1とVのサイズはそれぞれ(K+1)×(K+1)と(K+1)×2になる。そのため式(20)からC −1を求めるにはO(K)の計算コストが必要となる。 In Formula (20), since F −1 and V T C q −1 V are 2×2 matrices, the calculation cost for obtaining the inverse matrix (F −1 +V T C q −1 V) −1 is constant. .. The sizes of the matrices C q −1 and V are (K+1)×(K+1) and (K+1)×2, respectively. Therefore, the calculation cost of O(K 2 ) is required to obtain C p −1 from the equation (20).

式(20)から逆行列C −1を高速に求めることができるが、この式は行列Cにおいて<xi,>=1が成り立つことを仮定している。ここではこの仮定を用いてまず行列C −1を更新する。そしてC´を行列Cに対応する行列としたとき、行列C´のために(K+1)×(K+1)の行列ΔCを式(21)のように計算する。 Although the inverse matrix C p -1 can be obtained at high speed from the equation (20), this equation assumes that <x i, x i >=1 holds in the matrix C p . Here, the matrix C p -1 is updated using this assumption. And when the corresponding matrix C'p matrix C p, the matrix ΔC of (K + 1) × (K + 1) for the matrix C'p is calculated as Equation (21).

Figure 0006721535
Figure 0006721535

行列ΔC´から行列C´とCの違いは[k,k]要素に限られることがわかり、また行列ΔC´は<x,x>=1 in matrix Cという仮定を落とすことに対応することがわかる。そのため、もしその仮定を落とせばC=C+ΔC+ΔC´が成り立つことがわかる。もしeをk番目の要素以外は0である単位ベクトルだとすると、行列ΔC´を式(22)のように求めることができる。 It can be seen from the matrix ΔC′ that the differences between the matrices C′ p and C p are limited to [k, k] elements, and the matrix ΔC′ drops the assumption that <x i , x i >=1 in matrix C p. It turns out that it corresponds to. Therefore, if the assumption is dropped, it can be seen that C p =C q +ΔC+ΔC′ holds. If e k is a unit vector that is 0 except for the k-th element, the matrix ΔC′ can be obtained as in Expression (22).

Figure 0006721535
Figure 0006721535

そのためWoodburyの公式を用いることで式(20)の後で行列C´の逆行列(C´−1を式(23)のように計算することができる。 Therefore the inverse matrix of the matrix C'p after formula (20) by using the official Woodbury the (C'p) -1 can be computed as in Equation (23).

Figure 0006721535
Figure 0006721535

式(20)と同様、式(23)から逆行列をO(K)の計算コストで高速に計算することができる。式(20)と(23)において、d=1が成り立つこと、つまりデータポイントxに対してデータポイントxは一つだけ異なる近傍のデータポイントを有することを仮定した。しかしd>1の場合であっても、繰り返し上記処理をx∈{x|x∈N[x] and x/∈N[x]}であるようなデータポイント一つ一つに繰り返し適用することによって逆行列を高速に求めることができる。なお、ここでは、x/∈Nは、xが集合Nに含まれないことを示すものとする。 Similar to Expression (20), the inverse matrix can be calculated at high speed from Expression (23) at a calculation cost of O(K 2 ). In equations (20) and (23), it was assumed that d=1 holds, that is, for data point x q , data point x p has one different neighboring data point. However, even if d>1, iteratively repeats the above process for each data point such that x i ε{x j |x j εN[x p ] and x x j /εN[x q ]}. The inverse matrix can be obtained at high speed by repeatedly applying the two. Note that, here, x/εN indicates that x is not included in the set N.

[第1の実施形態の近傍のデータポイントの計算]
次に各データポイントに対して近傍のデータポイントを高速に計算する手法について述べる。本発明ではSVDを用いて近似の距離を計算し、近傍を計算する。SVDは距離の下限値を求めることができるため、正確に近傍を求めることができる。もし=([1],[2],...,[s])がデータポイントx=(x[1],x[2],...,x[M])に対するランクがsのSVDによる次元削減とし、E[x,x]をデータポイントxとxのユークリッド距離とすると、SVDが距離の下限値を与えるとはE[x,x]≧E[]が成り立つと言うことである。
[Calculation of data points in the vicinity of the first embodiment]
Next, we describe a method to calculate the neighboring data points at high speed for each data point. In the present invention, the approximate distance is calculated using SVD, and the neighborhood is calculated. Since the SVD can find the lower limit value of the distance, it can accurately find the neighborhood. If ~ xp =( ~ xp [1], ~ xp [2], ..., ~ xp [s]) is a data point xp =( xp [1], xp [2], ..., x p [M]) is the dimension reduction by SVD of rank s, and E[x p , x q ] is the Euclidean distance between data points x p and x q , then SVD defines the lower bound of the distance. Giving means that E[ xp , xq ] ≥ E[ ~ xp , ~ xq ] holds.

近傍を求めるのに既存の研究ではまず近似の距離を計算してから、もしデータポイントが近似の距離により近傍になる可能性があると判定されたらユークリッド距離を計算する(例えば、参考文献4(Dennis Shasha, High Performance Discovery in Time Series: Techniques and Case Studies, 2004, Springer-Verlag New York Inc..)を参照)。なお各データポイントのSVDは既存の手法を用いてO(NMlogs)の計算コストで求めることができる(例えば、参考文献5(Nathan Halko, Per-Gunnar Martinsson, Joel A. Tropp, Finding Structure with Randomness:Probabilistic Algorithms for Constructing Approximate Matrix Decompositions, 2011, SIAM Review.)を参照)。 In the existing research to calculate the neighborhood, first, the approximate distance is calculated, and then, if it is determined that the data point may be the neighborhood due to the approximate distance, the Euclidean distance is calculated (for example, reference 4 ( Dennis Shasha, High Performance Discovery in Time Series: Techniques and Case Studies, 2004, Springer-Verlag New York Inc..)). Note that the SVD of each data point can be obtained at a calculation cost of O(NMlogs) using an existing method (for example, Reference 5 (Nathan Halko, Per-Gunnar Martinsson, Joel A. Tropp, Finding Structure with Randomness: Probabilistic Algorithms for Constructing Approximate Matrix Decompositions, 2011, SIAM Review.)).

近似の距離の精度を向上するために、ユークリッド距離を近傍グラフの構造を用いて推定する。データポイントxはデータポイントxの近傍とする。このときSVDを用いることによってE[q, ]とE[x,x]が成り立つ。またもしデータポイントxの近傍を求める過程でデータポイントxのユークリッド距離を計算すれば、E[] and E[x,x]が成り立つ。E_[x,x]をデータポイントxからxの推定距離とすると、本実施形態では推定距離を式(24)のように計算する。ここで・_は・の直下に_が記された記号を示すものとする。 In order to improve the accuracy of the approximate distance, the Euclidean distance is estimated using the structure of the neighborhood graph. The data point x q is near the data point x r . In this case E [~ x q, ~ x r] by using SVD and E [x q, x r] holds. Further, if if calculating the Euclidean distance of the data point x p data points x r in the process of obtaining the vicinity of, E [~ x p, ~ x r] and E [x p, x r] holds. Assuming that E_[x p , x q ] is the estimated distance from the data point x p to x q , the estimated distance is calculated as in Expression (24) in this embodiment. Here, ·_ indicates a symbol with _ written directly under ·.

Figure 0006721535
Figure 0006721535

ここでu[x]はu[x]=([s+1]−[s+1],[s+2]−xr[s+2],...,[M]−[M])であるような長さがM−sのベクトルである。推定距離について図4に示す補題3(補助定理3)が成り立つ。図4は、補題3を示す図である。 Here u r [x p] is u r [x p] = ( ~ x p [s + 1] - ~ x r [s + 1], ~ x p [s + 2] - ~ xr [s + 2], ..., ~ x a vector of length Ms such that p [M]- to xr [M]). Lemma 3 (Lemma 3) shown in FIG. 4 holds for the estimated distance. FIG. 4 is a diagram showing Lemma 3.

補助定理3は推定距離E[x,x]のE[x,x]に対する誤差はE[p, ]より小さいため、E[xp,]も用いることでE[p, ]の近似の精度を向上できることを示している。また補助定理3のE[xp,]≧E[xp,]は下限値の性質を満たす、すなわち正確に近傍を求めることができることを示している。 Used for Lemma 3 error for E [x p, x q] of the estimated distance E [x p, x q] is less than E [~ x p, ~ x q], E [x p, x q] also shows that can improve the accuracy of the approximation of E [~ x p, ~ x q] by. Further, E[x p, x q ]≧E[x p, x q ] of Lemma 3 shows that the property of the lower limit value is satisfied, that is, the neighborhood can be accurately obtained.

この手法において式(24)で用いられるベクトルu[x]とu[x]のLノルムを式(25)及び式(26)のように計算する。 In this method, the L 2 norm of the vectors u r [x p ] and u r [x q ] used in equation (24) is calculated as in equations (25) and (26).

Figure 0006721535
Figure 0006721535

ここでもしデータポイントxの近傍としてxをチェックするするためにデータポイントxとxのユークリッド距離を計算し、データポイントxがxの近傍であれば、式(25)と(26)を用いることによりE[xp,]を求めるための計算コストはO(1)となる。これはこの場合、E[xp,xr]とE[]とE[x,x]とE[]をO(1)の計算コストで求めることができるからである。 Here if calculates the Euclidean distance of the data point x p and x r to check the x r as the vicinity of the data point x p, if the data point x q is in the vicinity of x r, in the formula (25) By using (26), the calculation cost for obtaining E[x p, x q ] is O(1). In this case this, E [x p, xr] and E [~ x p, ~ x r] and E [x q, x r] and E [~ x q, ~ x r] the calculation of O (1) This is because it can be calculated at cost.

次に固有ベクトルを高速に計算する方法について述べる。従来のLLEのアルゴリズムはデータセットXの低次元への埋め込みYを埋め込みコストへの最適解により計算する。エッジの重み行列Wに対してLLEカーネルはK=(I−W)(I−W)と計算されるが、この最適解はカーネルKの底の固有ベクトルに対応する。そのためもしλが|λ|≧|λ|≧...≧|λ|であるようなカーネルKのi番目の固有値であり、またzをそれに対応する固有ベクトルとすると、データセットXに対するm次元の埋め込みYはm+1個の底の固有ベクトルからY=[zN−m,N−m+1,...,zN−1]として計算することができる。 Next, a method for calculating the eigenvector at high speed will be described. The conventional LLE algorithm calculates the embedding Y in the low dimension of the data set X by the optimal solution to the embedding cost. For the edge weight matrix W, the LLE kernel is calculated as K=(I−W) T (I−W), but this optimal solution corresponds to the bottom eigenvector of the kernel K. Therefore, if λ i is |λ 1 |≧|λ 2 |≧. . . If the i-th eigenvalue of the kernel K such that ≧|λ N |, and z i is the corresponding eigenvector, then the m-dimensional embedding Y for the dataset X is Y=[ from the m+1 bottom eigenvectors. z N-m, z N-m+1 ,. . . , Z N−1 ].

高速に固有ベクトルを計算するために、本実施形態では逆ベキ乗法を用いる。逆ベキ乗法は最も底の固有ベクトルを、固有値を計算する行列の逆行列から計算する方法で、具体的には逆行列K−1から固有ベクトルzを計算することができる。そのためaを長さがNの任意の列ベクトルとすると、底の固有値λNaとその固有ベクトルzはベキ乗法をaτ=K−1τ−1と適用して計算することができる。しかし逆行列K−1は密な構造となるため、この手法に必要な計算コストはO(N)となりメモリコストはO(N)となる。 In order to calculate the eigenvector at high speed, the inverse power method is used in this embodiment. The inverse power method is a method of calculating the bottom eigenvector from the inverse matrix of the matrix for calculating the eigenvalue, and specifically, the eigenvector z N can be calculated from the inverse matrix K−1. Therefore, if a 0 is an arbitrary column vector of length N, the base eigenvalue λ Na and its eigenvector z N can be calculated by applying the power method to a τ =K −1 a τ −1 . However, since the inverse matrix K-1 has a dense structure, the calculation cost required for this method is O(N 3 ) and the memory cost is O(N 2 ).

直接カーネルKの逆行列を避けるために、本発明ではI−WのLU分解を計算する。具体的にはLとUを下三角行列及び上三角行列としたとき、行列LとUをLU=I−Wとして計算する。その結果式(27)のようになる。 In order to avoid the inverse matrix of the direct kernel K, we compute the LU decomposition of I-W. Specifically, when L and U are a lower triangular matrix and an upper triangular matrix, the matrix L and U are calculated as LU=I-W. As a result, equation (27) is obtained.

Figure 0006721535
Figure 0006721535

本実施形態では行列LとUにベキ乗法を用いてaτ−1からaτを式(28)のように計算する。 In the present embodiment, the powers of the matrices L and U are used to calculate a τ-1 to a τ as in Expression (28).

Figure 0006721535
Figure 0006721535

式(28)においてbとb´とb´´とaτを計算するために下三角行列と上三角行列に前進代入と後進代入を適用する(例えば、参考文献2を参照)。式(28)は下三角行列と上三角行列からベクトルaτをベクトルaτ−1からaτ−1=ULUaτという形で求められることを示している。式(27)からK=ULUが成り立つため、カーネルKの逆行列を直接用いることなくaτ=K−1τ−1を計算することができる。式(28)から式(29)のようにベクトルaτが収束するまでベキ乗法を適用することにより、底の固有値λと固有ベクトルzを計算することができる。 In equation (28), forward substitution and backward substitution are applied to the lower triangular matrix and the upper triangular matrix in order to calculate b, b′, b″, and a τ (for example, see Reference 2). Equation (28) shows that obtained in the form of a τ-1 = U T L T LU aτ vector a tau from the vector a tau-1 from the lower and upper triangular matrices. Since the equation (27) K = U T L T LU holds, it is possible to calculate the a τ = K -1 a τ- 1 without using the inverse matrix of kernel K directly. The base eigenvalue λ N and the eigenvector z N can be calculated by applying the power method until the vector a τ converges as in Expressions (28) to (29).

Figure 0006721535
Figure 0006721535

カーネルKの下三角行列と上三角行列は疎な構造を持つため、本発明は高速にベクトルaτを式(28)から計算することができる。次にその他の底の固有値λN−iと固有ベクトルzN−i(i=1,2,...,m)を計算する方法を述べる。このような固有値と固有ベクトルを求める方法としてホテリング法が有名である(例えば、参考文献1を参照)。ホテリング法の基本的アイデアは固有値を計算する行列を最大固有値が0としその他の固有値が変わらないようにシフトするというものである。その結果2番目に大きな固有値がシフトした行列において最大の固有値になる。具体的にはベキ乗法を用いて式(30)の行列Hの固有値と固有ベクトルを計算することでλN−iとzN−iを計算する。 Since the lower triangular matrix and the upper triangular matrix of the kernel K have a sparse structure, the present invention can quickly calculate the vector a τ from the equation (28). Next, a method for calculating the other base eigenvalues λ N-i and eigenvectors z N-i (i=1, 2,..., M ) will be described. The Hotelling method is famous as a method for obtaining such an eigenvalue and an eigenvector (for example, see Reference 1). The basic idea of the Hotelling method is to shift the matrix for calculating the eigenvalues so that the maximum eigenvalue is 0 and other eigenvalues remain unchanged. As a result, the second largest eigenvalue becomes the largest eigenvalue in the shifted matrix. Specifically, λ N-i and z N-i are calculated by calculating the eigenvalues and eigenvectors of the matrix H i of Expression (30) using the power method.

Figure 0006721535
Figure 0006721535

ここでhi,τを長さがNの列ベクトルとしたとき、固有値λN−iと固有ベクトルzN−iはhi,τ=Hi,τ−1とベキ乗法を適することにより求めることができる。しかしこの方法は行列Hが密な構造を持つため、O(N)の計算コストとO(N)のメモリコストが必要になるという問題がある。 Here, when h i,τ is a column vector of length N, the eigenvalue λ N-i and the eigenvector z N-i are hi i,τ =H i hi i,τ-1 You can ask. However, this method has a problem that a matrix for H i has a dense structure, memory cost of O computational cost (N 3) and O (N 2) is required.

行列Hを直接計算することを避けるために、本発明ではベクトルhi,τをベクトルhi,τ−1から式(31)のように計算する。 In order to avoid directly calculating the matrix H i , in the present invention, the vector h i,τ is calculated from the vector h i,τ−1 as shown in Expression (31).

Figure 0006721535
Figure 0006721535

ここで式(28)と同様に以下のようにベクトルaτは前進代入と後進代入を用いてベクトルhi,τ−1から式(32)のように計算する。 Here, similarly to the equation (28), the vector a τ is calculated from the vector h i, τ-1 as shown in the equation (32) using forward substitution and backward substitution as follows.

Figure 0006721535
Figure 0006721535

式(31)において長さがNのベクトルzN−jN−j i,τ−1/λN−jはベクトルを右から左へ計算することでO(N)の計算コストで求める。K−1=(ULU)−1となるため、式(30)、(31)、(32)から式(33)が成り立つ。 In equation (31), the vector of length N z N−j z N−j T hi , τ−1N−j is calculated from the right to the left at the calculation cost of O(N). Ask. Since K −1 =(U T L T LU) −1 , the formula (33) is established from the formulas (30), (31), and (32).

Figure 0006721535
Figure 0006721535

式(33)は式(31)と(32)からベクトルhi,τをホテリング法の行列Hを用いて計算できることを示している。本実施形態ではカーネルKの固有値λN−iと固有ベクトルzN−i(1≦i≦m)を式(34)に基づきベキ乗法によりベクトルhi,τが収束するまで計算することにより求める。 Expression (33) shows that the vector h i,τ can be calculated from the expressions (31) and (32) by using the matrix H i of the Hotelling method. In the present embodiment, the eigenvalue λ N−i of the kernel K and the eigenvector z N−i (1≦i≦m) are calculated by the power method based on the equation (34) until the vector h i,τ converges.

Figure 0006721535
Figure 0006721535

直接行列Hを計算しないため、本発明は高速に固有値と固有ベクトルを計算することができる。 Since the matrix H i is not calculated directly, the present invention can calculate eigenvalues and eigenvectors at high speed.

次に逆ベキ乗法において用いる行列I−WのLU分解を高速に計算する方法について述べる。行列LとUの要素はもし行列W´がW´=I−Wと与えられるときクラウトのアルゴリズム(例えば、参考文献2を参照)により式(35)及び式(36)のように計算できる。 Next, a method for calculating the LU decomposition of the matrix I-W used in the inverse power method at high speed will be described. The elements of the matrices L and U can be calculated as in equations (35) and (36) by the Kraut's algorithm (see eg reference 2) if the matrix W′ is given as W′=I−W.

Figure 0006721535
Figure 0006721535

式(35)と(36)は行列LとUの列は左から右へ、また各列において要素は上から下へ計算できることがわかる。そのため行列LとUの要素は対応する行列W´、L、Uの上と左の要素から計算することができる。 It can be seen that in equations (35) and (36), the columns of the matrices L and U can be calculated from left to right, and the elements in each column from top to bottom. Therefore, the elements of the matrices L and U can be calculated from the elements above and to the left of the corresponding matrices W', L, U.

本実施形態では行列LとUの非零要素の数を減らしてLU分解を高速に計算する。これはもしL[i,k]=0又はU[k,j]=0となれば式(35)と(36)から効果的にL[i,k]U[k,j]の計算を省くことができるからである。本実施形態では行列LとUの上と左の要素はもし対応する行列W´の要素が零であれば零になることと、行列W´の上と左の要素はW´=I−Wであるためもし対応する行列Wの左と上の要素が零になれば零になることを利用する。行列Wはエッジの重みから計算されるため、行列Wのデータポイントを並び変えることで上と左の要素が疎になればLU分解を高速に行うことができる。 In this embodiment, the number of non-zero elements in the matrices L and U is reduced to calculate the LU decomposition at high speed. This means that if L[i,k]=0 or U[k,j]=0, then the calculation of L[i,k]U[k,j] is effectively performed from equations (35) and (36). This is because it can be omitted. In this embodiment, the upper and left elements of the matrices L and U become zero if the corresponding elements of the matrix W′ are zero, and the upper and left elements of the matrix W′ are W′=I−W. Therefore, if the left and upper elements of the corresponding matrix W become zero, the fact that they become zero is used. Since the matrix W is calculated from edge weights, LU decomposition can be performed at high speed if the upper and left elements become sparse by rearranging the data points of the matrix W.

本実施形態ではデータポイントを次数の昇順で並び変えることでLU分解を高速に行う。ここで次数とはデータポイントから出ているエッジの本数である。並び変えることで行列Wの上と左の要素を疎にできるため、行列I−WのLU 分解を高速行うことができる。データポイントを並び変えるのには分布数え上げソートを用いることでO(N)の計算コストで並び替えを行うことができる(例えば、参考文献6(Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, Introduction to Algorithms, 2009, The MIT Press.)を参照)。nを三角行列における平均的な各行ベクトルの非零要素の数とすると、行列LとUを保持するメモリコストはO(Nn)となる。また式(35)と(36)から行列I−WのLU分解はO(Nn)の計算コストで行うことができる。 In this embodiment, the LU decomposition is performed at high speed by rearranging the data points in ascending order of the order. Here, the order is the number of edges generated from the data point. By rearranging the elements, the elements above and to the left of the matrix W can be made sparse, so that the LU decomposition of the matrix IW can be performed at high speed. Sorting the data points can be done at a computational cost of O(N) by using a distributed counting sort (see eg Reference 6 (Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, Introduction to Algorithms, 2009, The MIT Press.)). If n is the number of non-zero elements of each average row vector in the triangular matrix, the memory cost for holding the matrices L and U is O(Nn). Further, from the equations (35) and (36), the LU decomposition of the matrix I-W can be performed at a calculation cost of O(Nn 2 ).

[第1の実施形態のアルゴリズム]
本実施形態のアルゴリズムを、LLE計算装置10の各機能部の処理とともに、図5を用いて説明する。図5は、第1の実施形態に係るLLE計算処理のアルゴリズムの一例を示す図である。
[Algorithm of First Embodiment]
The algorithm of this embodiment will be described together with the processing of each functional unit of the LLE calculation device 10 with reference to FIG. FIG. 5 is a diagram illustrating an example of an algorithm of the LLE calculation process according to the first embodiment.

アルゴリズム15において、Sはエッジの重みを計算するために選択したデータポイントの集合であり、Dは選択されたデータポイントの近傍のデータポイントの集合であり、C[x]は近傍グラフにおいてデータポイントxに直接つながっているデータポイントの集合である。アルゴリズム15において近傍を高速に計算するためにSVDを計算するが、もしsをs=2であるようなSVDのランクとしたとき、本実施形態ではランクを2,2,...,2と徐々に増やしていきながら近傍を求めていく。計算コストの観点では粗い近似であれば高速に近似距離を計算することができるが近似の精度は高くない。一方、細かい精度であれば高い精度で近似距離を計算できるが、高い計算コストがかかってしまう。そのため、本実施形態では近傍にならないデータポイントは粗い近似で枝刈りし、近傍になる可能性が高いデータポイントは細かい近似で近似距離を計算する。結果として本発明は各データポイントの距離に応じて適切に近似の精度を設定して近傍を求めることができる。 In Algorithm 15, S is the set of data points selected to calculate the edge weights, D is the set of data points in the neighborhood of the selected data points, and C[x p ] is the data in the neighborhood graph. A set of data points directly connected to the point x p . In the algorithm 15, the SVD is calculated in order to calculate the neighborhood at a high speed. However, if s is a rank of the SVD such that s=2 l , in the present embodiment, the ranks are 2 1 , 2 2 ,. . . , 2 l, and gradually increase to find the neighborhood. From the viewpoint of calculation cost, if the approximation is rough, the approximate distance can be calculated at high speed, but the accuracy of the approximation is not high. On the other hand, if the accuracy is fine, the approximate distance can be calculated with high accuracy, but the calculation cost will be high. Therefore, in the present embodiment, data points that are not close to each other are pruned by coarse approximation, and data points that are likely to be close to each other are calculated by fine approximation to calculate an approximate distance. As a result, the present invention can determine the neighborhood by appropriately setting the approximation accuracy according to the distance of each data point.

アルゴリズム15に示すように、まず、行列X、低次元数m、SVDのランクs(=2)が入力される。そして、特異値分解計算部101は、複数のデータポイントを有する多次元行列の特異値分解(SVD)を計算する。具体的には、特異値分解計算部101はSを初期化し、行列XのSVDを計算する(1−2行目)。 As shown in Algorithm 15, first, the matrix X, the low-dimensional number m, and the rank s (=2 l ) of the SVD are input. Then, the singular value decomposition calculation unit 101 calculates the singular value decomposition (SVD) of the multidimensional matrix having a plurality of data points. Specifically, the singular value decomposition calculation unit 101 initializes S and calculates the SVD of the matrix X (1-2nd line).

データポイント選択部102は、複数のデータポイントから計算対象のデータポイントを選択する。具体的には、データポイント選択部102は、他のデータポイントへ多くのエッジを持つデータポイントを選択する(4行目)。これは本実施形態では近傍グラフを用いて他のデータポイントへの距離を推定するからである。そして、データポイント選択部102は、Dとθを初期化し(5−6行目)、K個の距離が∞になるデータポイントを追加することでN[x]を初期化する(7行目)。 The data point selection unit 102 selects a data point to be calculated from a plurality of data points. Specifically, the data point selection unit 102 selects a data point having many edges to other data points (fourth row). This is because in the present embodiment, the distance to other data points is estimated using the neighborhood graph. Then, the data point selection unit 102 initializes D and θ (5th to 6th lines), and initializes N[x p ] by adding K data points at which the distance becomes ∞ (7th line). Eye).

近似距離計算部103は、複数のデータポイントのそれぞれについて、計算対象のデータポイントとの間の近似の距離を、特異値分解に基づいて計算する。このとき、近似距離計算部103は、近傍を計算するためにランクを2から2に徐々に増やしていくが、もし近似の距離がθより大きくなればデータポイントを枝刈りする(9−13行目)。 The approximate distance calculation unit 103 calculates the approximate distance between each of the plurality of data points and the data point to be calculated based on the singular value decomposition. At this time, the approximate distance calculation unit 103 gradually increases the rank from 2 1 to 2 1 in order to calculate the neighborhood, but if the approximate distance becomes larger than θ, the data point is pruned (9- (Line 13).

また、距離推定部104は、近似の距離が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離の推定値を計算する。つまり、距離推定部104は、SVDを用いてもデータポイントを枝刈りできなかった場合はグラフ構造を用いて距離を推定する(14−18行目)。 The distance estimation unit 104 also calculates an estimated value of the Euclidean distance between each data point whose approximate distance is equal to or less than a predetermined value and the data point to be calculated. That is, the distance estimation unit 104 estimates the distance using the graph structure when the data point cannot be pruned using the SVD (14th to 18th lines).

近傍確定部105は、ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離を計算し、当該計算したユークリッド距離が所定値以下であるデータポイントを、計算対象のデータポイントの近傍のデータポイントに確定する。近傍確定部105は、データポイントを、選択されたデータポイントの近傍に確定した場合は、N[x]をそのデータポイントの距離を用いて更新する(19−25行目)。 The neighborhood determining unit 105 calculates the Euclidean distance between each data point whose estimated value of the Euclidean distance is less than or equal to a predetermined value and the data point to be calculated, and the calculated Euclidean distance is less than or equal to the predetermined value. Establish the point to a data point near the data point to be calculated. When the proximity determining unit 105 determines the data point to be in the vicinity of the selected data point, the proximity determining unit 105 updates N[x p ] using the distance of the data point (lines 19-25).

そして、近傍確定部105は、最も多くの近傍を持つデータポイントを見つける(26行目)。これはエッジ重み計算部106が、エッジの重みを他のデータポイントの近傍を用いて計算するためである。 Then, the neighborhood determination unit 105 finds a data point having the largest number of neighborhoods (26th line). This is because the edge weight calculation unit 106 calculates the edge weight using the neighborhood of another data point.

エッジ重み計算部106は、計算対象のデータポイントと計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算する。エッジ重み計算部106は、もし共有する近傍がある場合はWoodburyの公式を用いてエッジの重みを計算し(27−28行目)、そうでない場合はグラム行列を用いてエッジの重みを計算する(29−30行目)。このように、エッジ重み計算部106は、Woodburyの公式を用いて、計算済みデータポイントの近傍データポイントに関する逆行列から、計算対象のデータポイントの近傍のデータポイントに関する逆行列を計算することができる。 The edge weight calculation unit 106 calculates edge weights between a data point to be calculated and each data point near the data point to be calculated. The edge weight calculation unit 106 calculates the edge weight using the Woodbury formula when there is a shared neighborhood (lines 27-28), and otherwise uses the Gram matrix to calculate the edge weight. (Lines 29-30). In this way, the edge weight calculation unit 106 can use the Woodbury formula to calculate the inverse matrix of the data points in the vicinity of the data point to be calculated from the inverse matrix of the data points in the vicinity of the calculated data point. ..

つまり、エッジ重み計算部106は、エッジの重みが計算済みである計算済みデータポイントの近傍データポイントに、計算対象のデータポイントの近傍のデータポイントのうちの少なくとも一部が含まれる場合、計算済みデータポイントについてのエッジの重みの計算結果に基づいて、計算対象のデータポイントと計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算することができる。 In other words, the edge weight calculation unit 106 calculates if the data points in the vicinity of the calculated data points for which the edge weights have been calculated include at least some of the data points in the vicinity of the data point to be calculated. Based on the calculation result of the edge weight for the data point, the edge weight between the data point to be calculated and each data point in the vicinity of the data point to be calculated can be calculated.

並び替え部107は、複数のデータポイントについてのエッジの重みを表す行列を、次数の昇順に並び替える(32−33行目)。また、LU分解計算部108は、複数のデータポイントの隣接行列のLU分解を計算する。 The rearrangement unit 107 rearranges the matrix representing the edge weights of a plurality of data points in ascending order of the order (lines 32-33). The LU decomposition calculation unit 108 also calculates the LU decomposition of the adjacency matrix of a plurality of data points.

ベクトル計算部109は、エッジの重みに基づいて、複数のデータポイントについてのLLEカーネルの固有ベクトルを計算する。例えば、ベクトル計算部109は、ベクトル計算部109は、LU分解計算部108によって計算されたLU分解に基づいて、逆ベキ乗法を用いてLLEカーネルの固有ベクトル及び固有値を計算する(34−36行目)。 The vector calculation unit 109 calculates the eigenvector of the LLE kernel for a plurality of data points based on the edge weight. For example, the vector calculation unit 109 calculates the eigenvector and eigenvalue of the LLE kernel using the inverse power multiplication method based on the LU decomposition calculated by the LU decomposition calculation unit 108 (lines 34-36). ).

なお、28−30行目で、エッジ重み計算部106は、常に29行目を実行するようにしてもよい。この場合、従来のLLEと同様に、エッジ重み計算部106は、グラム行列を用いてエッジの重みの計算を行う。また、並び替え部107及びLU分解計算部108による処理が実行されないようにしてもよい。この場合、ベクトル計算部109は、従来のLLEと同様の方法で固有ベクトル及び固有値を計算する。また、また、図5のアルゴリズム15に対しては、図6に示す性質(定理1〜3)が成り立つ。図6は、定理1、定理2及び定理3を示す図である。 The edge weight calculation unit 106 may always execute the 29th line in the 28th to 30th lines. In this case, similarly to the conventional LLE, the edge weight calculation unit 106 calculates the edge weight using the Gram matrix. Further, the processing by the rearrangement unit 107 and the LU decomposition calculation unit 108 may not be executed. In this case, the vector calculation unit 109 calculates the eigenvector and the eigenvalue by the same method as the conventional LLE. Further, for the algorithm 15 shown in FIG. 5, the properties shown in FIG. 6 (Theorems 1 to 3) hold. FIG. 6 is a diagram showing Theorem 1, Theorem 2 and Theorem 3.

[第1の実施形態の処理]
図7を用いて、LLE計算装置10の処理の流れについて説明する。図7は、第1の実施形態に係るLLE計算装置の処理の流れを示すフローチャートである。まず、LLE計算装置10には、行列X、次元数m及びランクsが入力される(ステップS101)。次に、特異値分解計算部101はSを空集合に初期化する(ステップS102)。そして、特異値分解計算部101は行列XのランクsのSVDを計算する(ステップS103)。
[Processing of First Embodiment]
The processing flow of the LLE calculation device 10 will be described with reference to FIG. 7. FIG. 7 is a flowchart showing a processing flow of the LLE calculation device according to the first embodiment. First, the matrix X, the number of dimensions m, and the rank s are input to the LLE calculation device 10 (step S101). Next, the singular value decomposition calculation unit 101 initializes S to an empty set (step S102). Then, the singular value decomposition calculation unit 101 calculates the SVD of the rank s of the matrix X (step S103).

データポイント選択部102は、iを1からNまで増やしながら複数のデータポイントから計算対象のデータポイントを選択する(ステップS104、S105、S132)。そして、データポイント選択部102は、Dとθを初期化し(ステップS106、S107)、さらに、K個の距離が∞になるデータポイントを追加することでN[x]を初期化する(ステップS108)。 The data point selection unit 102 selects a data point to be calculated from a plurality of data points while increasing i from 1 to N (steps S104, S105, S132). Then, the data point selection unit 102 initializes D and θ (steps S106 and S107), and further initializes N[x p ] by adding K data points at which the distance is ∞ (step S106). S108).

近似距離計算部103は、複数のデータポイントのそれぞれについて、計算対象のデータポイントとの間の近似の距離を、特異値分解に基づいて計算する(ステップS109、S110、S111)。このとき、近似距離計算部103は、近傍を計算するためにランクを2から2に徐々に増やしていくが、もし近似の距離がθより大きくなれば(ステップS112、Yes)データポイントを枝刈りする(ステップS113)。また、近似の距離がθより大きくない場合(ステップS112、No)近似距離計算部103は次の処理に進む(ステップS114)。 The approximate distance calculation unit 103 calculates an approximate distance between each of the plurality of data points and the data point to be calculated based on the singular value decomposition (steps S109, S110, S111). At this time, the approximate distance calculation unit 103 gradually increases the rank from 2 1 to 2 1 in order to calculate the neighborhood, but if the approximate distance becomes larger than θ (step S112, Yes), the data points are calculated. Pruning is performed (step S113). If the approximate distance is not larger than θ (No in step S112), the approximate distance calculation unit 103 proceeds to the next process (step S114).

ここで、枝刈りされていないデータポイントが残っていない場合(ステップS115、No)、LLE計算装置10は、ステップS128へ進む。一方、枝刈りされていないデータポイントが残っている場合(ステップS115、Yes)、距離推定部104は、近似の距離が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離の推定値を計算する(ステップS116、S117)。距離の推定値がθより大きくなれば(ステップS118、Yes)、距離推定部104はデータポイントを枝刈りする(ステップS119)。また、近似の距離がθより大きくない場合(ステップS118、No)距離推定部104は次の処理に進む(ステップS120)。 Here, when there is no data point that has not been pruned (No in step S115), the LLE calculation device 10 proceeds to step S128. On the other hand, when data points that have not been pruned remain (step S115, Yes), the distance estimation unit 104 sets a distance between each data point whose approximate distance is equal to or less than a predetermined value and the data point to be calculated. The estimated value of the Euclidean distance is calculated (steps S116 and S117). If the estimated distance value is larger than θ (step S118, Yes), the distance estimation unit 104 prunes the data point (step S119). If the approximate distance is not larger than θ (No in step S118), the distance estimation unit 104 proceeds to the next process (step S120).

ここで、枝刈りされていないデータポイントが残っていない場合(ステップS121、No)、LLE計算装置10は、ステップS128へ進む。一方、枝刈りされていないデータポイントが残っている場合(ステップS121、Yes)、近傍確定部105は、ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離を計算し(ステップS122)、当該計算したユークリッド距離が所定値以下であるデータポイント(ステップS123、Yes)を、計算対象のデータポイントの近傍のデータポイントに確定し、N[x]をそのデータポイントの距離を用いて更新する(ステップS124、S125、S126)。また、近傍確定部105は、θを更新する(ステップS127)。そして、近傍確定部105は、最も多くの近傍を持つデータポイントを見つける(ステップS128)。 Here, when there is no data point that has not been pruned (No in step S121), the LLE calculation device 10 proceeds to step S128. On the other hand, when data points that have not been pruned remain (step S121, Yes), the neighborhood determining unit 105 determines each of the data points for which the Euclidean distance estimated value is equal to or less than a predetermined value and the data point to be calculated. The Euclidean distance between the calculated data points is calculated (step S122), and the data points whose calculated Euclidean distance is less than or equal to a predetermined value (step S123, Yes) are determined as data points near the data point to be calculated, and N[ x p ] is updated using the distance of the data point (steps S124, S125, S126). Further, the proximity determining unit 105 updates θ (step S127). Then, the neighborhood determination unit 105 finds a data point having the largest number of neighbors (step S128).

エッジ重み計算部106は、共有する近傍がある場合(ステップS129、Yes)はWoodburyの公式を用いてエッジの重みを計算し(ステップS130)、そうでない場合(ステップS129、No)はグラム行列を用いてエッジの重みを計算する(ステップS131)。 The edge weight calculation unit 106 calculates the edge weight using the Woodbury formula when there is a shared neighborhood (step S129, Yes) (step S130), and when not (step S129, No), the gram matrix is calculated. The edge weight is calculated by using (step S131).

並び替え部107は、複数のデータポイントについてのエッジの重みを表す行列を、次数の昇順に並び替える(ステップS133)。また、LU分解計算部108は、複数のデータポイントの隣接行列のLU分解を計算する(ステップS134)。 The rearrangement unit 107 rearranges the matrix representing the edge weights of a plurality of data points in ascending order of the order (step S133). Also, the LU decomposition calculation unit 108 calculates the LU decomposition of the adjacency matrix of the plurality of data points (step S134).

ベクトル計算部109は、エッジの重みに基づいて、複数のデータポイントについてのLLEカーネルの固有ベクトルを計算する。例えば、ベクトル計算部109は、LU分解計算部108によって計算されたLU分解に基づいて、逆ベキ乗法を用いてLLEカーネルの固有ベクトル及び固有値を計算する(ステップS135、S136、S137、S138)。そして、LLE計算装置10は、次元削減された行列Yを出力する(ステップS139)。 The vector calculation unit 109 calculates the eigenvector of the LLE kernel for a plurality of data points based on the edge weight. For example, the vector calculation unit 109 calculates the eigenvector and eigenvalue of the LLE kernel using the inverse power method based on the LU decomposition calculated by the LU decomposition calculation unit 108 (steps S135, S136, S137, S138). Then, the LLE calculation device 10 outputs the dimension-reduced matrix Y (step S139).

[第1の実施形態の効果]
特異値分解計算部101は、複数のデータポイントを有する多次元行列の特異値分解を計算する。また、データポイント選択部102は、複数のデータポイントから計算対象のデータポイントを選択する。また、近似距離計算部103は、複数のデータポイントのそれぞれについて、計算対象のデータポイントとの間の近似の距離を、特異値分解に基づいて計算する。また、距離推定部104は、近似の距離が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離の推定値を計算する。また、近傍確定部105は、ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、計算対象のデータポイントとの間のユークリッド距離を計算し、当該計算したユークリッド距離が所定値以下であるデータポイントを、計算対象のデータポイントの近傍のデータポイントに確定する。また、エッジ重み計算部106は、計算対象のデータポイントと計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算する。また、ベクトル計算部109は、エッジの重みに基づいて、複数のデータポイントについてのLLEカーネルの固有ベクトルを計算する。このように、本実施形態では、近傍確定部105によってユークリッドの距離が実際に計算される対象を、近似の距離及びユークリッド距離の推定値を用いてあらかじめ削減している。このため、本実施形態によれば、LLEによる次元削減の際の計算コスト及びメモリコストを低減させることができる。
[Effects of First Embodiment]
The singular value decomposition calculation unit 101 calculates the singular value decomposition of a multidimensional matrix having a plurality of data points. Further, the data point selection unit 102 selects a data point to be calculated from the plurality of data points. Further, the approximate distance calculation unit 103 calculates an approximate distance between each of the plurality of data points and the data point to be calculated based on the singular value decomposition. The distance estimation unit 104 also calculates an estimated value of the Euclidean distance between each data point whose approximate distance is equal to or less than a predetermined value and the data point to be calculated. Also, the neighborhood determining unit 105 calculates the Euclidean distance between each data point whose estimated value of the Euclidean distance is less than or equal to a predetermined value and the data point to be calculated, and the calculated Euclidean distance is less than or equal to the predetermined value. Establish a data point as a data point near the data point to be calculated. Further, the edge weight calculation unit 106 calculates the weight of the edge between the data point to be calculated and each data point in the vicinity of the data point to be calculated. Further, the vector calculation unit 109 calculates the eigenvectors of the LLE kernel for the plurality of data points based on the edge weights. As described above, in the present embodiment, the target for which the Euclidean distance is actually calculated by the neighborhood determining unit 105 is reduced in advance by using the approximate distance and the estimated value of the Euclidean distance. Therefore, according to this embodiment, it is possible to reduce the calculation cost and the memory cost when the dimension is reduced by LLE.

エッジ重み計算部106は、エッジの重みが計算済みである計算済みデータポイントの近傍データポイントに、計算対象のデータポイントの近傍のデータポイントのうちの少なくとも一部が含まれる場合、計算済みデータポイントについてのエッジの重みの計算結果に基づいて、計算対象のデータポイントと計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算することができる。このように、同じ近傍を持つデータポイントについては、計算済みの結果を利用してすることで、エッジの重みの計算に要するコストを低減させることができる。 The edge weight calculation unit 106 calculates the calculated data points when the data points in the vicinity of the calculated data points for which the edge weights have been calculated include at least some of the data points in the vicinity of the data point to be calculated. The edge weight between the data point to be calculated and each of the data points in the vicinity of the data point to be calculated can be calculated based on the calculation result of the edge weight with respect to. In this way, for data points having the same neighborhood, by using the already calculated result, it is possible to reduce the cost required for calculating the edge weight.

エッジ重み計算部106は、Woodburyの公式を用いて、計算済みデータポイントの近傍データポイントに関する逆行列から、計算対象のデータポイントの近傍のデータポイントに関する逆行列を計算することができる。このように、Woodburyの公式を用いることで、特に逆行列の計算に要するコストを低減させることができる。 The edge weight calculation unit 106 can use the Woodbury formula to calculate the inverse matrix of the data points in the vicinity of the data point to be calculated from the inverse matrix of the data points in the vicinity of the calculated data point. As described above, by using the Woodbury formula, it is possible to reduce the cost particularly required for the calculation of the inverse matrix.

並び替え部107は、複数のデータポイントについてのエッジの重みを表す行列を、次数の昇順に並び替える。また、LU分解計算部108は、複数のデータポイントの隣接行列のLU分解を計算する。このとき、ベクトル計算部109は、LU分解計算部108によって計算されたLU分解に基づいてLLEカーネルの固有ベクトルを計算する。このように、LU分解を行うことで、固有ベクトルの計算に要するコストを低減させることができる。 The sorting unit 107 sorts the matrix representing the edge weights of a plurality of data points in ascending order of the order. The LU decomposition calculation unit 108 also calculates the LU decomposition of the adjacency matrix of a plurality of data points. At this time, the vector calculation unit 109 calculates the eigenvector of the LLE kernel based on the LU decomposition calculated by the LU decomposition calculation unit 108. By performing LU decomposition in this way, it is possible to reduce the cost required to calculate the eigenvector.

[システム構成等]
また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示のように構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。さらに、各装置にて行われる各処理機能は、その全部又は任意の一部が、CPU(Central Processing Unit)及び当該CPUにて解析実行されるプログラムにて実現され、あるいは、ワイヤードロジックによるハードウェアとして実現され得る。
[System configuration, etc.]
Further, each constituent element of each illustrated device is functionally conceptual, and does not necessarily have to be physically configured as illustrated. That is, the specific form of distribution/integration of each device is not limited to the one shown in the figure, and all or part of the device may be functionally or physically distributed/arranged in arbitrary units according to various loads and usage conditions. It can be integrated and configured. Furthermore, each processing function performed in each device is realized in whole or in part by a CPU (Central Processing Unit) and a program that is analyzed and executed by the CPU, or a hardware by a wired logic. Can be realized as.

また、本実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上記文書中や図面中で示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。 Further, of the processes described in the present embodiment, all or part of the processes described as being automatically performed may be manually performed, or the processes described as manually performed may be performed. All or part of the process can be automatically performed by a known method. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-mentioned documents and drawings can be arbitrarily changed unless otherwise specified.

[プログラム]
一実施形態として、LLE計算装置10は、パッケージソフトウェアやオンラインソフトウェアとして上記のLLEの計算を実行するLLE計算プログラムを所望のコンピュータにインストールさせることによって実装できる。例えば、上記のLLE計算プログラムを情報処理装置に実行させることにより、情報処理装置をLLE計算装置10として機能させることができる。ここで言う情報処理装置には、デスクトップ型又はノート型のパーソナルコンピュータが含まれる。また、その他にも、情報処理装置にはスマートフォン、携帯電話機やPHS(Personal Handyphone System)等の移動体通信端末、さらには、PDA(Personal Digital Assistant)等のスレート端末等がその範疇に含まれる。
[program]
As one embodiment, the LLE calculation device 10 can be implemented by installing an LLE calculation program that executes the above LLE calculation as package software or online software in a desired computer. For example, by causing the information processing apparatus to execute the above LLE calculation program, the information processing apparatus can be caused to function as the LLE calculation apparatus 10. The information processing device mentioned here includes a desktop or notebook personal computer. In addition, the information processing apparatus also includes a mobile communication terminal such as a smartphone, a mobile phone, a PHS (Personal Handyphone System), and a slate terminal such as a PDA (Personal Digital Assistant) in its category.

また、LLE計算装置10は、ユーザが使用する端末装置をクライアントとし、当該クライアントに上記のLLEの計算に関するサービスを提供するLLE計算サーバ装置として実装することもできる。例えば、LLE計算サーバ装置は、多次元行列を入力とし、次元削減した行列を出力とするLLE計算サービスを提供するサーバ装置として実装される。この場合、LLE計算サーバ装置は、Webサーバとして実装することとしてもよいし、アウトソーシングによって上記のLLEの計算に関するサービスを提供するクラウドとして実装することとしてもかまわない。 The LLE calculation device 10 can also be implemented as a LLE calculation server device that uses a terminal device used by a user as a client and provides the client with a service related to the above LLE calculation. For example, the LLE calculation server device is implemented as a server device that provides an LLE calculation service in which a multidimensional matrix is input and a dimension-reduced matrix is output. In this case, the LLE calculation server device may be implemented as a Web server, or may be implemented as a cloud that provides the above-mentioned LLE calculation service by outsourcing.

図8は、LLE計算プログラムを実行するコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010、CPU1020を有する。また、コンピュータ1000は、ハードディスクドライブインタフェース1030、ディスクドライブインタフェース1040、シリアルポートインタフェース1050、ビデオアダプタ1060、ネットワークインタフェース1070を有する。これらの各部は、バス1080によって接続される。 FIG. 8 is a diagram illustrating an example of a computer that executes the LLE calculation program. The computer 1000 has, for example, a memory 1010 and a CPU 1020. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These units are connected by a bus 1080.

メモリ1010は、ROM(Read Only Memory)1011及びRAM(Random access memory)1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1090に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1100に接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ1100に挿入される。シリアルポートインタフェース1050は、例えばマウス1110、キーボード1120に接続される。ビデオアダプタ1060は、例えばディスプレイ1130に接続される。 The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM (Random access memory) 1012. The ROM 1011 stores, for example, a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to the hard disk drive 1090. The disk drive interface 1040 is connected to the disk drive 1100. For example, a removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to, for example, a mouse 1110 and a keyboard 1120. The video adapter 1060 is connected to the display 1130, for example.

ハードディスクドライブ1090は、例えば、OS(Operating System)1091、アプリケーションプログラム1092、プログラムモジュール1093、プログラムデータ1094を記憶する。すなわち、LLE計算装置10の各処理を規定するプログラムは、コンピュータにより実行可能なコードが記述されたプログラムモジュール1093として実装される。プログラムモジュール1093は、例えばハードディスクドライブ1090に記憶される。例えば、LLE計算装置10における機能構成と同様の処理を実行するためのプログラムモジュール1093が、ハードディスクドライブ1090に記憶される。なお、ハードディスクドライブ1090は、SSDにより代替されてもよい。 The hard disk drive 1090 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. That is, the program that defines each process of the LLE computing device 10 is implemented as a program module 1093 in which code executable by a computer is described. The program module 1093 is stored in the hard disk drive 1090, for example. For example, the hard disk drive 1090 stores a program module 1093 for executing the same processing as the functional configuration of the LLE computing device 10. The hard disk drive 1090 may be replaced by SSD.

また、上述した実施形態の処理で用いられる設定データは、プログラムデータ1094として、例えばメモリ1010やハードディスクドライブ1090に記憶される。そして、CPU1020が、メモリ1010やハードディスクドライブ1090に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して実行する。 Further, the setting data used in the processing of the above-described embodiment is stored as the program data 1094 in the memory 1010 or the hard disk drive 1090, for example. Then, the CPU 1020 reads out the program module 1093 and the program data 1094 stored in the memory 1010 or the hard disk drive 1090 to the RAM 1012 as necessary and executes them.

なお、プログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1090に記憶される場合に限らず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ1100等を介してCPU1020によって読み出されてもよい。あるいは、プログラムモジュール1093及びプログラムデータ1094は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。そして、プログラムモジュール1093及びプログラムデータ1094は、他のコンピュータから、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。 The program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). Then, the program module 1093 and the program data 1094 may be read by the CPU 1020 from another computer via the network interface 1070.

10 LLE計算装置
101 特異値分解計算部
102 データポイント選択部
103 近似距離計算部
104 距離推定部
105 近傍確定部
106 エッジ重み計算部
107 並び替え部
108 LU分解計算部
109 ベクトル計算部
10 LLE Calculator 101 Singular Value Decomposition Calculator 102 Data Point Selector 103 Approximate Distance Calculator 104 Distance Estimator 105 Neighbor Determinator 106 Edge Weight Calculator 107 Sorting Unit 108 LU Decomposition Calculator 109 Vector Calculator

Claims (6)

複数のデータポイントを有する多次元行列の特異値分解を計算する特異値分解計算部と、
前記複数のデータポイントから計算対象のデータポイントを選択するデータポイント選択部と、
前記複数のデータポイントのそれぞれについて、前記計算対象のデータポイントとの間の近似の距離を、前記特異値分解に基づいて計算する近似距離計算部と、
前記近似の距離が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離の推定値を計算する距離推定部と、
前記ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離を計算し、当該計算したユークリッド距離が所定値以下であるデータポイントを、前記計算対象のデータポイントの近傍のデータポイントに確定する近傍確定部と、
前記計算対象のデータポイントと前記計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算するエッジ重み計算部と、
前記エッジの重みに基づいて、前記複数のデータポイントについてのLLEカーネルの固有ベクトルを計算するベクトル計算部と、
を有することを特徴とするLLE計算装置。
A singular value decomposition calculator that calculates the singular value decomposition of a multidimensional matrix having multiple data points,
A data point selection unit that selects a data point to be calculated from the plurality of data points,
For each of the plurality of data points, an approximate distance between the data point to be calculated, an approximate distance calculation unit that calculates based on the singular value decomposition,
A distance estimation unit that calculates an estimated value of the Euclidean distance between each of the data points whose approximate distance is less than or equal to a predetermined value and the data point to be calculated,
The Euclidean distance between each of the data points whose estimated value of the Euclidean distance is less than or equal to a predetermined value and the data point to be calculated is calculated, and the calculated Euclidean distance is equal to or less than a predetermined value. A neighborhood determining unit that determines the data points near the data point to be calculated,
An edge weight calculation unit that calculates a weight of an edge between the data point to be calculated and each of the data points in the vicinity of the data point to be calculated,
A vector calculator that calculates an eigenvector of the LLE kernel for the plurality of data points based on the edge weights;
An LLE calculation device comprising:
前記エッジ重み計算部は、前記エッジの重みが計算済みである計算済みデータポイントの近傍データポイントに、前記計算対象のデータポイントの近傍のデータポイントのうちの少なくとも一部が含まれる場合、前記計算済みデータポイントについての前記エッジの重みの計算結果に基づいて、前記計算対象のデータポイントと前記計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算することを特徴とする請求項1に記載のLLE計算装置。 The edge weight calculator calculates the edge weights when the data points in the vicinity of the calculated data points for which the edge weights have been calculated include at least a part of the data points in the vicinity of the data point to be calculated. Calculating an edge weight between the data point to be calculated and each of the data points in the vicinity of the data point to be calculated based on the calculation result of the weight of the edge for the processed data point. The LLE calculation device according to claim 1. 前記エッジ重み計算部は、Woodburyの公式を用いて、前記計算済みデータポイントの近傍データポイントに関する逆行列から、前記計算対象のデータポイントの近傍のデータポイントに関する逆行列を計算することを特徴とする請求項2に記載のLLE計算装置。 The edge weight calculator may use a Woodbury formula to calculate an inverse matrix of data points in the vicinity of the data point to be calculated from an inverse matrix of data points in the vicinity of the calculated data point. The LLE calculation device according to claim 2. 前記複数のデータポイントについての前記エッジの重みを表す行列を、次数の昇順に並び替える並び替え部と、
前記複数のデータポイントの隣接行列のLU分解を計算するLU分解計算部と、
をさらに有し、
前記ベクトル計算部は、前記LU分解計算部によって計算されたLU分解に基づいて前記LLEカーネルの固有ベクトルを計算することを特徴とする請求項1又は2に記載のLLE計算装置。
A sorting unit that sorts the matrix representing the edge weights of the plurality of data points in ascending order of order,
An LU decomposition calculator for calculating an LU decomposition of an adjacency matrix of the plurality of data points,
Further has
The LLE calculation device according to claim 1, wherein the vector calculation unit calculates the eigenvector of the LLE kernel based on the LU decomposition calculated by the LU decomposition calculation unit.
LLE計算装置によって実行されるLLE計算方法であって、
複数のデータポイントを有する多次元行列の特異値分解を計算する特異値分解計算工程と、
前記複数のデータポイントから計算対象のデータポイントを選択するデータポイント選択工程と、
前記複数のデータポイントのそれぞれについて、前記計算対象のデータポイントとの間の近似の距離を、前記特異値分解に基づいて計算する近似距離計算工程と、
前記近似の距離が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離の推定値を計算する距離推定工程と、
前記ユークリッド距離の推定値が所定値以下であるデータポイントのそれぞれと、前記計算対象のデータポイントとの間のユークリッド距離を計算し、当該計算したユークリッド距離が所定値以下であるデータポイントを、前記計算対象のデータポイントの近傍のデータポイントに確定する近傍確定工程と、
前記計算対象のデータポイントと前記計算対象のデータポイントの近傍のデータポイントのそれぞれとの間のエッジの重みを計算するエッジ重み計算工程と、
前記エッジの重みに基づいて、前記複数のデータポイントについてのLLEカーネルの固有ベクトルを計算するベクトル計算工程と、
を含んだことを特徴とするLLE計算方法。
An LLE calculation method executed by an LLE calculation device, comprising:
A singular value decomposition calculation step for calculating the singular value decomposition of a multidimensional matrix having a plurality of data points,
A data point selecting step of selecting a data point to be calculated from the plurality of data points,
For each of the plurality of data points, an approximate distance between the data points to be calculated, an approximate distance calculation step of calculating based on the singular value decomposition,
A distance estimating step of calculating an estimated value of the Euclidean distance between each of the data points whose approximate distance is equal to or less than a predetermined value and the data point to be calculated,
The Euclidean distance between each of the data points whose estimated value of the Euclidean distance is less than or equal to a predetermined value and the data point to be calculated is calculated, and the calculated Euclidean distance is equal to or less than a predetermined value. A neighborhood confirmation step of confirming data points in the vicinity of the data point to be calculated,
An edge weight calculation step of calculating a weight of an edge between the data point to be calculated and each of the data points in the vicinity of the data point to be calculated,
A vector calculation step of calculating an eigenvector of the LLE kernel for the plurality of data points based on the edge weights;
An LLE calculation method comprising:
コンピュータを、請求項1から4のいずれか1項に記載のLLE計算装置として機能させるためのLLE計算プログラム。 An LLE calculation program for causing a computer to function as the LLE calculation device according to claim 1.
JP2017093347A 2017-05-09 2017-05-09 LLE calculation device, LLE calculation method, and LLE calculation program Active JP6721535B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017093347A JP6721535B2 (en) 2017-05-09 2017-05-09 LLE calculation device, LLE calculation method, and LLE calculation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017093347A JP6721535B2 (en) 2017-05-09 2017-05-09 LLE calculation device, LLE calculation method, and LLE calculation program

Publications (2)

Publication Number Publication Date
JP2018190251A JP2018190251A (en) 2018-11-29
JP6721535B2 true JP6721535B2 (en) 2020-07-15

Family

ID=64480207

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017093347A Active JP6721535B2 (en) 2017-05-09 2017-05-09 LLE calculation device, LLE calculation method, and LLE calculation program

Country Status (1)

Country Link
JP (1) JP6721535B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020115919A1 (en) * 2018-12-07 2020-06-11 Nec Corporation Data analysis apparatus, method, and computer readable
CN110991546B (en) * 2019-12-10 2022-06-21 西安交通大学 Bearing degradation feature extraction method based on improved local linear embedding algorithm

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6122628A (en) * 1997-10-31 2000-09-19 International Business Machines Corporation Multidimensional data clustering and dimension reduction for indexing and searching
CN101520847B (en) * 2008-02-29 2012-06-13 富士通株式会社 Pattern identification device and method

Also Published As

Publication number Publication date
JP2018190251A (en) 2018-11-29

Similar Documents

Publication Publication Date Title
Breheny et al. Group descent algorithms for nonconvex penalized linear and logistic regression models with grouped predictors
Mohammadi et al. Bayesian structure learning in sparse Gaussian graphical models
Houlsby et al. Bayesian active learning for classification and preference learning
Griffin et al. Bayesian hyper‐lassos with non‐convex penalization
Khan et al. Variable selection for survival data with a class of adaptive elastic net techniques
US9536201B2 (en) Identifying associations in data and performing data analysis using a normalized highest mutual information score
Mallick et al. Bayesian methods for high dimensional linear models
Chen et al. Linear-cost covariance functions for Gaussian random fields
US11842279B2 (en) Combinatorial Bayesian optimization using a graph cartesian product
JP2015203946A (en) Method for calculating center of gravity of histogram
US20210089832A1 (en) Loss Function Optimization Using Taylor Series Expansion
Mall et al. Representative subsets for big data learning using k-NN graphs
JP2011014133A (en) Method for clustering sample using mean shift procedure
Bachoc et al. Cross-validation estimation of covariance parameters under fixed-domain asymptotics
JP6721535B2 (en) LLE calculation device, LLE calculation method, and LLE calculation program
JP6453785B2 (en) Regression analysis apparatus, regression analysis method, and regression analysis program
US20070021952A1 (en) General graphical Gaussian modeling method and apparatus therefore
US11574153B2 (en) Identifying organisms for production using unsupervised parameter learning for outlier detection
Khashabi et al. Clustering with side information: From a probabilistic model to a deterministic algorithm
JP5727421B2 (en) Related node search device, related node search method, and program
JP2002175305A (en) Graphical modeling method and device for inferring gene network
Mohammadi et al. The ratio of normalizing constants for bayesian graphical gaussian model selection
Yang et al. Tensor machines for learning target-specific polynomial features
Zhang et al. Bayesian generalized kernel models
Lu et al. Principal component analysis for exponential family data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190627

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200324

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: 20200616

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200618

R150 Certificate of patent or registration of utility model

Ref document number: 6721535

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150