JP7635855B2 - Data analysis device, method and program - Google Patents
Data analysis device, method and program Download PDFInfo
- Publication number
- JP7635855B2 JP7635855B2 JP2023555936A JP2023555936A JP7635855B2 JP 7635855 B2 JP7635855 B2 JP 7635855B2 JP 2023555936 A JP2023555936 A JP 2023555936A JP 2023555936 A JP2023555936 A JP 2023555936A JP 7635855 B2 JP7635855 B2 JP 7635855B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- elements
- input
- matrix
- parameter
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N7/00—Computing arrangements based on specific mathematical models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N99/00—Subject matter not provided for in other groups of this subclass
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Mathematical Analysis (AREA)
- Data Mining & Analysis (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Algebra (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Databases & Information Systems (AREA)
- Complex Calculations (AREA)
Description
本発明の実施形態は、データ解析装置、方法およびプログラムに関する。 Embodiments of the present invention relate to data analysis devices, methods and programs.
近年データ(data)分析において非負値行列分解(Nonnegative Matrix Factorization, NMF)または非負値テンソル分解(Nonnegative Tensor Factorization, NTF)と呼ばれる手法が広く利用されている(例えば非特許文献1、2参照)。テンソルは3軸以上の高次の配列である。In recent years, a method called Nonnegative Matrix Factorization (NMF) or Nonnegative Tensor Factorization (NTF) has been widely used in data analysis (see, for example, Non-Patent Documents 1 and 2). A tensor is a high-dimensional array with three or more axes.
分析対象が文書、購買履歴、ユーザ(user)属性情報、映画の評価履歴などの要素の値が、非負の行列、またはテンソルとして表現することができる場合、行列表現されたデータをNMFによって非負の行列の積へ因子分解したり、テンソル表現されたデータをNTFによって非負の行列の積へ因子分解したりすることで、データ中のパターン(pattern)を自動で抽出したりデータの欠損値を補完したりすることが可能となる。 When the values of elements of the analysis target, such as documents, purchasing history, user attribute information, movie rating history, etc., can be expressed as non-negative matrices or tensors, it is possible to automatically extract patterns in the data or complement missing values in the data by factoring matrix-represented data into products of non-negative matrices using NMF, or factoring tensor-represented data into products of non-negative matrices using NTF.
しかしながら、近年のデータ分析においては、データ収集の方法およびプライバシ(privacy)保護のための処理などの結果により作成される、行列またはテンソルの要素のインデックス(index)と、その要素の値との対応が取れないデータを分析しなければならない場合がある。
例えば、ユーザの映画の評価傾向のパターンを抽出する例において、通常のNMFでは、行列表現された映画の評価履歴
However, in recent data analysis, it is sometimes necessary to analyze data in which the index of a matrix or tensor element does not correspond to the value of that element, which is created as a result of the data collection method and processing for privacy protection.
For example, in the case of extracting patterns of users' movie rating trends, normal NMF uses a matrix representation of movie rating history.
が利用可能であると仮定し、これを入力としてNMFを適用することでパターンの抽出が行なわれる。行列表現された映画の評価履歴は、例えば、行のインデックスiがユーザに、列のインデックスjが映画にそれぞれ対応し、行列要素の値xijがユーザiによる映画jの評価値を示す行列である。 Assuming that the matrix is available, NMF is applied to extract patterns using the matrix as input. For example, the row index i corresponds to a user, the column index j corresponds to a movie, and the matrix element value x ij indicates the rating value of movie j by user i.
しかし、このような行列表現された映画の評価履歴は、必ずしも利用可能であるとは限らない。例えば、ユーザiが映画jを評価した、または視聴したことは記録されて利用され得るが、プライバシ保護などの観点から、その評価値は、映画jに紐付く形で記録または公開されておらず、ユーザiによる映画jの評価値の分布、例えば評価値を「1」とした映画がz1本存在し、評価値を「2」とした映画がz2本存在する…など、の形式が利用できる場合がある。
この場合、ユーザiによる映画jの評価値は観測できないため、行列要素のインデックス(i, j)と、その要素の値との対応が取れず、すなわちxijの値が何であるかは分からないため、行列表現ができないデータとして表現される。
However, such a matrix representation of movie rating history is not necessarily usable. For example, the fact that user i rated or watched movie j may be recorded and used, but the rating value is not recorded or made public in a form linked to movie j from the viewpoint of privacy protection, and the distribution of ratings of movie j by user i, for example, there is one movie with a rating value of "1", there are z two movies with a rating value of "2", etc., may be available.
In this case, the rating value of movie j by user i cannot be observed, so there is no correspondence between the matrix element index (i, j) and the value of that element. In other words, it is not known what the value of x ij is, so the data is represented as data that cannot be expressed in a matrix.
同様に、行のインデックスiが体重および年収などの各属性の項目に対応し、列のインデックスjがユーザに対応するユーザ属性情報などを扱う場合も、プライバシ保護などの観点から、その評価値はユーザjに紐付く形で記録または公開されておらず、項目iの値の分布、例えば体重が60kgであるとしたユーザがz1人存在し、体重が61kgであるとした人がz2人存在する…など、の形式で利用できる場合がある。この場合も、映画の評価履歴の場合と同様、項目iに関するユーザjの情報は観測できないため、行列要素のインデックスと、その要素の値との対応が取れないことから、行列表現のできないデータとなる。 Similarly, when dealing with user attribute information where row index i corresponds to each attribute item such as weight and annual income, and column index j corresponds to a user, from the perspective of privacy protection, the rating value is not recorded or published in a form linked to user j, and may be available in the form of a distribution of the value of item i, for example, there is one user z whose weight is 60 kg, there are two users z whose weight is 61 kg, etc. In this case, as in the case of movie rating history, the information of user j regarding item i cannot be observed, and therefore it is not possible to establish a correspondence between the index of a matrix element and the value of that element, resulting in data that cannot be expressed in a matrix.
この発明は、上記事情に着目してなされたもので、その目的とするところは、解析対象データのインデックスと要素との対応の有無によらずに当該解析対象データを適切に解析することができるようにしたデータ解析装置、方法およびプログラムを提供することにある。This invention has been made in light of the above-mentioned circumstances, and its purpose is to provide a data analysis device, method, and program that are capable of appropriately analyzing the data to be analyzed regardless of whether there is a correspondence between the index and elements of the data to be analyzed.
本発明の一態様に係るデータ解析装置は、解析対象データのインデックスの集合であるインデックスデータ、前記解析対象データの要素の集合、および前記解析対象データの要素の大小関係が示される大小比較データの入力を受け付ける入力部と、前記解析対象データの因子の推定に用いられる損失関数と前記損失関数の近似との誤差の上界を最小化するパラメタを、前記入力部により入力した前記要素の集合に基づいて推定する第1の推定部と、前記入力部により入力した前記インデックスデータ、前記大小比較データ、および前記第1の推定部により推定されたパラメタに基づいて、非負制約を満たす条件での前記解析対象データの因子を推定する第2の推定部と、を備える。A data analysis device according to one embodiment of the present invention includes an input unit that accepts input of index data, which is a set of indexes of data to be analyzed, a set of elements of the data to be analyzed, and size comparison data indicating the size relationship of the elements of the data to be analyzed; a first estimation unit that estimates parameters that minimize an upper bound of the error between a loss function used to estimate a factor of the data to be analyzed and an approximation of the loss function, based on the set of elements input by the input unit; and a second estimation unit that estimates parameters of the data to be analyzed under conditions that satisfy non-negative constraints, based on the index data, the size comparison data, and the parameters estimated by the first estimation unit input by the input unit.
本発明の一態様に係るデータ解析方法は、データ解析装置により行なわれる方法であって、解析対象データのインデックスの集合であるインデックスデータ、前記解析対象データの要素の集合、および前記解析対象データの要素の大小関係が示される大小比較データの入力を受け付けることと、前記解析対象データの因子の推定に用いられる損失関数と前記損失関数の近似との誤差の上界を最小化するパラメタを、前記入力した前記要素の集合に基づいて推定することと、前記入力した前記インデックスデータ、前記大小比較データ、および前記推定されたパラメタに基づいて、非負制約を満たす条件での前記解析対象データの因子を推定することと、を備える。A data analysis method according to one embodiment of the present invention is a method performed by a data analysis device, and includes accepting input of index data, which is a set of indexes of data to be analyzed, a set of elements of the data to be analyzed, and size comparison data indicating the size relationship of the elements of the data to be analyzed; estimating parameters that minimize an upper bound of the error between a loss function used to estimate a factor of the data to be analyzed and an approximation of the loss function based on the input set of elements; and estimating factors of the data to be analyzed under conditions that satisfy non-negative constraints based on the input index data, the size comparison data, and the estimated parameters.
本発明によれば、解析対象データのインデックスと要素との対応の有無によらずに当該解析対象データを適切に解析することができる。 According to the present invention, the data to be analyzed can be appropriately analyzed regardless of whether there is a correspondence between the index and elements of the data to be analyzed.
以下、図面を参照しながら、この発明に係わる一実施形態を説明する。
本実施形態では、行列またはテンソルの要素のインデックスと、その要素の値との対応が取れない形式で与えられるデータであってもNMFまたはNTFのように、データ中のパターンを自動で抽出したり、行列要素の値を推定したりすることが可能な手法について説明する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
In this embodiment, we will explain a method that can automatically extract patterns in data and estimate the values of matrix elements, such as NMF or NTF, even if the data is given in a format in which the index of a matrix or tensor element cannot correspond to the value of that element.
従来技術のNMF(NTF)は、上述のような行列(テンソル)要素のインデックスと、その要素の値の対応が取れないデータを分析することができない。なぜなら、以下のように、NMFでは、入力となるデータが行列表現されていることが仮定されているためである。 Conventional NMF (NTF) cannot analyze data in which the indices of matrix (tensor) elements do not correspond to the values of those elements, as described above. This is because NMF assumes that the input data is expressed in matrices, as shown below.
NMFは、入力となる行列 NMF is an input matrix
を低ランク近似(low rank approximation)する、i行r列の因子行列およびr行j列の因子行列にそれぞれ対応する、要素が非負の値をもつ因子行列 A factor matrix with non-negative elements that corresponds to the factor matrix with i rows and r columns and the factor matrix with r rows and j columns, respectively, and that performs a low rank approximation of
と and
とを因子分解の結果として推定することでパターンの抽出を行なう。 Patterns are extracted by estimating as the result of factorization.
因子行列の推定は、行列The estimation of the factor matrix is done by the matrix
と、因子行列の積 and the product of the factor matrices
とが類似した値となるように行われる。以後、 and are similar values.
の(i, j)要素はThe (i, j) element of
と記載される。上記の類似の尺度として用いられる損失関数、すなわち値が小さいほど2つの行列が類似していることを表す関数には、下記のL2ダイバージェンス The loss function used as a measure of similarity above, that is, the smaller the value, the more similar the two matrices are, is the following L 2 divergence function.
または、ブレグマンダイバージェンス(Bregman Divergence, BD) Or Bregman Divergence (BD)
などが用いられる(例えば「InderjitS Dhillon and Suvrit Sra. Generalized nonnegative matrix approximations with bregman divergences. In Proceedings of the 18th International Conference on Neural Information Processing Systems, pp. 283-290, 2005.」(以下、参考文献1)、および上記の非特許文献1参照)。 etc. are used (see, for example, "InderjitS Dhillon and Suvrit Sra. Generalized nonnegative matrix approximations with bregman divergences. In Proceedings of the 18th International Conference on Neural Information Processing Systems, pp. 283-290, 2005." (hereinafter, Reference 1) and the above-mentioned non-patent document 1).
なお、 In addition,
は、ある凸関数(convex function)であり、 is a convex function,
は、その微分である。関数 is its derivative. The function
を変えることでBDは多様な関数を表現できる。例えばBy changing , BD can express various functions. For example,
であるときは2乗誤差に対応し、 corresponds to the squared error,
である時はロジスティック(logistic)損失に対応し When
であるときはI-divergence(一般化KL(Kullback Leibler) divergenceとも呼ばれる)に対応し、 When this is the case, it corresponds to I-divergence (also called generalized KL (Kullback-Leibler) divergence),
であるときは板倉斎藤擬距離(Itakura-Saito divergence)に対応する。利用する損失関数を定めることは、行列要素を生成する確率分布(probability distribution)に仮定をおくことと等価である。具体的には、上記の2乗誤差、I-divergence、または板倉斎藤擬距離を利用することは、それぞれ正規分布(normal distribution)、ポアソン分布(poisson distribution)、または指数分布(exponential distribution)に従って行列要素が生成されるという仮定に1対1で対応する。 When , it corresponds to the Itakura-Saito pseudo-distance. Determining the loss function to use is equivalent to making an assumption on the probability distribution that generates the matrix elements. Specifically, using the above squared error, I-divergence, or Itakura-Saito pseudo-distance corresponds one-to-one to the assumption that the matrix elements are generated according to normal distribution, poisson distribution, or exponential distribution, respectively.
因子行列の各要素が非負の値であるという制約のもとで、上記に代表される損失関数を最小化することで因子行列が推定される。この最適化には確率的勾配降下法(Stochastic Gradient Descent, SGD)、射影勾配降下法(projected gradient method)、補助関数法(majorization minimization)などの様々な手法が利用できる。例えばBDを最小化する補助関数法では、下記の因子行列の更新を繰り返すことで最適化が行われる(上記の参考文献1参照)。 The factor matrix is estimated by minimizing the loss function shown above, subject to the constraint that each element of the factor matrix must be a non-negative value. Various methods can be used for this optimization, including stochastic gradient descent (SGD), projected gradient method, and majorization minimization. For example, the majorization minimization method, which minimizes BD, performs optimization by repeatedly updating the factor matrix below (see Reference 1 above).
ただし、 however,
は要素毎の積(アダマール積)、 is the element-wise product (Hadamard product),
で行列 Matrix
の(i, r)成分を表す。 Represents the (i, r) component of.
なお、NTFを適用する場合は行列ではなくテンソルの低ランク近似を考えればよく、例えば3次のテンソル When applying NTF, we need to consider low-rank approximations of tensors rather than matrices. For example, a third-order tensor
をCP分解(Canonical Polyadic decomposition)により近似する、すなわち基底数R個の因子に分解する場合は、テンソルの要素xijkと、その因子行列 is approximated by CP decomposition (Canonical Polyadic decomposition), that is, decomposed into a basis number R of factors, the elements x ijk of the tensor and its factor matrix
および and
による近似値Approximation by
とが類似した値になるように推定すれば良い。 It is sufficient to estimate that and are similar values.
上記のNMF(NTF)では、今回分析の対象となるデータのように行列(テンソル)としての表現が不足するデータに対して適用することができない。データが行列(テンソル)表現されていないため、損失関数の値を計算することもできなければ、上記補助関数の更新式を計算することもできないためである。そこで、本実施形態では以下の新しい手法を示す。 The above NMF (NTF) cannot be applied to data that lacks a matrix (tensor) representation, such as the data that is the subject of this analysis. Because the data is not represented as a matrix (tensor), it is not possible to calculate the value of the loss function, nor is it possible to calculate the update equation for the above auxiliary function. Therefore, in this embodiment, the following new method is presented.
本実施形態での手法とは異なるが関連する問題を扱う手法として、「Masahiro Kohjima, Tatsushi Matsubayashi, and Hiroyuki Toda. Generalized interval valued nonnegative matrix factorization. In IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 3412-3416, 2019.
」(参考文献2)に記載された手法 と、「Yuto Yamaguchi and Kohei Hayashi. Tensor decomposition with missing indices. In International Joint Conference on Artificial Intelligence, pp.3217-3223, 2017.」(参考文献4)に記載された手法が存在する。参考文献2に記載された手法では、行列要素の値そのものは観測できないが、値の、ある区間の情報、例えば、xijの値は1以上3以下であるなど、という情報が利用できるときに、その情報を利用してNMFを行なう手法が提案されている。
A method for dealing with a related problem, different from the method in this embodiment, is "Masahiro Kohjima, Tatsushi Matsubayashi, and Hiroyuki Toda. Generalized interval valued nonnegative matrix factorization. In IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 3412-3416, 2019.
(Reference 2) and the method described in "Yuto Yamaguchi and Kohei Hayashi. Tensor decomposition with missing indices. In International Joint Conference on Artificial Intelligence, pp.3217-3223, 2017." (Reference 4). In the method described in
本実施形態で考える問題は、値の、ある区間の情報が与えられる問題とは異なるため、この手法を適用することはできない。上記の参考文献4では、テンソルのインデックスに欠損がある場合であってもテンソル分解を行なうことができる手法が提案される。この手法では、テンソルのインデックスと要素との組(i, j, k, xijk)のうちインデックスの一部、例えばjが欠損した場合であっても、欠損したインデックスの値を推定することでテンソル分解を適用している。 The problem considered in this embodiment is different from the problem where information on a certain interval of values is given, so this method cannot be applied. Reference 4 above proposes a method that can perform tensor decomposition even if the tensor index is missing. In this method, even if some of the indexes, for example j, of the tensor index and element pair (i, j, k, x ijk ) are missing, tensor decomposition is applied by estimating the value of the missing index.
本実施形態で考える手法は、上記の参考文献4に記載された手法とは異なり、欠損の値を推定してインデックスと行列要素との対応を取ることを必要とせずに、データを分析することができる手法である。 The method considered in this embodiment differs from the method described in Reference 4 above in that it is a method that can analyze data without the need to estimate missing values and establish correspondence between indices and matrix elements.
なお、本実施形態でパラメタ推定に用いられる目的関数の導出に当たっては、「Liyuan Xu, Gang Niu, Junya Honda, and Masashi Sugiyama. Uncoupled regression from pairwise comparison data. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 3992-4002, 2019.」(参考文献3)に記載された回帰手法での、目的関数の導出に用いられる近似と同種の近似を利用した。ただし、ここで参考文献3に記載された手法で取り組んだ問題は、入力xと出力yとの関係y=f(x)を定める関数fを推定する回帰問題であり、本実施形態で考える非負値行列分解または非負値テンソル分解とは異なる問題である。In this embodiment, the objective function used for parameter estimation is derived using the same approximation as that used to derive the objective function in the regression method described in "Liyuan Xu, Gang Niu, Junya Honda, and Masashi Sugiyama. Uncoupled regression from pairwise comparison data. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 3992-4002, 2019." (Reference 3). However, the problem addressed by the method described in Reference 3 here is a regression problem of estimating a function f that determines the relationship y=f(x) between an input x and an output y, which is a different problem from the nonnegative matrix decomposition or nonnegative tensor decomposition considered in this embodiment.
本実施形態では、行列またはテンソルの要素のインデックスと、その要素の値との対応が取れず、行列またはテンソルとしての表現が不足するデータであっても、非負値行列分解または非負値テンソル分解を行なうことのできる手法について説明する。以後、本手法をアンカップル非負値行列分解(Uncoupled Nonnegative Matrix Factorization, UNMF)およびアンカップル非負値テンソル分解(Uncoupled Nonnegative Tensor Factorization, UNTF)と称して説明する。In this embodiment, a method is described that can perform nonnegative matrix factorization or nonnegative tensor factorization even for data in which the index of a matrix or tensor element cannot be associated with the value of that element, and the data is insufficient to be expressed as a matrix or tensor. Hereinafter, this method is referred to as Uncoupled Nonnegative Matrix Factorization (UNMF) and Uncoupled Nonnegative Tensor Factorization (UNTF).
(定式化)
次に、本実施形態で説明する手法の問題設定である定式化について説明する。以下では、UNMFの定式化について記すが、UNTFの定式化も、UNMFの定式化に基づいて行列をテンソルに置き換えれば、ほぼ同様である。行列のサイズ(size)はnI×nJであるとして記述する。前述の映画の評価履歴のデータの場合、nIはユーザの数、nJは映画の数をそれぞれ表す。行列のインデックスの集合は
(Formulation)
Next, the formulation, which is the problem setting of the method described in this embodiment, will be described. Below, the formulation of UNMF will be described, but the formulation of UNTF is almost the same if matrices are replaced with tensors based on the formulation of UNMF. The size of the matrix is described as nI × nJ . In the case of the above-mentioned movie rating history data, nI represents the number of users and nJ represents the number of movies. The set of matrix indices is
と記載され、以後インデックスデータと呼ぶ。nUは、このデータ中のインデックスの数を表す。前述の映画の評価履歴のデータの場合、 Hereinafter, this will be referred to as index data. n U represents the number of indexes in this data. In the case of the movie rating history data mentioned above,
はユーザimが映画jmを評価した、または視聴したことを記録したデータの集合に対応する。 corresponds to the set of data that records that user i m has rated or watched movie j m .
さらに行列の各行の要素の分布の集合、すなわち確率分布の集合は Furthermore, the set of distributions for the elements of each row of the matrix, i.e., the set of probability distributions, is
と記載される。上記の各行の要素の分布は、行iで条件付けられ(または固定され)かつ列jに関して周辺化(marginalization)された行列要素の確率密度関数(Probability Density Function, PDF)である。The distribution of elements in each row above is the Probability Density Function (PDF) of the matrix elements conditioned (or fixed) on row i and marginalized with respect to column j.
前述の映画の評価履歴のデータの場合、fX|I=i(x)が、あるユーザiによる映画の評価値xの確率密度関数を表すものであり、事前知識から作成したもの、評価「1」とした映画がz1本存在し、評価「2」とした映画がz2本存在するという集計データから推定したもの、または行列の各行の要素の値の集合 In the case of the movie rating history data mentioned above, f X|I=i (x) represents the probability density function of movie rating value x by a certain user i. It can be created from prior knowledge, estimated from aggregate data that there are z 1 movies rated "1" and z 2 movies rated "2", or the set of values of the elements of each row of the matrix.
から推定したものなど、が利用できる。nVは、このデータ中の要素の数を表す。imは、行のインデックスを表し、xmは、第im行目のある列の、どの列かはわからない要素の値を表す。なお、後述するが、集計データまたは各行の要素の値の集合を利用する場合には、明示的には、この確率密度関数を推定することなく手法を適用することもできる。 can be used. n V represents the number of elements in the data. i m represents the row index, and x m represents the value of an element in a column in the i m- th row, although the column is unknown. As will be described later, when using aggregated data or a set of element values in each row, the method can be applied without explicitly estimating this probability density function.
上記に加えて、行列要素の値の大小関係を示したデータはIn addition to the above, the data showing the magnitude relationship of the matrix elements is
と記載され、以後は大小比較データと呼ぶ。imは行のインデックスであり、 Hereafter, we will call it the size comparison data. i m is the row index,
と、 and,
とは、共に列のインデックスであり、その要素の値 and are both column indexes and the element value
の値の方が、 value is,
の値よりも大きいことを表す。なお、要素の値It means that the value is greater than the value of the element.
そのものが観測されている訳ではない。nRは、この大小比較された行列要素の組の数を表す。このようなデータは、例えばユーザが、ある映画jを評価するときに、それとは別の映画j′よりも良かったかどうかを判断してもらい、この判断の結果を記録することで得ることが可能である。このようなデータは、1点、2点などというスコア(score)を付けることと比べてユーザが回答することが容易であり、データを収集することが容易である場合が多い。 The data itself is not observed. n R represents the number of sets of matrix elements compared. For example, when a user evaluates a movie j, they can be asked to judge whether it is better than another movie j' and record the result of this judgment, and this kind of data can be obtained. Compared to giving a score such as 1 or 2, it is easy for users to answer and it is often easy to collect the data.
また、行列の要素が、映画の評価値ではなく、店舗の訪問回数を表す行列などであるときは、訪問回数そのものを入力するよりも、ある店舗に、それとは別の店舗より多く訪問する、とだけ回答する方が、訪問回数が非常に多い行きつけの店舗があることを隠すことができ、自身の情報を減らして回答することが可能となる。 Also, when the elements of a matrix are not movie ratings but rather represent the number of visits to a store, answering simply that you visit one store more than another store, rather than entering the actual number of visits, allows you to hide the fact that you have a favorite store that you visit very frequently and allows you to answer with less information about yourself.
UNMFは、インデックスデータUNMF is index data
、確率分布の集合 , a set of probability distributions
、および大小比較データ , and size comparison data
でなる3つのデータを入力として、因子行列 The three data are input, and the factor matrix
を推定する手法である。以後この因子行列は、まとめて is a method to estimate the factor matrix.
と記載され、因子行列を用いた各要素の推定値は and the estimates for each element using the factor matrix are
と記載される。 It is written.
(損失関数)次に、上記の推定のための損失関数を導くことについて説明する。損失関数を定義するにあたり、実現値が行のインデックスに対応する確率変数(random variable)はIと記載され、列のインデックスに対応する確率変数はJと記載される。
さらに実現値が行列要素の値に対応する確率変数はXと記載される。これらの確率変数が従う確率分布はPI,J,Xと記載される。
さらにI=iで条件付られた際の条件付きの確率分布と、この確率分布の確率密度関数とは、それぞれPJ,X|I=i, fJ,X|I=iと記載される。
この条件付きの分布を、さらに上記のJまたはXに関して周辺化した分布は、それぞれPX|I=i, PJ|I=iと記載される。確率分布PX|I=iの確率密度関数はfX|I=i、累積密度関数はFX|I=iとそれぞれ記載される。定義より、
(Loss Function) Next, we will explain how to derive the loss function for the above estimation. In defining the loss function, the random variable whose realization value corresponds to the row index is written as I, and the random variable whose realization value corresponds to the column index is written as J.
Furthermore, the random variables whose realizations correspond to the values of the matrix elements are denoted as X. The probability distributions that these random variables follow are denoted as P I,J,X .
Furthermore, the conditional probability distribution when I = i and the probability density function of this probability distribution are written as P J,X|I = i and f J,X|I = i, respectively.
The distributions obtained by further marginalizing this conditional distribution with respect to J or X above are written as P X|I=i and P J|I=i , respectively. The probability density function of the probability distribution P X|I=i is written as f X|I=i , and the cumulative density function is written as F X|I=i . By definition,
である。 is.
上記の確率変数を用いてパラメタθの推定に用いる損失関数は、上記のブレグマンダイバージェンスを用いて以下の式(1)のように定義される。 The loss function used to estimate the parameter θ using the above random variables is defined as the following equation (1) using the above Bregman divergence.
ただし、式(1)のHowever, in equation (1),
は、確率分布PI,J,Xによる期待値(expected value)操作であり、 is the expected value operation based on the probability distribution P I,J,X ,
は以下の式(2)で定義される。 is defined by the following equation (2).
ただし、式(2)のHowever, in equation (2),
は、それぞれ確率分布PJ,X|I=i, PJ|I=iによる期待値操作を表す。この損失関数において困難さを生じているのは式(2)の右辺の最終項 represent the expected value operations based on the probability distributions P J,X|I=i and P J|I=i , respectively. The difficulty in this loss function is caused by the last term on the right-hand side of equation (2)
である。なぜなら、この項は列のインデックスJと要素Xとに関する同時分布によって定義されているが、本実施形態で考える問題設定では、インデックスと要素とは対応付けされず同時に観測できないため、例えば標本近似したとしても計算することができない。よって以降で、この項を近似的に評価することを考える。 This is because this term is defined by the joint distribution of column index J and element X, but in the problem setting considered in this embodiment, the index and the element are not associated and cannot be observed simultaneously, so it cannot be calculated even if, for example, a sample approximation is performed. Therefore, hereafter, we consider approximately evaluating this term.
ここでは新たに、実現値が列のインデックスに対応する確率変数の組(J+, J-)を導入する。この組は、あるiを固定した条件で、要素(i, J+)の値が、(i, J-)の値よりも大きいことを示し、以下のように定義される。 We introduce a new set of random variables (J + , J - ) whose realizations correspond to the index of the columns. This set indicates that for a fixed i, the value of element (i, J + ) is greater than the value of (i, J - ), and is defined as follows:
ただし、(J, X)と(J′, X′)とは、共に確率PJ,X|I=iに従う独立の確率変数である。この定義から、前述した大小比較データ Here, (J, X) and (J′, X′) are both independent random variables with probability P J,X|I=i . From this definition, the above-mentioned size comparison data
は、この確率変数の実現値であると見做せることを後ほど利用する。以後、あるiを固定した条件でのJ+とJ-が従う確率密度関数は、それぞれ We will later use the fact that we can consider J+ and J- to be the realization of this random variable. Hereafter, the probability density functions that J + and J- follow under the condition that i is fixed are respectively
と and
と記載され、さらにJ+とJ-の出方に関する期待値操作は The expected value operation for the appearance of J + and J - is
と記載される。この確率変数を用いると、以下の式(3)および(4)が成り立つことが示せる。Using this random variable, it can be shown that the following equations (3) and (4) hold.
ただし、FX|I=iは、行iを固定した条件での要素の値に関する累積密度関数 where F X|I=i is the cumulative density function for the element values with row i fixed.
である。 is.
式(3)の証明について説明する。J+の定義により、fJ+|I=iは、次のように展開できる。 The proof of formula (3) will be explained. According to the definition of J + , fJ +|I=i can be expanded as follows.
ただし、Zは正規化定数であり、次のように定義される。 where Z is a normalization constant defined as follows:
部分積分(intgration by parts)により、Z=1/2であると導かれる。この結果を用いれば、次のように式(3)を導くことができる。 By integration by parts, we can derive that Z = 1/2. Using this result, we can derive equation (3) as follows:
式(4)の導出も同様である。以上で証明を終わる。 The derivation of equation (4) is similar. This completes the proof.
式(3)および(4)を用いれば、確率変数Xの条件付き周辺分布が[0, 1]上の一様分布(すなわちFX|I=i(x)=x)であるとき、式(2)の右辺の最終項は Using equations (3) and (4), when the conditional marginal distribution of the random variable X is a uniform distribution on [0, 1] (i.e., F X|I=i (x)=x), the last term on the right-hand side of equation (2) is
と変形できる。この事実を考慮すれば、あるハイパーパラメタ Taking this fact into consideration, a certain hyperparameter
を用いて、以下の式(5)で示される近似形を利用することが有望と考えられる。 It seems promising to use the approximation form shown in the following equation (5).
ただし、式(5)では右辺の値が左辺の値を近似していることを表す。上記の[0, 1]上の一様分布の場合は、(wi1, wi2)=(1/2, 0)と定義すれば、この近似は精確である。これは確率変数Xの条件付き周辺分布が[a, b]上の一様分布である場合(FX|I=i(x)=(x-a)/(b-a) for all x∈[a, b])にも一般化でき、(wi1, wi2)=(b/2, a/2)と定義すれば良い。一様分布ではないより一般的な分布を考える場合には、汎化損失(generalization error) However, in equation (5), the value on the right side indicates that the value on the left side is an approximation. In the above uniform distribution on [0, 1], if we define (w i1 , w i2 )=(1/2, 0), this approximation is accurate. This can also be generalized to the case where the conditional marginal distribution of the random variable X is a uniform distribution on [a, b] (F X|I=i (x)=(xa)/(ba) for all x∈[a, b]), where we define (wi1, wi2)=(b/2, a/2). When considering a more general distribution other than a uniform distribution, the generalization loss
の上界を最小化するようにハイパーパラメタ(wi1, wi2)を決定できる。この決定については後述する。 We can determine the hyperparameters (w i1 , w i2 ) so as to minimize the upper bound of . This determination will be described later.
式(3)と(4)の和をとると、以下の式が導かれる。 By adding up equations (3) and (4), we obtain the following equation.
この式を用いると、ある定数λiを用いて、上記の式(5)を次の式(6)のように変形できる。 Using this formula, the above formula (5) can be transformed into the following formula (6) using a certain constant λ i .
λiの設定に関しては自由度があり、λi=0またはλi=(wi1+wi2)/2などと、任意に設定できる。ただし基本的にはλiの値はゼロ(zero)以上であることが望ましく、以後の説明ではλi≧0であるとする。上記の式(6)を用いれば、式(1)の汎化損失 There is a degree of freedom in setting λ i , and it can be set arbitrarily, such as λ i =0 or λ i =(w i1 +w i2 )/2. However, it is basically desirable for the value of λ i to be zero or greater, and in the following explanation, it is assumed that λ i ≧0. Using the above formula (6), the generalization loss of formula (1) can be calculated as
の近似Approximation of
は、下記のように得られる。 is obtained as follows:
ただし, however,
である。上記のCiはパラメタθに依存しない定数である。よって確率変数I, J, J+およびJ-に関する期待値を標本平均(sample average)で置き換えることで、以下の式(7)の通り経験損失(empilical risk) The above C i is a constant that does not depend on the parameter θ. Therefore, by replacing the expected values for the random variables I, J, J + , and J - with the sample average, the empirical risk is expressed as the following equation (7).
が得られる。 is obtained.
ただし、Cはパラメタθに依存しない定数である。この量は、定数Cを除き、データから計算できる量であるため、パラメタθの推定のための目的関数として利用できる。次節では、経験損失 where C is a constant that does not depend on the parameter θ. Since these quantities, except for the constant C, can be calculated from data, they can be used as the objective function for estimating the parameter θ. In the next section, we will discuss the empirical loss
を最小化するパラメタ推定の方法、すなわち推定アルゴリズム(algorithm)について述べる。 We describe a parameter estimation method, i.e., an estimation algorithm, that minimizes .
(推定アルゴリズム)
パラメタθの推定には、確率的射影勾配降下法、乗法更新法、射影擬ニュートン法、交互最小二乗法(Alternating Least Squares method, ALS)、補助関数法などの任意の最適化手法が利用できる。経験損失
(Estimation Algorithm)
To estimate the parameter θ, any optimization method can be used, such as stochastic projected gradient descent, multiplicative update, projected quasi-Newton method, alternating least squares method (ALS), auxiliary function method, etc.
の偏微分(partial derivative)は、以下のようにデータから計算可能である。 The partial derivative of can be calculated from the data as follows:
ただし、 however,
は、インデックスデータ is index data
から、im=iであるデータの全てを抽出したものであり、 All data for which i m =i is extracted from
は、インデックスデータ is index data
から、jm=jであるデータの全てを抽出したものであり、 All data for which j m =j is extracted from
は、大小比較データ is size comparison data
から、im=iであるデータの全てを抽出したものであり、 All data for which i m =i is extracted from
は、大小比較データ is size comparison data
から、 from,
であるデータの全てを抽出したものであり、 This is an extract of all the data,
は、大小比較データ is size comparison data
から、 from,
であるデータの全てを抽出したものである。これらの値を用いれば、例えば次のように推定のための更新式を導ける。 This is the extraction of all the data that is Using these values, we can derive an update equation for estimation, for example, as follows:
上記の射影勾配降下法について説明する。この射影勾配降下法では、最急降下方向にパラメタを更新することと、非負制約を満たすための射影操作とを組み合わせた下記の形式でパラメタ更新を行なう。更新式は具体的には以下の式(8)および(9)のように書き下せる。 We will now explain the above projected gradient descent method. In this projected gradient descent method, parameter updates are performed in the following format, which combines updating the parameters in the steepest descent direction with a projection operation to satisfy the non-negativity constraint. Specifically, the update formulas can be written as the following formulas (8) and (9).
ただし、ηir, γrjは学習率であり、[・]+は非負制約を満たすための例えば任意の射影操作を表す。射影の例としては、ある十分小さな正の整数εを用いて、[y]+=max(ε, y)とするものなどがある。式(8)および(9)に従いパラメタθを更新することを繰り返すことでパラメタθの推定が可能となる。 where ηir, γrj are learning rates, and [·] + represents, for example, any projection operation to satisfy the non-negativity constraint. An example of projection is [y] + =max(ε, y) using a sufficiently small positive integer ε. The parameter θ can be estimated by repeatedly updating the parameter θ according to equations (8) and (9).
上記の乗法更新法について説明する。この乗法更新法では、上記の射影勾配降下法における学習率を、偏微分、ここでは最急降下方向の正の成分が分母になるように設定し、負の成分が分子になるように設定することで更新式を導く。これに従うと以下の更新式である式(10)および(11)が導ける。 The above multiplicative update method will now be explained. In this multiplicative update method, the update formula is derived by setting the learning rate in the above projected gradient descent method so that the partial differential, in this case the positive component in the steepest descent direction, is the denominator, and the negative component is the numerator. Following this, the following update formulas (10) and (11) can be derived.
乗法更新法を適用するとき、上記のように、更新式の右辺の値は全て正の値であるから、初期値を非負の値に設定することで、非負制約は自然に満たされる。上記の式(10)および(11)に従いパラメタθを更新することを繰り返すことで、関数When applying the multiplicative update method, as shown above, all values on the right side of the update equation are positive, so by setting the initial value to a non-negative value, the non-negativity constraint is naturally satisfied. By repeatedly updating the parameter θ according to the above equations (10) and (11), the function
が、ある条件を満たすという仮定のもとで、目的関数の局所最適解に到達することができる。 However, under the assumption that certain conditions are satisfied, a local optimum for the objective function can be reached.
前述した様にBDは利用する凸関数As mentioned above, BD is a convex function that
を変えることで多様な損失関数を表現できるから、上記の更新式から様々な推定式を導くことができる。例えば、By changing , we can express various loss functions, so we can derive various estimation formulas from the above update formula. For example,
、すなわち2乗誤差に相当する関数を利用した場合、 , that is, if we use a function equivalent to squared error,
は定数であるから、乗法更新法を利用する場合の因子行列 is a constant, so the factor matrix when using the multiplicative update method is
に関する更新式は以下のように導かれる。The update equation for is derived as follows:
同様に、上記のロジスティック損失、I-divergence、または板倉斎藤擬距離などの、BDで表現できる任意の損失関数を用いる場合の更新式を導くこともできる。 Similarly, we can derive the update formula when using any loss function that can be expressed in BD, such as the logistic loss, I-divergence, or Itakura-Saito pseudodistance mentioned above.
(ハイパーパラメタの推定)
最後にハイパーパラメタ{wi1, wi2}の推定について述べる。このハイパーパラメタは、下記の式(12)のように関数Erriを最小化することで決定できる。
(Hyperparameter estimation)
Finally, we will describe the estimation of the hyper-parameters {w i1 , w i2 }. These hyper-parameters can be determined by minimizing the function Erri as shown in the following equation (12).
この関数は、関数This function is the function
の of
による近似の誤差の上界になっている。正確に述べると、任意の因子行列 is an upper bound on the error of the approximation by
と、成分(i, j)とに関して and for component (i, j)
であるという条件のもとで、 under the condition that
が成り立つ。よって、上記の関数Erriを最小化することで近似の誤差を小さくすることができる。関数Erriは積分計算を含むが、仮定により、分布fX|I=i(x)は既知であるため、離散近似(discrete approximation)として計算できる。具体的には、例えばxの取り得る値全体を離散的に Therefore, the approximation error can be reduced by minimizing the above function Erri . The function Erri includes integral calculations, but since the distribution f X|I=i (x) is known by assumption, it can be calculated as a discrete approximation. Specifically, for example, all possible values of x can be calculated discretely.
と分割して、例えば、xの0.01分位点を and divide it into, for example, the 0.01 quantile of x
とし、0.99分位点を and the 0.99th quantile is
として、 As
と設定することで近似し、下記の式(13)の右辺の最小化を考えれば、任意の最適化手法で推定できる。 This can be approximated by setting and minimizing the right-hand side of equation (13) below, and can be estimated using any optimization method.
この式(13)は絶対値の和で定義されているため、劣勾配法などの、目的関数中に微分不可能な点が存在しても扱える手法、または線形計画法(linear programming)などを利用することができる。
劣勾配法を利用する場合、関数
Since this equation (13) is defined as the sum of absolute values, it is possible to use a method that can handle even if there are non-differentiable points in the objective function, such as the subgradient method, or linear programming.
When using the subgradient method, the function
のwi=(wi1, wi2)における劣勾配の集合 The set of subgradients at w i =(w i1 , w i2 ) of
に属する任意のベクトル(vector)gを用いて、以下の式(14)であるUsing any vector g belonging to , the following equation (14) is
に従ってパラメタθを更新することを繰り返せば良い。ただし、γ′は学習率である。 Then we repeatedly update the parameter θ according to the following, where γ′ is the learning rate.
なお、上記では確率分布fX|I=i(x)が既知である場合のハイパーパラメタの推定方法について示したが、行列の各行の要素の値の集合 In the above, we have shown how to estimate hyperparameters when the probability distribution f X|I=i (x) is known.
を用いてハイパーパラメタを推定することも可能である。具体的には、 It is also possible to estimate hyperparameters using
からim=iである値を抜き出したものは The value where i m =i is extracted from
と記載されるとすると、関数Erriの以下の式(15)のような近似を考えれば良い。 Then, the function Erri can be approximated as in the following equation (15):
ただし、 however,
は累積密度関数FX|I=iの経験近似 is the empirical approximation of the cumulative density function F X|I=i
である。 is.
は teeth
のデータ数を表す。集計データを用いる場合も同様に関数Erriの近似が可能である。上記の式(15)の最適化には、上記の式(13)の最適化と同様に任意の最適化法が利用でき、劣勾配法などが利用できる。 represents the number of data points. When aggregated data is used, the function Erri can be similarly approximated. For optimizing the above formula (15), any optimization method can be used, as in the case of optimizing the above formula (13), and the subgradient method can be used.
本実施形態によって、行列またはテンソルの要素のインデックスと、その要素の値との対応が取れず、行列またはテンソルとしての表現が不足するデータであっても、非負値行列分解または非負値テンソル分解を行なうことができるようになる。これにより、行列またはテンソルとしての表現が不足するデータから潜在的なパターンを抽出したり、行列要素の値を推定したりすることが可能となる。 This embodiment makes it possible to perform nonnegative matrix decomposition or nonnegative tensor decomposition even for data in which the index of a matrix or tensor element does not correspond to the value of that element and the representation as a matrix or tensor is insufficient. This makes it possible to extract latent patterns from data in which the representation as a matrix or tensor is insufficient and to estimate the values of matrix elements.
(動作の説明)
以下、本実施形態に係るデータ解析装置1の各部の動作について説明する。
図1は、本発明の一実施形態に係るデータ解析装置の適用例を示す図である。
図1に示されるように、本発明の一実施形態に係るデータ解析装置1は、入力データ処理部10、ハイパーパラメタ推定部20、パラメタ推定部30、パラメタ処理部40、記録部50、および入出力部60を備える。入出力部60は、外部装置2との間でデータの入出力が可能である。
記録部50は、入力データ記録部51、ハイパーパラメタ記録部52、およびパラメタ記録部53を有する。
(Explanation of operation)
The operation of each unit of the data analysis device 1 according to this embodiment will be described below.
FIG. 1 is a diagram showing an application example of a data analysis device according to an embodiment of the present invention.
1, a data analysis device 1 according to an embodiment of the present invention includes an input
The
次に、データ解析装置1の動作の概要を説明する。図2は、本発明の一実施の形態に係るデータ解析装置の動作の概要の一例を示すフローチャートである。
まず、データ解析装置1の入力データ処理部10は、インデックスデータ
Next, an overview of the operation of the data analysis device 1 will be described below. Fig. 2 is a flowchart showing an example of the overview of the operation of the data analysis device according to an embodiment of the present invention.
First, the input
、確率分布の集合 , a set of probability distributions
、大小比較データ , size comparison data
を外部装置2から入出力部60を介して入力する(ステップ(step)S1)。
is input from the
次に、ハイパーパラメタ推定部20は、ハイパーパラメタNext, the hyper-
を推定する(ステップS2)。 Estimate (step S2).
次に、パラメタ推定部30は、パラメタθを推定する(ステップS3)。
次に、パラメタ処理部40は、推定されたパラメタθを入出力部60を介して外部装置2に出力する(ステップS4)。
Next, the
Next, the
以下に、上記のS1~S4の具体的な動作を説明する。
まず、S1の具体例を説明する。入力データ処理部10はインデックスデータ
The specific operations of S1 to S4 above will be described below.
First, a specific example of S1 will be described. The input
、確率分布の集合 , a set of probability distributions
、および大小比較データ , and size comparison data
を入力して、記録部50の入力データ記録部51に格納する。
and store it in the input
次に、S2の具体例を説明する。ハイパーパラメタ推定部20は、入力データ記録部51に格納された確率分布の集合Next, a specific example of S2 will be described. The
を入力し、以下に示す方法(a)~(d)によって上記の式(13)の目的関数を最小化することで、ハイパーパラメタwを推定する。ハイパーパラメタ推定部20は、推定したハイパーパラメタwを記録部50のハイパーパラメタ記録部52に格納する。図3は、ハイパーパラメタ推定部による動作の一例を示すフローチャートである。図3では、劣勾配法を用いる場合のハイパーパラメタwiを更新する例が示される。この更新をi=1,…,nI毎に行なうことで推定対象のハイパーパラメタwが得られる。
and estimates the hyper-parameter w by minimizing the objective function of the above formula (13) using the following methods (a) to (d). The hyper-
(a) ハイパーパラメタ推定部20は、パラメタwiを初期化する(ステップS21)。ステップS2に係る処理の終了条件に用いる変数として、ハイパーパラメタ推定部20は、ハイパーパラメタwiの更新量の最大変化幅を示す変数δを同様に初期化し、上記終了条件の閾値εおよび計算の最大繰り返し回数、ここでは変数δの更新に係る計算の繰り返し回数の最大値をそれぞれ設定する(ステップS22)。
(a) The hyper-
(b) ハイパーパラメタ推定部20は、パラメタwを上記の式(14)に従い更新する。このとき、ハイパーパラメタ推定部20は、更新前のハイパーパラメタwiと更新後のハイパーパラメタwiの差の絶対値の最大値
(b) The hyper-
を変数δに記録する(ステップS23)。ただし、ここでは、更新前のハイパーパラメタwiの要素は is recorded in the variable δ (step S23). Here, the elements of the hyper-parameter w i before the update are
と記述され、更新後のハイパーパラメタwiの要素は The elements of the updated hyperparameter w i are
と記述される。 It is described as follows.
(c) ステップS23に応じて、ハイパーパラメタ推定部20は、計算の繰り返し回数のカウント値(count value)を更新する(ステップS24)。
(d) 計算繰り返し回数のカウント値が、上記あらかじめ定めた繰り返し回数の最大値を超える、または更新量の最大変化幅を示す変数δが、上記あらかじめ定めた閾値εより小さいときは(ステップS25のYes)、ハイパーパラメタ推定部20は、ステップS2に係る処理を終了する。そうでなければ(ステップS25のNo)、ハイパーパラメタ推定部20は、変数δをδ←0としてステップS22に戻る。
(c) In response to step S23, the hyper-
(d) When the count value of the number of calculation iterations exceeds the predetermined maximum number of iterations or the variable δ indicating the maximum change width of the update amount is smaller than the predetermined threshold ε (Yes in step S25), the hyper-
次に、S3の具体例を説明する。パラメタ推定部30は、入力データ記録部51に格納されたインデックスデータNext, a specific example of S3 will be described. The
、大小比較データ , size comparison data
、およびハイパーパラメタ記録部52に格納されたハイパーパラメタwを入力し、以下に示す方法(a)~(e)によって上記の式(7)の目的関数を最小化することで、パラメタθを推定する。パラメタ推定部30は、推定したパラメタθを記録部50のパラメタ記録部53に格納する。図4は、パラメタ推定部による動作の一例を示すフローチャートである。図4では、乗法更新法を用いる場合のパラメタθを更新する例が示される。
and the hyper-parameter w stored in the hyper-
(a) パラメタ推定部30は、パラメタθを初期化する(ステップS31)。ステップS3に係る処理の終了条件に用いる変数として、パラメタ推定部30は、パラメタθの更新量の最大変化幅を示す変数δを同様に初期化し、上記終了条件の閾値εおよび計算の、最大繰り返し回数、ここでは変数δの更新に係る計算の繰り返し回数の最大値をそれぞれを設定する(ステップS32)。(a) The
(b) パラメタ推定部30は、因子行列(b) The
を上記の式(10)に従い更新する。このとき、パラメタ推定部30は、更新前後の因子行列
is updated according to the above formula (10). At this time, the
の差の絶対値の最大値Maximum absolute value of the difference
が現在の変数δより大きければ、パラメタ推定部30は、この変数δをIf
is greater than the current variable δ, the
と更新する(ステップS33)。ただし、更新前の因子行列 (step S33). However, the factor matrix before the update
の要素はThe elements of
と記述され、更新後の上記要素は and the above elements after the update are
と記述される。 It is described as follows.
(c) パラメタ推定部30は、因子行列(c) The
を上記の式(11)に従い更新する。この時、パラメタ推定部30は、更新前後の因子行列
is updated according to the above formula (11). At this time, the
の差の絶対値の最大値Maximum absolute value of the difference
が現在の変数δより大きければ、この変数δをIf is greater than the current variable δ, set this variable δ to
と更新する(ステップS34)。ただし、更新前の因子行列 (step S34). However, the factor matrix before the update
の要素はThe elements of
と記述され、更新後の上記要素は and the above elements after the update are
と記述される。 It is described as follows.
(d) ステップS34に応じて、パラメタ推定部30は、計算の繰り返し回数のカウント値を更新する(ステップS35)。(d) In response to step S34, the
(e) 計算繰り返し回数のカウント値が、上記あらかじめ定めた繰り返し回数の最大値を超える、または更新量の最大変化幅を示す変数δが、上記あらかじめ定めた閾値εより小さいときは(ステップS36のYes)、パラメタ推定部30は、ステップS3に係る処理を終了し、そうでなければ(ステップS36のNo)、パラメタ推定部30は、変数δをδ←0としてステップS32に戻る。(e) If the count value of the number of calculation iterations exceeds the maximum number of iterations determined above, or if the variable δ indicating the maximum change in the update amount is smaller than the predetermined threshold value ε (Yes in step S36), the
次に、S4の具体例を説明する。パラメタ処理部40は、パラメタ記録部53に格納されたパラメタθを入出力部60を介して外部装置3に出力する。
上記の実施形態では、上記式(7)の目的関数を最小化するパラメタθを推定するために上記の乗法更新法に基づくアルゴリズムを用いているが、他のいかなる方法、例えば上記の射影勾配降下法を用いても良い。また、上記の実施形態では、ハイパーパラメタの推定に確率分布の集合
Next, a specific example of S4 will be described. The
In the above embodiment, the algorithm based on the multiplicative update method is used to estimate the parameter θ that minimizes the objective function of the above equation (7), but any other method, such as the above projected gradient descent method, may be used. Also, in the above embodiment, a set of probability distributions is used to estimate the hyperparameters.
を利用しているが、これの代わりに行列の各行の要素の値の集合 is used, but instead, a set of element values for each row of the matrix
または集計データを利用しても良い。この場合には上記の式(13)ではなく、上記の式(15)の最小化(最適化)によりハイパーパラメタを推定すれば良い。Kぉの最適化には任意の方法が利用できる。また、上記では行列としての表現が不足するデータに対して非負値行列分解を行うUNMFを適用した例を示しているが、同様の枠組みで、テンソルとしての表現が不足するデータを非負値テンソル分解するUNTFを適用することも可能である。 Alternatively, aggregated data may be used. In this case, the hyperparameters can be estimated by minimizing (optimizing) the above formula (15) instead of the above formula (13). Any method can be used to optimize K. In addition, the above shows an example of applying UNMF, which performs nonnegative matrix decomposition on data that lacks a matrix representation, but in a similar framework, it is also possible to apply UNTF, which performs nonnegative tensor decomposition on data that lacks a tensor representation.
図5は、本発明の一実施形態に係るデータ解析装置のハードウエア構成の一例を示すブロック図である。
図5に示された例では、上記の実施形態に係るデータ解析装置1は、例えばサーバコンピュータ(server computer)またはパーソナルコンピュータ(personal computer)により構成され、CPU(Central Processing Unit)等のハードウエアプロセッサ(hardware processor)111Aを有する。そして、このハードウエアプロセッサ111Aに対し、プログラムメモリ(program memory)111B、データメモリ(data memory)112、入出力インタフェース(interface)113及び通信インタフェース114が、バス(bus)115を介して接続される。
FIG. 5 is a block diagram showing an example of a hardware configuration of a data analysis device according to an embodiment of the present invention.
5, the data analysis device 1 according to the embodiment is configured, for example, by a server computer or a personal computer, and has a
通信インタフェース114は、例えば1つ以上の無線の通信インタフェースユニットを含んでおり、通信ネットワーク(network)NWとの間で情報の送受信を可能にする。無線インタフェースとしては、例えば無線LAN(Local Area Network)などの小電力無線データ通信規格が採用されたインタフェースが使用される。The
入出力インタフェース113には、データ解析装置1に付設される、利用者などにより用いられる入力デバイス(device)200および出力デバイス300が接続される。入力デバイス200および出力デバイス300は、図1に示される外部装置2に対応する。
入出力インタフェース113は、キーボード、タッチパネル(touch panel)、タッチパッド(touchpad)、マウス(mouse)等の入力デバイス200を通じて利用者などにより入力された操作データを取り込むとともに、出力データを液晶または有機EL(Electro Luminescence)等が用いられた表示デバイスを含む出力デバイス300へ出力して表示させる処理を行なう。なお、入力デバイス200および出力デバイス300には、データ解析装置1に内蔵されたデバイスが使用されてもよく、また、ネットワークNWを介してデータ解析装置1と通信可能である他の情報端末の入力デバイスおよび出力デバイスが使用されてもよい。
An
The input/
プログラムメモリ111Bは、非一時的な有形の記憶媒体として、例えば、HDD(Hard Disk Drive)またはSSD(Solid State Drive)等の随時書込みおよび読出しが可能な不揮発性メモリ(non-volatile memory)と、ROM(Read Only Memory)等の不揮発性メモリとが組み合わせて使用されたもので、一実施形態に係る各種制御処理等を実行する為に必要なプログラムが格納されている。
The
データメモリ112は、有形の記憶媒体として、例えば、上記の不揮発性メモリと、RAM(Random Access Memory)等の揮発性メモリ(volatile memory)とが組み合わせて使用されたもので、各種処理が行なわれる過程で取得および作成された各種データが記憶される為に用いられる。
本発明の一実施形態に係るデータ解析装置1は、ソフトウエア(software)による処理機能部として、図1に示される入力データ処理部10、ハイパーパラメタ推定部20、パラメタ推定部30、パラメタ処理部40、および入出力部60を有するデータ処理装置として構成され得る。A data analysis device 1 according to one embodiment of the present invention can be configured as a data processing device having an input
データ解析装置1の各部によるワークメモリ(working memory)などとして用いられる各情報記憶部および記録部50は、図5に示されたデータメモリ112が用いられることで構成され得る。ただし、これらの構成される記憶領域はデータ解析装置1内に必須の構成ではなく、例えば、USB(Universal Serial Bus)メモリなどの外付け記憶媒体、又はクラウド(cloud)に配置されたデータベースサーバ(database server)等の記憶装置に設けられた領域であってもよい。Each information storage unit and
上記の入力データ処理部10、ハイパーパラメタ推定部20、パラメタ推定部30、パラメタ処理部40、および入出力部60の各部における処理機能部は、いずれも、プログラムメモリ111Bに格納されたプログラムを上記ハードウエアプロセッサ111Aにより読み出させて実行させることにより実現され得る。なお、これらの処理機能部の一部または全部は、特定用途向け集積回路(ASIC(Application Specific Integrated Circuit))またはFPGA(Field-Programmable Gate Array)などの集積回路を含む、他の多様な形式によって実現されてもよい。The processing function units in the input
また、各実施形態に記載された手法は、計算機(コンピュータ)に実行させることができるプログラム(ソフトウエア手段)として、例えば磁気ディスク(フロッピー(登録商標)ディスク(Floppy disk)、ハードディスク(hard disk)等)、光ディスク(optical disc)(CD-ROM、DVD、MO等)、半導体メモリ(ROM、RAM、フラッシュメモリ(Flash memory)等)等の記録媒体に格納し、また通信媒体により伝送して頒布され得る。なお、媒体側に格納されるプログラムには、計算機に実行させるソフトウエア手段(実行プログラムのみならずテーブル(table)、データ構造も含む)を計算機内に構成させる設定プログラムをも含む。本装置を実現する計算機は、記録媒体に記録されたプログラムを読み込み、また場合により設定プログラムによりソフトウエア手段を構築し、このソフトウエア手段によって動作が制御されることにより上述した処理を実行する。なお、本明細書でいう記録媒体は、頒布用に限らず、計算機内部あるいはネットワークを介して接続される機器に設けられた磁気ディスク、半導体メモリ等の記憶媒体を含むものである。 The methods described in each embodiment can be stored as a program (software means) that can be executed by a computer on a recording medium such as a magnetic disk (floppy disk, hard disk, etc.), optical disk (CD-ROM, DVD, MO, etc.), semiconductor memory (ROM, RAM, flash memory, etc.), and can be distributed by transmission via a communication medium. The programs stored on the medium also include a setting program that configures the software means (including not only execution programs but also tables and data structures) that the computer executes. The computer that realizes this device reads the program recorded on the recording medium, and in some cases, constructs the software means using the setting program, and executes the above-mentioned processing by controlling the operation of the software means. The recording medium referred to in this specification is not limited to a recording medium for distribution, but also includes a storage medium such as a magnetic disk or semiconductor memory provided inside the computer or in a device connected via a network.
なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は適宜組み合わせて実施してもよく、その場合組み合わせた効果が得られる。更に、上記実施形態には種々の発明が含まれており、開示される複数の構成要件から選択された組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、課題が解決でき、効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。 Note that the present invention is not limited to the above-described embodiments, and can be modified in various ways in the implementation stage without departing from the gist of the invention. The embodiments may also be implemented in appropriate combination, in which case the combined effects can be obtained. Furthermore, the above-described embodiments include various inventions, and various inventions can be extracted by combinations selected from the multiple constituent elements disclosed. For example, if the problem can be solved and an effect can be obtained even if some constituent elements are deleted from all the constituent elements shown in the embodiments, the configuration from which these constituent elements are deleted can be extracted as an invention.
1…データ解析装置
2…外部装置
10…入力データ処理部
20…ハイパーパラメタ推定部
30…パラメタ推定部
40…パラメタ処理部
50…記録部
51…入力データ記録部
52…ハイパーパラメタ記録部
53…パラメタ記録部
60…入出力部
REFERENCE SIGNS LIST 1
Claims (8)
前記解析対象データの因子の推定に用いられる損失関数と前記損失関数の近似との誤差の上界を最小化するパラメタを、前記入力部により入力した前記要素の集合に基づいて推定する第1の推定部と、
前記入力部により入力した前記インデックスデータ、前記大小比較データ、および前記第1の推定部により推定されたパラメタに基づいて、非負制約を満たす条件での前記解析対象データの因子を推定する第2の推定部と、
を備えるデータ解析装置。 an input unit that receives input of index data, which is a set of indexes of analysis target data, a set of elements of the analysis target data, and size comparison data indicating the size relationship of the elements of the analysis target data;
a first estimation unit that estimates a parameter that minimizes an upper bound of an error between a loss function used to estimate a factor of the analysis target data and an approximation of the loss function, based on the set of elements input by the input unit;
a second estimation unit that estimates a factor of the analysis target data under a condition that satisfies a non-negative constraint, based on the index data input by the input unit, the magnitude comparison data, and the parameter estimated by the first estimation unit;
A data analysis device comprising:
行列またはテンソルのインデックスの集合であり、
前記解析対象データの要素は、
前記行列またはテンソルの各行の要素であり、
前記大小比較データは、
前記行列またはテンソルの要素の大小関係が示されるデータである、
請求項1に記載のデータ解析装置。 The index data is
is a set of matrix or tensor indices,
The elements of the analysis target data are:
are the elements of each row of said matrix or tensor,
The magnitude comparison data is
The data indicates the magnitude relationship of the elements of the matrix or tensor.
The data analysis device according to claim 1 .
前記解析対象データの因子に関する正則化項と、前記入力部により入力したインデックスデータに基づく値と、前記入力部により入力した大小比較データおよび前記推定されたパラメタに基づく値とに基づく関数を、非負制約を満たす条件で最適化することにより、前記解析対象データの因子を推定する、
請求項1に記載のデータ解析装置。 The second estimation unit is
optimizing a function based on a regularization term related to a factor of the data to be analyzed, a value based on the index data input by the input unit, and a value based on the magnitude comparison data input by the input unit and the estimated parameter under a condition that satisfies a non-negative constraint, thereby estimating the factor of the data to be analyzed;
The data analysis device according to claim 1 .
前記解析対象データの要素の確率密度関数に基づく関数を最小化する前記パラメタを推定する、
請求項1に記載のデータ解析装置。 The first estimation unit
estimating the parameters that minimize a function based on a probability density function of elements of the analysis target data;
The data analysis device according to claim 1 .
解析対象データのインデックスの集合であるインデックスデータ、前記解析対象データの要素の集合、および前記解析対象データの要素の大小関係が示される大小比較データの入力を受け付けることと、
前記解析対象データの因子の推定に用いられる損失関数と前記損失関数の近似との誤差の上界を最小化するパラメタを、前記入力した前記要素の集合に基づいて推定することと、
前記入力した前記インデックスデータ、前記大小比較データ、および前記推定されたパラメタに基づいて、非負制約を満たす条件での前記解析対象データの因子を推定することと、
を備えるデータ解析方法。 A method performed by a data analysis device, comprising:
receiving input of index data which is a set of indexes of analysis target data, a set of elements of the analysis target data, and size comparison data which indicates the size relationship of the elements of the analysis target data;
estimating a parameter that minimizes an upper bound of an error between a loss function used to estimate a factor of the analysis target data and an approximation of the loss function based on the input set of elements;
estimating a factor of the analysis target data under a condition that satisfies a non-negative constraint based on the input index data, the magnitude comparison data, and the estimated parameters;
A data analysis method comprising:
行列またはテンソルのインデックスの集合であり、
前記解析対象データの要素は、
前記行列またはテンソルの各行の要素であり、
前記大小比較データは、
前記行列またはテンソルの要素の大小関係が示されるデータである、
請求項5に記載のデータ解析方法。 The index data is
is a set of matrix or tensor indices,
The elements of the analysis target data are:
are the elements of each row of said matrix or tensor,
The magnitude comparison data is
The data indicates the magnitude relationship of the elements of the matrix or tensor.
The data analysis method according to claim 5 .
前記解析対象データの因子に関する正則化項と、前記入力したインデックスデータに基づく値と、前記入力した大小比較データおよび前記推定されたパラメタに基づく値とに基づく関数を、非負制約を満たす条件で最適化することにより、前記解析対象データの因子を推定することを含む、
請求項5に記載のデータ解析方法。 Estimating the factors includes:
and optimizing a function based on a regularization term related to a factor of the data to be analyzed, a value based on the input index data, and a value based on the input magnitude comparison data and the estimated parameter under a condition that satisfies a non-negative constraint, thereby estimating the factor of the data to be analyzed.
The data analysis method according to claim 5 .
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2021/039526 WO2023073814A1 (en) | 2021-10-26 | 2021-10-26 | Data analysis device, method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPWO2023073814A1 JPWO2023073814A1 (en) | 2023-05-04 |
| JP7635855B2 true JP7635855B2 (en) | 2025-02-26 |
Family
ID=86159251
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2023555936A Active JP7635855B2 (en) | 2021-10-26 | 2021-10-26 | Data analysis device, method and program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP7635855B2 (en) |
| WO (1) | WO2023073814A1 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020009314A (en) | 2018-07-11 | 2020-01-16 | 日本電信電話株式会社 | Data analysis device, method, and program |
-
2021
- 2021-10-26 WO PCT/JP2021/039526 patent/WO2023073814A1/en not_active Ceased
- 2021-10-26 JP JP2023555936A patent/JP7635855B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020009314A (en) | 2018-07-11 | 2020-01-16 | 日本電信電話株式会社 | Data analysis device, method, and program |
Non-Patent Citations (1)
| Title |
|---|
| XU, Liyuan et al.,"Uncoupled Regression from Pairwise Comparison Data",arXiv.org [online],arXiv:1905.13659v2,米国,Cornell University,2019年,pp.1-24,[検索日 2022.01.06], インターネット:<URL: https://arxiv.org/pdf/1905.13659v2> |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2023073814A1 (en) | 2023-05-04 |
| JPWO2023073814A1 (en) | 2023-05-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8255346B2 (en) | Methods and systems for variable group selection and temporal causal modeling | |
| Ando | Bayesian predictive information criterion for the evaluation of hierarchical Bayesian and empirical Bayes models | |
| Wang et al. | Isotonic hawkes processes | |
| Cao et al. | Multi-view machines | |
| Gamado et al. | Modelling under-reporting in epidemics | |
| Contreras-Reyes | Mutual information matrix based on Rényi entropy and application | |
| JP7101084B2 (en) | Information processing equipment, information processing system and information processing method | |
| US20250068658A1 (en) | Synthetic generation of data with many to many relationships | |
| CN113380407A (en) | Method for constructing intelligent prediction of cognitive impairment | |
| Viet Cuong et al. | Adapting physics-informed neural networks to improve ODE optimization in mosquito population dynamics | |
| Wang et al. | An adaptive two-stage dual metamodeling approach for stochastic simulation experiments | |
| Machado et al. | Flexible multistate models for interval‐censored data: Specification, estimation, and an application to ageing research | |
| Welchowski et al. | A framework for parameter estimation and model selection in kernel deep stacking networks | |
| Drovandi et al. | Alive SMC2: Bayesian model selection for low‐count time series models with intractable likelihoods | |
| Jaimungal et al. | Kullback–Leibler Barycenter of Stochastic Processes | |
| Lu et al. | Efficient estimation of the partly linear additive hazards model with current status data | |
| Liseo et al. | Bayesian estimation of population size via linkage of multivariate normal data sets | |
| JP7635855B2 (en) | Data analysis device, method and program | |
| JP7635854B2 (en) | Data analysis device, method and program | |
| Fujimaki et al. | Online heterogeneous mixture modeling with marginal and copula selection | |
| Aghababaei Jazi et al. | Variable selection in semiparametric regression models for longitudinal data with informative observation times | |
| JP7118882B2 (en) | Variable transformation device, latent parameter learning device, latent parameter generation device, methods and programs thereof | |
| Xu et al. | Objective Bayesian analysis for a capture–recapture model | |
| Zhang et al. | Partially linear additive models with unknown link functions | |
| Subramanian | Combining scientific computing and machine learning techniques to model longitudinal outcomes in clinical trials. |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240301 |
|
| 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: 20250114 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250127 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7635855 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |