JP2019008640A - Similarity calculating device and similarity calculating method - Google Patents

Similarity calculating device and similarity calculating method Download PDF

Info

Publication number
JP2019008640A
JP2019008640A JP2017125252A JP2017125252A JP2019008640A JP 2019008640 A JP2019008640 A JP 2019008640A JP 2017125252 A JP2017125252 A JP 2017125252A JP 2017125252 A JP2017125252 A JP 2017125252A JP 2019008640 A JP2019008640 A JP 2019008640A
Authority
JP
Japan
Prior art keywords
attribute
cases
similarity
similarity calculation
case
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.)
Granted
Application number
JP2017125252A
Other languages
Japanese (ja)
Other versions
JP6538762B2 (en
Inventor
森 俊樹
Toshiki Mori
俊樹 森
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2017125252A priority Critical patent/JP6538762B2/en
Publication of JP2019008640A publication Critical patent/JP2019008640A/en
Application granted granted Critical
Publication of JP6538762B2 publication Critical patent/JP6538762B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

To provide a similarity calculating device capable of calculating an inter-case similarity and an inter-attribute similarity according a uniform standard and efficiently, based on a plurality of cases and data showing that each of the plurality of cases has a plurality of attribute values.SOLUTION: The similarity calculating device according to an embodiment includes a classifier generation unit. For each attribute, the classifier generation unit generates, from input data composed of a set of a plurality of cases, a plurality of attributes respectively associated with the plurality of cases, and a class including positive cases and negative cases, a classifier that outputs a classification score from the category data based on a ratio of the positive cases included in the class and a ratio of positive cases of predetermined category data included in a predetermined attribute.SELECTED DRAWING: Figure 3

Description

実施の形態は、類似度計算装置及び類似度計算方法に関する。   Embodiments relate to a similarity calculation device and a similarity calculation method.

従来、複数の事例、及び、複数の事例のそれぞれが複数の属性の値を持つデータから、事例間類似度、及び、属性間類似度を計算する類似度計算装置が提案されている。類似度計算装置では、全ての属性が数値データであり、かつ、各属性の分布の極端な偏りがない場合、古典的統計学による処理が可能であり、それぞれ行ベクトル間の相関係数、及び、列ベクトル間の相関係数を求めることで、事例間の類似度、及び、属性間の類似度を算出することができる。   Conventionally, a plurality of cases and a similarity calculation device for calculating the similarity between cases and the similarity between attributes from data in which each of the plurality of cases has a plurality of attribute values have been proposed. In the similarity calculation device, when all the attributes are numerical data and there is no extreme bias in the distribution of each attribute, processing by classical statistics is possible, and the correlation coefficient between the row vectors, and By calculating the correlation coefficient between column vectors, the similarity between cases and the similarity between attributes can be calculated.

数値データと離散的なカテゴリデータとが混在したより一般的なデータに対する類似度計算方法としては、機械学習を応用した方法も検討されている。特許文献1の技術では、互いに相関がある属性の組をもつデータに対して、条件部と結論部が同時に生起する頻度を相関ルール分析によって求め、その結果に基づいて類似度を補正することにより、ユーザの直感に沿うような類似事例を出力する。   As a similarity calculation method for more general data in which numerical data and discrete category data are mixed, a method using machine learning is also being studied. In the technique of Patent Document 1, the frequency at which the condition part and the conclusion part occur at the same time is obtained by correlation rule analysis for data having attribute sets that are correlated with each other, and the similarity is corrected based on the result. A similar case that follows the user's intuition is output.

しかしながら、事例間類似度の計算においては、属性の重み、及び、属性値間類似度を、予めユーザが設定しておく必要がある。   However, in calculating the similarity between cases, the user needs to set the attribute weight and the similarity between attribute values in advance.

また、特許文献2の技術では、事例の部分集合をランダム抽出し、決定木等で繰り返し分類し、事例間の分類結果のクラスが同じか否かをカウントすることによって、事例間類似度を計算する。しかしながら、多数の反復処理を必要とするため計算効率が悪く、また、ランダム抽出の結果によって、事例間類似度の算出結果が大きく変化する可能性がある。   In the technique of Patent Document 2, a subset of cases is randomly extracted, repeatedly classified using a decision tree or the like, and the degree of similarity between cases is calculated by counting whether the classification result classes between cases are the same. To do. However, the calculation efficiency is poor because a large number of iterative processes are required, and the calculation result of the similarity between cases may greatly change depending on the result of random extraction.

特開2002−149697号公報JP 2002-149697 A 特許第5391637号公報Japanese Patent No. 5391637

実施形態の課題は、複数の事例、及び、複数の事例のそれぞれが複数の属性の値を持つデータから、事例間類似度及び属性間類似度を統一的な基準で、かつ効率的に計算することができる類似度計算装置及び類似度計算方法を提供することを目的とすることである。   The problem of the embodiment is to efficiently calculate the similarity between cases and the similarity between attributes from a plurality of cases and data in which each of the plurality of cases has a plurality of attribute values in a unified standard. It is an object of the present invention to provide a similarity calculation device and a similarity calculation method that can be used.

実施形態の類似度計算装置は、分類器生成部を有する。分類器生成部は、複数の事例と、複数の事例のそれぞれに対応付けられた複数の属性及び正例と負例とを含むクラスとの組から構成される入力データから、クラスに含まれる正例の割合と、所定の属性に含まれる所定のカテゴリデータの正例の割合とに基づいて、カテゴリデータから分類スコアを出力する分類器を属性毎に生成する。   The similarity calculation apparatus according to the embodiment includes a classifier generation unit. The classifier generator generates positive data included in a class from input data composed of a plurality of cases, a plurality of attributes associated with each of the plurality of cases, and a class including positive examples and negative examples. Based on the ratio of examples and the ratio of positive examples of predetermined category data included in predetermined attributes, a classifier that outputs a classification score from category data is generated for each attribute.

実施形態に係る類似度計算システムの構成の一例を示す図である。It is a figure which shows an example of a structure of the similarity calculation system which concerns on embodiment. 類似度計算装置の構成の一例を示す図である。It is a figure which shows an example of a structure of a similarity calculation apparatus. 類似度計算装置に構成される類似度計算処理部の一例を示す図である。It is a figure which shows an example of the similarity calculation process part comprised by the similarity calculation apparatus. 入力データ41の一例を示す図である。It is a figure which shows an example of the input data. 分類器生成部32の処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of processing of a classifier generation unit 32. 分類器生成部32の処理により生成される分類器42の一例を示す図である。It is a figure which shows an example of the classifier 42 produced | generated by the process of the classifier production | generation part 32. FIG. 評価部33の処理の一例を示すフローチャートである。It is a flowchart which shows an example of a process of the evaluation part. 評価部33の処理により生成される分類スコア行列43の一例を示す図である。It is a figure which shows an example of the classification score matrix 43 produced | generated by the process of the evaluation part 33. FIG. 事例間類似度算出部34の処理の一例を示すフローチャートである。5 is a flowchart showing an example of processing of a case similarity calculation unit 34. 事例間類似度算出部34の処理により生成される事例間類似度行列44の一例を示す図である。It is a figure which shows an example of the similarity matrix 44 between cases produced | generated by the process of the similarity calculation part 34 between cases. 属性間類似度算出部35の処理の一例を示すフローチャートである。5 is a flowchart illustrating an example of processing of an attribute similarity calculation unit 35. 属性間類似度算出部35の処理により生成される属性間類似度行列45の一例を示す図である。It is a figure which shows an example of the similarity matrix 45 between attributes produced | generated by the process of the similarity calculation part 35 between attributes.

以下、図面を参照して実施形態について詳細に説明する。   Hereinafter, embodiments will be described in detail with reference to the drawings.

図1は、実施形態に係る類似度計算システムの構成の一例を示す図であり、図2は、類似度計算装置の構成の一例を示す図であり、図3は、類似度計算装置に構成される類似度計算処理部の一例を示す図である。   1 is a diagram illustrating an example of a configuration of a similarity calculation system according to the embodiment, FIG. 2 is a diagram illustrating an example of a configuration of a similarity calculation device, and FIG. 3 is a configuration of the similarity calculation device. It is a figure which shows an example of the similarity calculation process part.

図1に示すように、類似度計算システム1は、ユーザにより操作されるパーソナルコンピュータ等である類似度計算装置11と、ネットワークNWを介して類似度計算装置11に接続されるデータベースサーバ12とを有して構成されている。   As shown in FIG. 1, the similarity calculation system 1 includes a similarity calculation device 11 that is a personal computer or the like operated by a user, and a database server 12 connected to the similarity calculation device 11 via a network NW. It is configured.

図2に示すように、類似度計算装置11は、制御部21と、ROM22と、RAM23と、入力デバイス24と、出力デバイス25と、通信インターフェース(以下、通信IFという)26と、記憶媒体着脱部27と、バス28とを有して構成されている。制御部21、ROM22、RAM23、入力デバイス24、出力デバイス25、通信IF26、及び、記憶媒体着脱部27は、互いにバス28を介して接続されている。   As shown in FIG. 2, the similarity calculation device 11 includes a control unit 21, a ROM 22, a RAM 23, an input device 24, an output device 25, a communication interface (hereinafter referred to as communication IF) 26, and a storage medium attachment / detachment. The unit 27 and the bus 28 are included. The control unit 21, ROM 22, RAM 23, input device 24, output device 25, communication IF 26, and storage medium attaching / detaching unit 27 are connected to each other via a bus 28.

ROM22には、データの類似度を計算するための類似度計算プログラムが記憶されている。制御部21は、ROM22に記憶された類似度計算プログラムを読み出し、RAM23上に展開して実行する。これにより、後述する図3に示す類似度計算処理部31が構成されることになる。   The ROM 22 stores a similarity calculation program for calculating the similarity of data. The control unit 21 reads out the similarity calculation program stored in the ROM 22 and develops it on the RAM 23 for execution. Thereby, a similarity calculation processing unit 31 shown in FIG. 3 to be described later is configured.

入力デバイス24は、ユーザの操作に応じた情報及び指示等を入力することができるように構成されている。具体的には、入力デバイス24は、例えば、キーボード、マウス及びタッチパネルのうちの少なくとも1つを具備して構成されている。   The input device 24 is configured to be able to input information, instructions, and the like according to user operations. Specifically, the input device 24 includes, for example, at least one of a keyboard, a mouse, and a touch panel.

出力デバイス25は、制御部21の処理等に応じて生成された情報を外部へ出力することができるように構成されている。具体的には、出力デバイス25は、例えば、ディスプレイまたはプリンタを具備して構成されている。   The output device 25 is configured to output information generated according to the processing of the control unit 21 to the outside. Specifically, the output device 25 includes, for example, a display or a printer.

通信IF26は、ネットワークNWを介してデータベースサーバ12との間でデータ等の送受信を行うことが可能なデバイスにより構成されている。類似度計算装置11の通信IF26には、データベースサーバ12からネットワークNWを介して入力データ41(図3参照)が入力されるように構成されている。   The communication IF 26 is configured by a device capable of transmitting / receiving data and the like to / from the database server 12 via the network NW. The communication IF 26 of the similarity calculation device 11 is configured such that input data 41 (see FIG. 3) is input from the database server 12 via the network NW.

記憶媒体着脱部27は、メモリカードまたはUSBメモリ等の記憶媒体が着脱可能に構成されている。なお、入力データ41(図3参照)は、記憶媒体着脱部27に装着された記憶媒体から入力されるものであってもよい。   The storage medium attaching / detaching unit 27 is configured so that a storage medium such as a memory card or a USB memory can be attached / detached. The input data 41 (see FIG. 3) may be input from a storage medium attached to the storage medium attaching / detaching unit 27.

図3に示すように、類似度計算処理部31は、分類器生成部32と、評価部33と、事例間類似度算出部34と、属性間類似度算出部35とを有して構成されている。   As shown in FIG. 3, the similarity calculation processing unit 31 includes a classifier generation unit 32, an evaluation unit 33, an inter-case similarity calculation unit 34, and an attribute similarity calculation unit 35. ing.

分類器生成部32は、入力データ41から属性毎に尤度に基づく数値を返す分類器42を生成する。分類器生成部32は、生成した分類器42を評価部33に出力する。より具体的には、分類器生成部32は、複数の事例X1〜X10と、複数の事例のそれぞれに対応付けられた複数の属性Y1〜Y3及び正例と負例とを含むクラスとの組から構成される入力データ41から、クラスに含まれる正例の割合と、所定の属性に含まれる所定のカテゴリデータの正例の割合とに基づいて、カテゴリデータから分類スコアを出力する分類器Z1〜Z3を属性Y1〜Y3毎に生成する。   The classifier generation unit 32 generates a classifier 42 that returns a numerical value based on likelihood for each attribute from the input data 41. The classifier generation unit 32 outputs the generated classifier 42 to the evaluation unit 33. More specifically, the classifier generation unit 32 is a set of a plurality of cases X1 to X10, a plurality of attributes Y1 to Y3 associated with each of the plurality of cases, and a class including a positive example and a negative example. Classifier Z1 that outputs a classification score from category data based on the ratio of positive examples included in a class and the ratio of positive examples of predetermined category data included in predetermined attributes ~ Z3 are generated for each of the attributes Y1 to Y3.

評価部33は、分類器42によって入力データ41に基づいて分類スコアを出力し、分類スコア行列43を生成する。すなわち、評価部33は、入力データ41を分類器42により処理して分類スコア行列43を生成する。評価部33は、生成した分類スコア行列43を事例間類似度算出部34及び属性間類似度算出部35に出力する。   The evaluation unit 33 outputs a classification score based on the input data 41 by the classifier 42 and generates a classification score matrix 43. That is, the evaluation unit 33 processes the input data 41 by the classifier 42 and generates a classification score matrix 43. The evaluation unit 33 outputs the generated classification score matrix 43 to the inter-case similarity calculation unit 34 and the inter-attribute similarity calculation unit 35.

事例間類似度算出部34は、分類スコア行列43から各事例X1〜X10に対応付けられた各属性Y1〜Y3の分類スコアに基づいて、事例間類似度行列44を生成する。   The inter-case similarity calculation unit 34 generates an inter-case similarity matrix 44 based on the classification scores of the attributes Y1 to Y3 associated with the respective cases X1 to X10 from the classification score matrix 43.

属性間類似度算出部35は、分類スコア行列43から各属性Y1〜Y3に対応付けられた各事例X1〜X10の分類スコアに基づいて、属性間類似度行列45を生成する。   The inter-attribute similarity calculation unit 35 generates an inter-attribute similarity matrix 45 based on the classification scores of the cases X1 to X10 associated with the respective attributes Y1 to Y3 from the classification score matrix 43.

次に、実施形態に係る処理の具体例について、図4から図12を用いて説明する。   Next, a specific example of processing according to the embodiment will be described with reference to FIGS.

図4は、入力データ41の一例を示す図であり、図5は、分類器生成部32の処理の一例を示すフローチャートであり、図6は、分類器生成部32の処理により生成される分類器42の一例を示す図である。   4 is a diagram illustrating an example of the input data 41, FIG. 5 is a flowchart illustrating an example of the processing of the classifier generation unit 32, and FIG. 6 is a classification generated by the processing of the classifier generation unit 32. FIG.

図4に示すように、入力データ41の1行目(先頭行)は、ラベルを表し、複数の属性Y1〜Y3と、1つのクラスとにより形成されている。本実施形態では、入力データ41は、属性Y1、属性Y2、及び、属性Y3の3個の属性Yを有している。   As shown in FIG. 4, the first line (first line) of the input data 41 represents a label, and is formed by a plurality of attributes Y1 to Y3 and one class. In the present embodiment, the input data 41 has three attributes Y, an attribute Y1, an attribute Y2, and an attribute Y3.

入力データ41の2行目以降は、複数の事例X1〜X10を表し、各事例X1〜X10は、それぞれの特徴を示す属性Y1〜Y3及びデータの種別を示すクラスの値の組から構成されている。本実施形態では、入力データ41は、事例X1〜X10の10個の事例Xを有している。また、属性における「−」はデータの欠損を表している。   The second and subsequent lines of the input data 41 represent a plurality of cases X1 to X10, and each case X1 to X10 is composed of a set of attributes Y1 to Y3 indicating the respective characteristics and a class value indicating the type of data. Yes. In this embodiment, the input data 41 has ten cases X of cases X1 to X10. In addition, “-” in the attribute represents data loss.

本実施形態では、属性Yは全て数値データではない離散的なデータであるカテゴリデータとなっている。例えば、事例X1の属性Y1は、「A」であり、事例X1の属性Y2は、「C」であり、事例X1の属性Y3は、「F」である。属性Yに数値データが含まれている場合、分類器生成部32が離散化により数値データをカテゴリデータに変換する。なお、離散化については、例えば、等間隔分割又は等頻度分割等の既知の手法を用いればよい。   In the present embodiment, the attribute Y is all category data that is discrete data that is not numerical data. For example, the attribute Y1 of the case X1 is “A”, the attribute Y2 of the case X1 is “C”, and the attribute Y3 of the case X1 is “F”. When the attribute Y includes numerical data, the classifier generation unit 32 converts the numerical data into category data by discretization. For discretization, for example, a known method such as equal interval division or equal frequency division may be used.

また、入力データ41のクラスは、正例(TRUE)と、負例(FALSE)の二値とする。クラスが多値の場合、分類器生成部32が例えば1つの値を正例、残りの値を負例と見なす等、二値のデータに変換する。クラスの正例及び負例は、属性Y1〜Y3のカテゴリデータに応じてユーザが予め設定する。   In addition, the class of the input data 41 is a binary value of a positive example (TRUE) and a negative example (FALSE). When the class is multi-valued, the classifier generation unit 32 converts it into binary data, for example, regarding one value as a positive example and the remaining value as a negative example. The positive example and the negative example of the class are set in advance by the user according to the category data of the attributes Y1 to Y3.

図4に示す入力データ41は、分類器生成部32及び評価部33に入力される。上述したように、入力データ41は、データベースサーバ12からネットワークNWを介して、あるいは、記憶媒体着脱部27に装着された記憶媒体から分類器生成部32及び評価部33に入力される。分類器生成部32は、入力データ41を教師データとして分類器Z1〜Z3を生成する。   The input data 41 illustrated in FIG. 4 is input to the classifier generation unit 32 and the evaluation unit 33. As described above, the input data 41 is input to the classifier generation unit 32 and the evaluation unit 33 from the database server 12 via the network NW or from a storage medium attached to the storage medium attachment / detachment unit 27. The classifier generation unit 32 generates classifiers Z1 to Z3 using the input data 41 as teacher data.

分類器生成部32は、ステップS1において、変数iに1を代入し、総属性数N、及び、全事例X中の正例の割合Ptを求める。本実施形態では、入力データ41は属性Y1、Y2及びY3を有しているため、総属性数Nは、「3」となる。また、入力データ41は事例X1〜X10の10個の事例Xを有し、事例X1〜X4の4個の事例Xが正例となっているため、全事例X中の正例の割合Ptは、「4/10」となる。   In step S <b> 1, the classifier generation unit 32 substitutes 1 for a variable i, and obtains the total number of attributes N and the ratio Pt of positive examples in all cases X. In the present embodiment, since the input data 41 has attributes Y1, Y2, and Y3, the total number of attributes N is “3”. Moreover, since the input data 41 has ten cases X of cases X1 to X10, and four cases X of cases X1 to X4 are positive examples, the ratio Pt of the positive examples in all the cases X is , “4/10”.

次に、分類器生成部32は、ステップS2において、変数jに1を代入し、属性Yiの総カテゴリ数Mを求める。属性Y1のカテゴリデータは、「A」及び「B」の2つになるため、総カテゴリ数Mは、「2」となる。   Next, in step S2, the classifier generation unit 32 substitutes 1 for the variable j to obtain the total category number M of the attribute Yi. Since the category data of the attribute Y1 is “A” and “B”, the total category number M is “2”.

次に、分類器生成部32は、ステップS3において、属性Yi(i=1)、カテゴリj(j=1)の正例の割合P(i,j)を求める。ここで、カテゴリj(j=1)をカテゴリデータ「A」とすると、属性Y1のカテゴリデータ「A」の個数は7であり、そのうち、正例の個数は2である。そのため、属性Yi、カテゴリjの正例の(i,j)は、「2/7」となる。   Next, in step S3, the classifier generation unit 32 obtains a positive example ratio P (i, j) of the attribute Yi (i = 1) and the category j (j = 1). Here, if the category j (j = 1) is the category data “A”, the number of category data “A” of the attribute Y1 is 7, of which the number of positive examples is 2. Therefore, the positive example (i, j) of the attribute Yi and category j is “2/7”.

次に、分類器生成部32は、ステップS4において、以下の性質を備えた分類器Ziを生成する。
・Pt<P(i,j)の場合、正の数値を返す
・Pt>P(i,j)の場合、負の数値を返す
・Pt=P(i,j)、又は、欠損の場合、0を返す
すなわち、あるカテゴリjの正例の割合P(i,j)が全事例X中の正例の割合Ptより大きい場合には、「属性Yiがカテゴリjの値を持つ場合、正例である尤度(もっともらしさ)が高くなる」と解釈し、正の数値を返す。
Next, the classifier generation unit 32 generates a classifier Zi having the following properties in step S4.
If Pt <P (i, j), return a positive number. If Pt> P (i, j), return a negative number. Pt = P (i, j) or if missing. That is, if the ratio P (i, j) of a positive example of a certain category j is larger than the ratio Pt of positive examples in all cases X, “if attribute Yi has a value of category j, a positive example The likelihood (likelihood) is higher ”and returns a positive number.

一方、あるカテゴリjの正例の割合P(i,j)が全事例X中の正例の割合Ptより小さい場合には、「属性Yiがカテゴリjの値を持つ場合、正例である尤度(もっともらしさ)が低くなる」と解釈し、負の数値を返す。   On the other hand, when the ratio P (i, j) of a positive example of a certain category j is smaller than the ratio Pt of positive examples in all cases X, “if attribute Yi has a value of category j, It returns a negative number.

さらに、あるカテゴリjの正例の割合P(i,j)が全事例X中の正例の割合Ptと等しい場合、又は、属性Yiが欠損の場合には、「正例である尤度(もっともらしさ)は変化しない」と解釈し、0を返す。   Furthermore, when the ratio P (i, j) of positive examples in a certain category j is equal to the ratio Pt of positive examples in all cases X, or when the attribute Yi is missing, “the likelihood of being a positive example ( (Probability) does not change "and returns 0.

このような性質を備えた分類器としては、例えば、下記の(式1)の分類器を用いる。
log10P(i,j)−log10Pt・・・(式1)
ここでは、属性Yi、カテゴリjの正例の割合P(i,j)は、「2/7」であり、全事例X中の正例の割合Ptは、「4/10」であるため、あるカテゴリjの正例の割合P(i,j)が全事例X中の正例の割合Ptより小さくなる。そのため、分類器Zi(i=1)は負の数値を返す。なお、以下の説明では、分類器Ziが返す数値、すなわち、返値のことを「分類スコア」と呼ぶ。属性Yi、カテゴリjの正例の割合P(i,j)、及び、全事例X中の正例の割合Ptを(式1)に代入することで、分類スコアが「−0.146」となる。
As a classifier having such properties, for example, a classifier of the following (formula 1) is used.
log 10 P (i, j) −log 10 Pt (Equation 1)
Here, since the ratio P (i, j) of the positive examples of the attribute Yi and category j is “2/7”, and the ratio Pt of the positive examples in all the cases X is “4/10”. The ratio P (i, j) of positive examples in a certain category j is smaller than the ratio Pt of positive examples in all cases X. Therefore, the classifier Zi (i = 1) returns a negative numerical value. In the following description, the numerical value returned by the classifier Zi, that is, the return value is referred to as “classification score”. By substituting the attribute Yi, the ratio P (i, j) of positive examples in category j and the ratio Pt of positive examples in all cases X into (Equation 1), the classification score is “−0.146”. Become.

次に、分類器生成部32は、ステップS5において、変数jを1インクリメントし、ステップS6において、変数jが属性Yiの総カテゴリ数Mより大きいか否かを判定する。   Next, the classifier generation unit 32 increments the variable j by 1 in step S5, and determines whether or not the variable j is larger than the total category number M of the attribute Yi in step S6.

ここでは、変数jが2、属性Yi(i=1)の総カテゴリ数Mが2であるため、分類器生成部32は、変数jが属性Yiの総カテゴリ数Mより大きくないと判定し、ステップS3に戻り、同様の処理を繰り返す。   Here, since the variable j is 2 and the total category number M of the attribute Yi (i = 1) is 2, the classifier generation unit 32 determines that the variable j is not larger than the total category number M of the attribute Yi. Returning to step S3, the same processing is repeated.

分類器生成部32は、ステップS3において、属性Yi(i=1)、カテゴリj(j=2)の正例の割合P(i,j)を求める。ここで、カテゴリj(j=2)をカテゴリデータ「B」とすると、属性Y1のカテゴリデータ「B」の個数は3であり、そのうち、正例の個数は2である。そのため、属性Yi、カテゴリjの正例の割合P(i,j)は、「2/3」となる。   In step S3, the classifier generation unit 32 obtains a positive example ratio P (i, j) of the attribute Yi (i = 1) and the category j (j = 2). Here, if the category j (j = 2) is the category data “B”, the number of category data “B” of the attribute Y1 is 3, and the number of positive examples is 2. Therefore, the ratio P (i, j) of the positive example of the attribute Yi and the category j is “2/3”.

属性Yi、カテゴリjの正例の割合P(i,j)は、「2/3」であり、全事例X中の正例の割合Ptは、「4/10」であるため、あるカテゴリjの正例の割合P(i,j)が全事例X中の正例の割合Ptより大きくなる。   The ratio P (i, j) of the positive example of the attribute Yi and the category j is “2/3”, and the ratio Pt of the positive example in all the cases X is “4/10”. The ratio P (i, j) of the positive examples of the positive examples is larger than the ratio Pt of the positive examples in all the cases X.

分類器生成部32は、ステップS4において、正の数値を返す分類器Ziを生成する。属性Yi、カテゴリjの正例の割合P(i,j)、及び、全事例X中の正例の割合Ptを(式1)に代入することで、分類スコアが「0.222」となる。   In step S4, the classifier generator 32 generates a classifier Zi that returns a positive numerical value. By substituting the positive example ratio P (i, j) of the attribute Yi and the category j and the positive example ratio Pt in all the cases X into (Expression 1), the classification score becomes “0.222”. .

このような処理により、図6に示すように、属性Y1に対応する分類器Z1が生成されることになる。この分類器Z1は、属性Y1のカテゴリデータに応じた数値(分類スコア)を戻すように構成されている。   By such processing, as shown in FIG. 6, a classifier Z1 corresponding to the attribute Y1 is generated. The classifier Z1 is configured to return a numerical value (classification score) corresponding to the category data of the attribute Y1.

次に、分類器生成部32は、ステップS5において、変数jを1インクリメントし、ステップS6において、変数jが属性Yiの総カテゴリ数Mより大きいか否かを判定する。   Next, the classifier generation unit 32 increments the variable j by 1 in step S5, and determines whether or not the variable j is larger than the total category number M of the attribute Yi in step S6.

ここでは、変数jが3、属性Yi(i=1)の総カテゴリ数Mが2であるため、分類器生成部32は、変数jが属性Yiの総カテゴリ数Mより大きいと判定し、ステップS7に移行する。   Here, since the variable j is 3 and the total category number M of the attribute Yi (i = 1) is 2, the classifier generation unit 32 determines that the variable j is larger than the total category number M of the attribute Yi, and the step The process proceeds to S7.

分類器生成部32は、ステップS7において、変数iを1インクリメントし、ステップS8において、変数iが総属性数Nより大きいか否かを判定する。   The classifier generation unit 32 increments the variable i by 1 in step S7, and determines whether or not the variable i is greater than the total number of attributes N in step S8.

ここでは、変数iが2、総属性数Nが3であるため、分類器生成部32は、変数iが総属性数Nより大きくないと判定し、ステップS2に戻り、同様の処理を繰り返す。   Here, since the variable i is 2 and the total number of attributes N is 3, the classifier generation unit 32 determines that the variable i is not greater than the total number of attributes N, returns to step S2, and repeats the same processing.

属性Yi(i=2)のカテゴリデータは、「C」、「D」、「E」、及び、「欠損」の4つになるため、総カテゴリ数Mは、「4」となる。分類器生成部32は、属性Y2について、上述した処理と同様の処理を繰り返すことで、図6に示す分類器Z2を生成する。この分類器Z2は、属性Y2のカテゴリデータに応じた数値(分類スコア)を戻すように構成されている。   Since the category data of the attribute Yi (i = 2) is “C”, “D”, “E”, and “missing”, the total number of categories M is “4”. The classifier generation unit 32 generates the classifier Z2 illustrated in FIG. 6 by repeating the same process as described above for the attribute Y2. The classifier Z2 is configured to return a numerical value (classification score) corresponding to the category data of the attribute Y2.

そして、分類器生成部32は、ステップS7において、変数iを1インクリメントし、ステップS8において、変数iが総属性数Nより大きいか否かを判定する。   Then, the classifier generation unit 32 increments the variable i by 1 in step S7, and determines whether or not the variable i is larger than the total attribute number N in step S8.

ここでは、変数iが3、総属性数Nが3であるため、分類器生成部32は、変数iが総属性数Nより大きくないと判定し、ステップS2に戻り、同様の処理を繰り返す。   Here, since the variable i is 3 and the total number of attributes N is 3, the classifier generation unit 32 determines that the variable i is not greater than the total number of attributes N, returns to step S2, and repeats the same processing.

属性Yi(i=3)のカテゴリデータは、「F」、「G」、及び、「欠損」の3つになるため、総カテゴリ数Mは、「3」となる。分類器生成部32は、属性Y3について、上述した処理と同様の処理を繰り返すことで、図6に示す分類器Z3を生成する。この分類器Z3は、属性Y3のカテゴリデータに応じた数値(分類スコア)を戻すように構成されている。   Since the category data of the attribute Yi (i = 3) is “F”, “G”, and “missing”, the total number of categories M is “3”. The classifier generation unit 32 generates the classifier Z3 illustrated in FIG. 6 by repeating the same process as described above for the attribute Y3. The classifier Z3 is configured to return a numerical value (classification score) corresponding to the category data of the attribute Y3.

次に、分類器生成部32は、ステップS7において、変数iを1インクリメントすると、変数iが4となる。この結果、変数iが4、総属性数Nが3であるため、分類器生成部32は、変数iが総属性数Nより大きいと判定し、処理を終了する。   Next, the classifier generation unit 32 increments the variable i by 1 in step S7, so that the variable i becomes 4. As a result, since the variable i is 4 and the total number of attributes N is 3, the classifier generation unit 32 determines that the variable i is greater than the total number of attributes N, and ends the process.

このように、図5の処理により、入力データ41の総属性数がNの場合、N個の分類器が生成されることになる。本実施形態では、入力データ41が3つの属性Y1〜Y3を有しているため、3つの分類器Z1〜Z3を有した分類器42が分類器生成部32によって生成される。   As described above, when the total number of attributes of the input data 41 is N, N classifiers are generated by the processing of FIG. In this embodiment, since the input data 41 has three attributes Y1 to Y3, a classifier 42 having three classifiers Z1 to Z3 is generated by the classifier generation unit 32.

次に、評価部33の処理について説明する。図7は、評価部33の処理の一例を示すフローチャートであり、図8は、評価部33の処理により生成される分類スコア行列43の一例を示す図である。   Next, the process of the evaluation part 33 is demonstrated. FIG. 7 is a flowchart illustrating an example of the process of the evaluation unit 33, and FIG. 8 is a diagram illustrating an example of the classification score matrix 43 generated by the process of the evaluation unit 33.

評価部33は、図4に示す入力データ41及び図6に示す分類器42を用いて、図8に示す分類スコア行列43を生成する。なお、評価部33に入力データには、図4に示すクラスは無くてもよい。また、評価部33に入力される入力データは、図4に示す入力データ41であってもよいし、他の入力データであってもよい。   The evaluation unit 33 uses the input data 41 shown in FIG. 4 and the classifier 42 shown in FIG. 6 to generate a classification score matrix 43 shown in FIG. Note that the class shown in FIG. 4 may not be included in the input data in the evaluation unit 33. Further, the input data input to the evaluation unit 33 may be the input data 41 shown in FIG. 4 or other input data.

評価部33は、ステップS11において、変数iに1を代入し、総属性数N及び総事例数Dを求める。本実施形態では、総属性数Nは3であり、総事例数Dは10となる。   In step S11, the evaluation unit 33 substitutes 1 for the variable i to obtain the total attribute number N and the total case number D. In the present embodiment, the total number of attributes N is 3, and the total number of cases D is 10.

評価部33は、ステップS12において、変数kに1を代入し、ステップS13において、事例Xk、属性Yiの値a(k,i)を求める。ここでは、変数k=1、変数i=1であるため、評価部33は、入力データ41の事例X1、属性Y1の値(カテゴリデータ)として「A」を求める。   In step S12, the evaluation unit 33 substitutes 1 for the variable k, and in step S13, obtains the value a (k, i) of the case Xk and the attribute Yi. Here, since the variable k = 1 and the variable i = 1, the evaluation unit 33 obtains “A” as the value (category data) of the case X1 and the attribute Y1 of the input data 41.

評価部33は、ステップS14において、属性Yiに対応する分類器Ziを用いて、値a(k,i)から分類スコアs(k,i)を求める。ここでは、属性Y1に対応する分類器Z1を用いて、事例X1、属性Y1の値である「A」から分類スコアs(k,i)として「−0.146」を求める。   In step S14, the evaluation unit 33 obtains a classification score s (k, i) from the value a (k, i) using the classifier Zi corresponding to the attribute Yi. Here, using the classifier Z1 corresponding to the attribute Y1, “−0.146” is obtained as the classification score s (k, i) from the value “A” of the case X1 and the attribute Y1.

評価部33は、ステップS15において、分類スコア行列43の(k,i)成分に、分類スコアs(k,i)を代入する。これにより、図8に示す分類スコア行列43の事例X1、属性Y1の成分にステップS14において求められた分類スコアである「−0.146」が代入されることになる。   In step S15, the evaluation unit 33 substitutes the classification score s (k, i) for the (k, i) component of the classification score matrix 43. As a result, “−0.146”, which is the classification score obtained in step S14, is assigned to the component of the case X1 and the attribute Y1 of the classification score matrix 43 shown in FIG.

評価部33は、ステップS16において、変数kを1インクリメントし、ステップS17において、変数kが総事例数Dより大きいか否かを判定する。   In step S16, the evaluation unit 33 increments the variable k by 1. In step S17, the evaluation unit 33 determines whether the variable k is greater than the total number of cases D.

ここでは、変数kが2、総事例数Dが10であるため、評価部33は、変数kが総事例数Dより大きくないと判定し、ステップS13に戻り、同様の処理を繰り返す。この結果、事例X2、属性Y1の分類スコアs(k,i)、事例X3、属性Y1の分類スコアs(k,i)、・・・、事例X10、属性Y1の分類スコアs(k,i)が求められ、分類スコア行列43に代入されることになる。   Here, since the variable k is 2 and the total number of cases D is 10, the evaluation unit 33 determines that the variable k is not greater than the total number of cases D, returns to step S13, and repeats the same processing. As a result, the classification score s (k, i) of the case X2, the attribute Y1, the classification score s (k, i) of the case X3, the attribute Y1,..., The classification score s (k, i) of the case X10, the attribute Y1. ) Is obtained and substituted into the classification score matrix 43.

一方、評価部33は、ステップS17において、変数kが総事例数Dより大きいと判定した場合、ステップS18に移行する。評価部33は、ステップS18において、変数iを1インクリメントし、ステップS19において、変数iが総属性数Nより大きいか否かを判定する。ここでは、変数iが2、総属性数Nが3であるため、評価部33は、変数iが総属性数Nより大きくないと判定し、ステップS12に戻り、同様の処理を繰り返す。この結果、事例X1、属性Y2の分類スコアs(k,i)、事例X2、属性Y2の分類スコアs(k,i)、・・・、事例X10、属性Y2の分類スコアs(k,i)が求められ、分類スコア行列43に代入されることになる。   On the other hand, if the evaluation unit 33 determines in step S17 that the variable k is larger than the total number of cases D, the evaluation unit 33 proceeds to step S18. In step S18, the evaluation unit 33 increments the variable i by 1. In step S19, the evaluation unit 33 determines whether the variable i is greater than the total number of attributes N. Here, since the variable i is 2 and the total number of attributes N is 3, the evaluation unit 33 determines that the variable i is not greater than the total number of attributes N, returns to step S12, and repeats the same processing. As a result, the classification score s (k, i) of the case X1, the attribute Y2, the classification score s (k, i) of the case X2, the attribute Y2,..., The classification score s (k, i) of the case X10, the attribute Y2. ) Is obtained and substituted into the classification score matrix 43.

同様の処理により、変数iが1インクリメントされて3になると、事例X1、属性Y3の分類スコアs(k,i)、事例X2、属性Y3の分類スコアs(k,i)、・・・、事例X10、属性Y3の分類スコアs(k,i)が求められ、分類スコア行列43に代入されることになる。一方、変数iが1インクリメントされて4になると、評価部33は、変数iが総属性数Nより大きいと判定し、処理を終了する。   By the same processing, when the variable i is incremented by 1 to 3, the classification score s (k, i) of the case X1, the attribute Y3, the classification score s (k, i) of the case X2, the attribute Y3,. The classification score s (k, i) of the case X10 and the attribute Y3 is obtained and substituted into the classification score matrix 43. On the other hand, when the variable i is incremented by 1 to 4, the evaluation unit 33 determines that the variable i is greater than the total number of attributes N, and ends the process.

以上の処理により、図8に示す分類スコア行列43が評価部33によって生成される。すなわち、属性Y1〜Y3毎に対応する分類器Z1〜Z3を用いて入力データ41を処理することで、カテゴリデータに応じた数値(分類スコア)が代入された分類スコア行列43が生成されることになる。   Through the above processing, the classification score matrix 43 shown in FIG. That is, by processing the input data 41 using the classifiers Z1 to Z3 corresponding to the attributes Y1 to Y3, the classification score matrix 43 into which the numerical values (classification scores) corresponding to the category data are substituted is generated. become.

次に、事例間類似度算出部34の処理について説明する。図9は、事例間類似度算出部34の処理の一例を示すフローチャートであり、図10は、事例間類似度算出部34の処理により生成される事例間類似度行列44の一例を示す図である。   Next, the process of the inter-case similarity calculation unit 34 will be described. FIG. 9 is a flowchart illustrating an example of the process of the inter-case similarity calculation unit 34, and FIG. 10 illustrates an example of the inter-case similarity matrix 44 generated by the process of the inter-case similarity calculation unit 34. is there.

事例間類似度算出部34は、図8に示す分類スコア行列43を用いて、図10に示す事例間類似度行列44を生成する。   The inter-case similarity calculation unit 34 generates the inter-case similarity matrix 44 shown in FIG. 10 using the classification score matrix 43 shown in FIG.

事例間類似度算出部34は、ステップS21において、変数iに1を代入し、総属性数N、総事例数Dを求める。ここでは、総属性数Nが3、総事例数Dが10となる。   In step S21, the inter-case similarity calculation unit 34 substitutes 1 for the variable i to obtain the total attribute number N and the total case number D. Here, the total number of attributes N is 3 and the total number of cases D is 10.

事例間類似度算出部34は、ステップS22において、D次正方行列の事例間類似度行列44を生成し、全成分を0で初期化する。ここでは、総事例数Dが10であるため、図10に示すように、10行、10列の事例間類似度行列44が生成される。   In step S22, the inter-case similarity calculation unit 34 generates an inter-case similarity matrix 44 of a D-order square matrix and initializes all components with zero. Here, since the total number D of cases is 10, as shown in FIG. 10, a 10-row, 10-column case similarity matrix 44 is generated.

事例間類似度算出部34は、ステップS23において、事例Xi、属性Ykの値をa(i,k)として、事例Xiに対応する行ベクトルVc(i)を生成する。なお、変数kは、1、2、・・・、N(総属性数)である。ここでは、事例X1に対応する行ベクトルVc(i)が生成される。具体的には、事例間類似度算出部34は、分類スコア行列43に基づいて、事例X1に対応する行ベクトルVc(i)=(−0.146, 0.176, 0.051)を生成する。   In step S23, the inter-case similarity calculation unit 34 generates a row vector Vc (i) corresponding to the case Xi with the value of the case Xi and the attribute Yk as a (i, k). The variable k is 1, 2,..., N (total number of attributes). Here, a row vector Vc (i) corresponding to the case X1 is generated. Specifically, the inter-case similarity calculation unit 34 generates a row vector Vc (i) = (− 0.146, 0.176, 0.051) corresponding to the case X1 based on the classification score matrix 43. To do.

事例間類似度算出部34は、ステップS24において、変数jにi+1を代入する。ここでは、変数iが1であるため、変数jは2になる。   The similarity calculation part 34 between cases substitutes i + 1 to the variable j in step S24. Here, since the variable i is 1, the variable j is 2.

事例間類似度算出部34は、ステップS25において、事例Xj、属性Ykの値をa(j,k)として、事例Xjに対応する行ベクトルVc(j)を生成する。ここでは、事例X2に対応する行ベクトルVc(j)が生成される。具体的には、事例間類似度算出部34は、分類スコア行列43に基づいて、事例X2に対応する行ベクトルVc(j)=(−0.146, −0.250, −0.046)を生成する。   In step S25, the inter-case similarity calculation unit 34 generates a row vector Vc (j) corresponding to the case Xj with the value of the case Xj and the attribute Yk as a (j, k). Here, a row vector Vc (j) corresponding to case X2 is generated. Specifically, the inter-case similarity calculation unit 34, based on the classification score matrix 43, the row vector Vc (j) = (− 0.146, −0.250, −0.046) corresponding to the case X2. Is generated.

事例間類似度算出部34は、ステップS26において、行ベクトルVc(i)と行ベクトルVc(j)の類似度が高い程、値が小さくなるような距離Dc(i,j)を求め、事例間類似度行列44の(i,j)成分、及び、(j,i)成分にDc(i,j)を代入する。ここでは、事例X1と事例X2との距離Dc(1,2)が、事例間類似度行列44の(1,2)成分、及び、(2,1)成分に代入されることになる。   In step S26, the inter-case similarity calculation unit 34 obtains a distance Dc (i, j) that decreases as the similarity between the row vector Vc (i) and the row vector Vc (j) increases. Dc (i, j) is substituted into the (i, j) component and (j, i) component of the inter-similarity matrix 44. Here, the distance Dc (1, 2) between the case X1 and the case X2 is substituted into the (1, 2) component and the (2, 1) component of the inter-case similarity matrix 44.

このような距離Dc(i,j)としては、例えば、コサイン類似度に基づく下記の(式2)を用いる。   As such a distance Dc (i, j), for example, the following (Formula 2) based on cosine similarity is used.

Dc(i,j)=1−(Vc(i)・Vc(j))/(|Vc(i)||Vc(j)|)・・・(式2)
事例間類似度算出部34は、ステップS27において、変数jを1インクリメントし、ステップS28において、変数jが総事例数Dより大きいか否かを判定する。ここでは、変数jが3、総事例数Dが10であるため、事例間類似度算出部34は、変数jが総事例数Dより大きくないと判定し、ステップS25に戻り、同様の処理を繰り返す。
Dc (i, j) = 1− (Vc (i) · Vc (j)) / (| Vc (i) || Vc (j) |) (Expression 2)
The inter-case similarity calculation unit 34 increments the variable j by 1 in step S27, and determines whether or not the variable j is greater than the total number D of cases in step S28. Here, since the variable j is 3 and the total number of cases D is 10, the inter-case similarity calculation unit 34 determines that the variable j is not larger than the total number of cases D, returns to step S25, and performs the same processing. repeat.

すなわち、事例間類似度算出部34は、事例X1と事例X3との距離Dc(1,3)を求め、事例間類似度行列44の(1,3)成分、及び、(3,1)成分に代入する。事例間類似度算出部34は、同様の処理を繰り返すことで、事例X1と事例X10との距離Dc(1,10)を求め、事例間類似度行列44の(1,10)成分、及び、(10,1)成分に代入する。   That is, the inter-case similarity calculation unit 34 obtains the distance Dc (1, 3) between the case X1 and the case X3, and the (1, 3) component and the (3, 1) component of the inter-case similarity matrix 44. Assign to. The similarity calculation part 34 between cases calculates | requires distance Dc (1,10) of the case X1 and the case X10 by repeating the same process, (1,10) component of the similarity matrix 44 between cases, and Substitute into the (10, 1) component.

一方、事例間類似度算出部34は、変数jが総事例数Dより大きいと判定すると、ステップS29において、変数iを1インクリメントし、ステップS30において、変数iが総事例数Dよりも大きいか否かを判定する。ここでは、変数iが2であり、総事例数Dが10であるため、事例間類似度算出部34は、変数iが総事例数Dよりも大きくないと判定し、ステップS23に戻り、同様の処理を繰り返す。   On the other hand, if the similarity calculation unit 34 determines that the variable j is larger than the total number of cases D, the variable i is incremented by 1 in step S29, and whether the variable i is larger than the total number of cases D in step S30. Determine whether or not. Here, since the variable i is 2 and the total number of cases D is 10, the inter-case similarity calculation unit 34 determines that the variable i is not larger than the total number of cases D, and returns to step S23. Repeat the process.

すなわち、事例間類似度算出部34は、事例X2から事例X10についても、同様の処理を行うことで、事例間類似度行列44を生成する。そして、事例間類似度算出部34は、変数iが総事例数Dよりも大きいと判定すると、処理を終了する。   That is, the similarity calculation part 34 between cases produces | generates the similarity matrix 44 between cases by performing the same process also about the case X2 to the case X10. And if the similarity calculation part 34 between cases determines with the variable i being larger than the total number D of cases, a process will be complete | finished.

以上の処理により、図10に示す事例間類似度行列44が事例間類似度算出部34によって生成される。事例間類似度行列44は、各事例間の数値が小さい程、各事例間の距離が近い(各事例間が類似している)ことを示している。   Through the above process, the inter-case similarity matrix 44 shown in FIG. The inter-case similarity matrix 44 indicates that the smaller the numerical value between the cases, the closer the distance between the cases (the cases are similar).

次に、属性間類似度算出部35の処理について説明する。図11は、属性間類似度算出部35の処理の一例を示すフローチャートであり、図12は、属性間類似度算出部35の処理により生成される属性間類似度行列45の一例を示す図である。   Next, the process of the attribute similarity calculation unit 35 will be described. FIG. 11 is a flowchart illustrating an example of processing performed by the inter-attribute similarity calculation unit 35, and FIG. 12 illustrates an exemplary inter-attribute similarity matrix 45 generated by the processing performed by the inter-attribute similarity calculation unit 35. is there.

属性間類似度算出部35は、図8に示す分類スコア行列43を用いて、図12に示す属性間類似度行列45を生成する。図9の処理では、分類スコア行列43の行ベクトルを用いて各事例間の距離を求めていたが、図11の処理では、分類スコア行列43の列ベクトルを用いて各属性間の距離を求めている。   The inter-attribute similarity calculation unit 35 generates the inter-attribute similarity matrix 45 shown in FIG. 12 using the classification score matrix 43 shown in FIG. In the process of FIG. 9, the distance between the cases is obtained using the row vector of the classification score matrix 43, but in the process of FIG. 11, the distance between the attributes is obtained using the column vector of the classification score matrix 43. ing.

属性間類似度算出部35は、ステップS41において、変数iに1を代入し、総属性数N、総事例数Dを求める。ここでは、総属性数Nが3、総事例数Dが10となる。   In step S41, the inter-attribute similarity calculation unit 35 substitutes 1 for the variable i to obtain the total attribute number N and the total case number D. Here, the total number of attributes N is 3 and the total number of cases D is 10.

属性間類似度算出部35は、ステップS42において、N次正方行列の属性間類似度行列45を生成し、全成分を0で初期化する。ここでは、総属性数Nが3であるため、図12に示すように、3行、3列の属性間類似度行列45が生成される。   In step S42, the inter-attribute similarity calculation unit 35 generates an inter-attribute similarity matrix 45 of an Nth-order square matrix and initializes all components with zero. Here, since the total number of attributes N is 3, as shown in FIG. 12, an inter-attribute similarity matrix 45 of 3 rows and 3 columns is generated.

属性間類似度算出部35は、ステップS43において、事例Xk、属性Yiの値をa(k,i)として、属性Yiに対応する列ベクトルVa(i)を生成する。なお、変数kは、1、2、・・・、D(総事例数)である。ここでは、属性Y1に対応する列ベクトルVa(i)が生成される。具体的には、属性間類似度算出部35は、分類スコア行列43に基づいて、属性Y1に対応する列ベクトルVa(i)=(−0.146, −0.146, 0.222, 0.222, −0.146, −0.146, −0.146, −0.146, −0.146, 0.222)を生成する。   In step S43, the inter-attribute similarity calculation unit 35 generates a column vector Va (i) corresponding to the attribute Yi with the value of the case Xk and the attribute Yi as a (k, i). The variable k is 1, 2,..., D (total number of cases). Here, a column vector Va (i) corresponding to the attribute Y1 is generated. Specifically, the inter-attribute similarity calculation unit 35, based on the classification score matrix 43, the column vector Va (i) = (− 0.146, −0.146, 0.222, 0 corresponding to the attribute Y1. 222, -0.146, -0.146, -0.146, -0.146, -0.146, 0.222).

属性間類似度算出部35は、ステップS44において、変数jにi+1を代入する。ここでは、変数iが1であるため、変数jは2になる。   The inter-attribute similarity calculation unit 35 substitutes i + 1 for the variable j in step S44. Here, since the variable i is 1, the variable j is 2.

属性間類似度算出部35は、ステップS45において、事例Xk、属性Yjの値をa(k,j)として、属性Yjに対応する列ベクトルVa(j)を生成する。ここでは、属性Y2に対応する列ベクトルVa(j)が生成される。具体的には、属性間類似度算出部35は、分類スコア行列43に基づいて、属性Y2に対応する列ベクトルVa(j)=(0.176, −0.250, 0.051, 0.176, −0.250, 0.051, 0.000, 0.176, −0.250, −0.250)を生成する。   In step S45, the inter-attribute similarity calculation unit 35 generates a column vector Va (j) corresponding to the attribute Yj with the value of the case Xk and the attribute Yj as a (k, j). Here, a column vector Va (j) corresponding to the attribute Y2 is generated. Specifically, the inter-attribute similarity calculation unit 35 determines, based on the classification score matrix 43, the column vector Va (j) = (0.176, −0.250, 0.051, 0,. 176, -0.250, 0.051, 0.000, 0.176, -0.250, -0.250).

属性間類似度算出部35は、ステップS46において、列ベクトルVa(i)と列ベクトルVa(j)の類似度が高い程、値が小さくなるような距離Da(i,j)を求め、属性間類似度行列45の(i,j)成分、及び、(j,i)成分にDa(i,j)を代入する。ここでは、属性Y1と属性Y2との距離Da(1,2)が、属性間類似度行列45の(1,2)成分、及び、(2,1)成分に代入されることになる。   In step S46, the inter-attribute similarity calculation unit 35 obtains a distance Da (i, j) that decreases as the similarity between the column vector Va (i) and the column vector Va (j) increases. Da (i, j) is substituted into the (i, j) component and the (j, i) component of the inter-similarity matrix 45. Here, the distance Da (1, 2) between the attribute Y1 and the attribute Y2 is substituted into the (1, 2) component and the (2, 1) component of the inter-attribute similarity matrix 45.

このような距離Da(i,j)としては、例えば、コサイン類似度に基づく下記の(式2)を用いる。   As such a distance Da (i, j), for example, the following (Formula 2) based on cosine similarity is used.

Da(i,j)=1−(Va(i)・Va(j))/(|Va(i)||Vc(j)|)・・・(式3)
属性間類似度算出部35は、ステップS47において、変数jを1インクリメントし、ステップS48において、変数jが総属性数Nより大きいか否かを判定する。ここでは、変数jが3、総属性数Nが3であるため、属性間類似度算出部35は、変数jが総属性数Nより大きくないと判定し、ステップS45に戻り、同様の処理を繰り返す。
Da (i, j) = 1− (Va (i) · Va (j)) / (| Va (i) || Vc (j) |) (Equation 3)
The inter-attribute similarity calculation unit 35 increments the variable j by 1 in step S47, and determines whether or not the variable j is larger than the total number of attributes N in step S48. Here, since the variable j is 3 and the total number of attributes N is 3, the inter-attribute similarity calculation unit 35 determines that the variable j is not larger than the total number of attributes N, returns to step S45, and performs the same processing. repeat.

すなわち、属性間類似度算出部35は、属性Y1と属性Y3との距離Da(1,3)を求め、属性間類似度行列45の(1,3)成分、及び、(3,1)成分に代入する。   That is, the inter-attribute similarity calculation unit 35 obtains the distance Da (1, 3) between the attribute Y1 and the attribute Y3, and the (1, 3) component and the (3, 1) component of the inter-attribute similarity matrix 45. Assign to.

一方、属性間類似度算出部35は、変数jが総属性数Nより大きいと判定すると、ステップS49において、変数iを1インクリメントし、ステップS50において、変数iが総属性数Nよりも大きいか否かを判定する。ここでは、変数iが2であり、総属性数Nが3であるため、属性間類似度算出部35は、変数iが総属性数Nよりも大きくないと判定し、ステップS43に戻り、同様の処理を繰り返す。   On the other hand, if the similarity calculation unit 35 determines that the variable j is larger than the total number of attributes N, the variable i is incremented by 1 in step S49, and whether the variable i is larger than the total number of attributes N in step S50. Determine whether or not. Here, since the variable i is 2 and the total number of attributes N is 3, the inter-attribute similarity calculation unit 35 determines that the variable i is not greater than the total number of attributes N, and returns to step S43. Repeat the process.

すなわち、属性間類似度算出部35は、属性Y2及び属性Y3についても、同様の処理を行うことで、属性間類似度行列45を生成する。そして、属性間類似度算出部35は、変数iが総属性数Nよりも大きいと判定すると、処理を終了する。   That is, the inter-attribute similarity calculation unit 35 generates the inter-attribute similarity matrix 45 by performing the same process for the attribute Y2 and the attribute Y3. If the attribute similarity calculation unit 35 determines that the variable i is greater than the total number of attributes N, the process ends.

以上の処理により、図12に示す属性間類似度行列45が属性間類似度算出部35によって生成される。属性間類似度行列45は、各属性間の数値が小さい程、各属性間の距離が近い(各属性間が類似している)ことを示している。   Through the above processing, the attribute similarity matrix 45 shown in FIG. 12 is generated by the attribute similarity calculation unit 35. The inter-attribute similarity matrix 45 indicates that the smaller the numerical value between the attributes, the closer the distance between the attributes (the attributes are similar).

以上のように、類似度計算装置11は、複数の事例、及び、複数の事例のそれぞれが複数の属性の値を持つ入力データ41から属性毎に尤度に基づく数値を返す分類器Z1〜Z3を生成しと、入力データ41に生成した分類器Z1〜Z3を適用し、分類器Z1〜Z3から返された数値を代入した分類スコア行列43を生成するようにした。そして、類似度計算装置11は、分類スコア行列43から事例間類似度行列44及び属性間類似度行列45を算出する。この結果、類似度計算装置11は、複数の事例、及び、複数の事例のそれぞれが複数の属性の値を持つデータから、事例間類似度及び属性間類似度を統一的な基準で、かつ効率的に計算することができる。   As described above, the similarity calculation device 11 includes a plurality of cases and classifiers Z1 to Z3 that return numerical values based on likelihood for each attribute from the input data 41 in which each of the plurality of cases has a plurality of attribute values. Is applied to the input data 41, and the classification score matrix 43 is generated by substituting the numerical values returned from the classifiers Z1 to Z3. Then, the similarity calculation device 11 calculates an inter-case similarity matrix 44 and an attribute similarity matrix 45 from the classification score matrix 43. As a result, the similarity calculation device 11 can efficiently calculate the similarity between cases and the similarity between attributes from a plurality of cases and data in which each of the plurality of cases has a plurality of attribute values. Can be calculated automatically.

なお、以上説明した動作を実行するプログラムは、コンピュータプログラム製品として、フレキシブルディスク、CD−ROM等の可搬媒体や、ハードディスク等の記憶媒体に、その全体あるいは一部が記録され、あるいは記憶されている。そのプログラムコードがコンピュータにより読み取られて、動作の全部あるいは一部が実行される。あるいは、そのプログラムの全体あるいは一部を通信ネットワークを介して流通または提供することができる。利用者は、通信ネットワークを介してそのプログラムをダウンロードしてコンピュータにインストールしたり、あるいは記録媒体からコンピュータにインストールすることで、容易に本発明を実現することができる。   The program for executing the operations described above is recorded or stored as a computer program product in its entirety or in part on a portable medium such as a flexible disk or CD-ROM or a storage medium such as a hard disk. Yes. The program code is read by a computer, and all or part of the operation is executed. Alternatively, all or part of the program can be distributed or provided via a communication network. The user can easily implement the present invention by downloading the program via a communication network and installing the program on a computer, or installing the program from a recording medium on the computer.

また、明細書におけるフローチャート中の各ステップは、その性質に反しない限り、実行順序を変更し、複数同時に実行し、あるいは実行毎に異なった順序で実行してもよい。   In addition, each step in the flowcharts in the specification may be executed in a different order for each execution by changing the execution order and executing a plurality of steps at the same time, as long as it does not contradict its nature.

発明のいくつかの実施の形態を説明したが、これらの実施の形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施の形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施の形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

1…類似度計算システム、11…類似度計算装置、12…データベースサーバ、21…制御部、22…ROM、23…RAM、24…入力デバイス、25…出力デバイス、26…通信IF、27…記憶媒体着脱部、28…バス、31…類似度計算処理部、32…分類器生成部、33…評価部、34…事例間類似度算出部、35…属性間類似度算出部、41…入力データ、42…分類器、43…分類スコア行列、44…事例間類似度行列、45…属性間類似度行列。   DESCRIPTION OF SYMBOLS 1 ... Similarity calculation system, 11 ... Similarity calculation apparatus, 12 ... Database server, 21 ... Control part, 22 ... ROM, 23 ... RAM, 24 ... Input device, 25 ... Output device, 26 ... Communication IF, 27 ... Memory | storage Medium attachment / detachment unit, 28 ... bus, 31 ... similarity calculation processing unit, 32 ... classifier generation unit, 33 ... evaluation unit, 34 ... similarity calculation unit between cases, 35 ... similarity calculation unit between attributes, 41 ... input data , 42 ... classifier, 43 ... classification score matrix, 44 ... inter-case similarity matrix, 45 ... inter-attribute similarity matrix.

Claims (9)

複数の事例と、前記複数の事例のそれぞれに対応付けられた複数の属性及び正例と負例とを含むクラスとの組から構成される入力データから、前記クラスに含まれる前記正例の割合と、所定の属性に含まれる所定のカテゴリデータの前記正例の割合とに基づいて、前記カテゴリデータから分類スコアを出力する分類器を前記属性毎に生成する分類器生成部を有することを特徴とする類似度計算装置。   The ratio of the positive examples included in the class from input data including a plurality of cases and a set of a plurality of attributes and classes including positive examples and negative examples associated with each of the plurality of cases. And a classifier generator for generating a classifier for outputting a classification score from the category data for each attribute based on a ratio of the positive examples of predetermined category data included in the predetermined attribute. Similarity calculation device. 前記分類器によって前記入力データに基づいて前記分類スコアを出力し、分類スコア行列を生成する評価部を有することを特徴とする請求項1に記載の類似度計算装置。   The similarity calculation apparatus according to claim 1, further comprising an evaluation unit that outputs the classification score based on the input data by the classifier and generates a classification score matrix. 前記分類スコア行列から各事例に対応付けられた各属性の前記分類スコアに基づいて、事例間類似度を算出する事例間類似度算出部を有することを特徴とする請求項2に記載の類似度計算装置。   The similarity according to claim 2, further comprising an inter-case similarity calculation unit that calculates an inter-case similarity based on the classification score of each attribute associated with each case from the classification score matrix. Computing device. 前記分類スコア行列から各属性に対応付けられた各事例の前記分類スコアに基づいて、属性間類似度を算出する属性間類似度算出部を有することを特徴とする請求項2又は3に記載の類似度計算装置。   The attribute similarity calculation part which calculates the similarity between attributes based on the said classification score of each case matched with each attribute from the said classification score matrix, The Claim 2 or 3 characterized by the above-mentioned. Similarity calculation device. 分類器生成部が生成する分類器は、前記クラスに含まれる前記正例の割合が、前記所定の属性に含まれる前記所定のカテゴリデータの前記正例の割合より小さい場合、正の数値を出力し、前記クラスに含まれる前記正例の割合が、前記所定の属性に含まれる前記所定のカテゴリデータの前記正例の割合より大きい場合、負の数値を出力し、前記クラスに含まれる前記正例の割合が、前記所定の属性に含まれる前記所定のカテゴリデータの前記正例の割合と等しい場合、0を出力することを特徴とする請求項1に記載の類似度計算装置。   The classifier generated by the classifier generator outputs a positive numerical value when the ratio of the positive examples included in the class is smaller than the ratio of the positive examples of the predetermined category data included in the predetermined attribute. When the ratio of the positive examples included in the class is larger than the ratio of the positive examples of the predetermined category data included in the predetermined attribute, a negative numerical value is output, and the positive examples included in the class are output. The similarity calculation apparatus according to claim 1, wherein when the proportion of an example is equal to the proportion of the positive example of the predetermined category data included in the predetermined attribute, 0 is output. 前記分類器生成部が生成する前記分類器は、以下の式を満たすことを特徴とする請求項5に記載の類似度計算装置。
log10P(i,j)−log10Pt
式中のPtは全事例中の正例の割合であり、P(i,j)は所定の属性iに含まれる所定のカテゴリデータjの正例の割合である。
6. The similarity calculation apparatus according to claim 5, wherein the classifier generated by the classifier generation unit satisfies the following expression.
log 10 P (i, j) −log 10 Pt
Pt in the formula is a ratio of positive examples in all cases, and P (i, j) is a ratio of positive examples of predetermined category data j included in the predetermined attribute i.
前記事例間類似度算出部は、前記分類スコア行列から各事例に対応する行ベクトルを生成し、各事例に対応する行ベクトルの類似度が高い程、値が小さくなる距離を求めることで、前記事例間類似度を算出することを特徴とする請求項3に記載の類似度計算装置。   The inter-case similarity calculation unit generates a row vector corresponding to each case from the classification score matrix, and the higher the similarity of the row vector corresponding to each case, the smaller the value becomes, The similarity calculation apparatus according to claim 3, wherein the similarity between cases is calculated. 前記属性間類似度算出部は、前記分類スコア行列から各属性に対応する列ベクトルを生成し、各属性に対応する列ベクトルの類似度が高い程、値が小さくなる距離を求めることで、前記属性間類似度を算出することを特徴とする請求項4に記載の類似度計算装置。   The inter-attribute similarity calculation unit generates a column vector corresponding to each attribute from the classification score matrix, and obtains a distance that decreases as the similarity of the column vector corresponding to each attribute increases. The similarity calculation apparatus according to claim 4, wherein the similarity between attributes is calculated. 複数の事例と、前記複数の事例のそれぞれに対応付けられた複数の属性及びクラスとの組から構成される入力データから、全事例中の前記クラスの正例の割合と、任意の属性に含まれる任意のカテゴリデータの正例の割合とに基づいて、前記カテゴリデータから分類スコアを出力する分類器を前記属性毎に生成するステップを有することを特徴とする類似度計算方法。   From the input data composed of a combination of a plurality of cases and a plurality of attributes and classes associated with each of the plurality of cases, the ratio of positive examples of the class in all cases and included in any attribute And generating a classifier that outputs a classification score from the category data for each of the attributes based on a percentage of positive examples of arbitrary category data.
JP2017125252A 2017-06-27 2017-06-27 Similarity calculation apparatus and similarity calculation method Expired - Fee Related JP6538762B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017125252A JP6538762B2 (en) 2017-06-27 2017-06-27 Similarity calculation apparatus and similarity calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017125252A JP6538762B2 (en) 2017-06-27 2017-06-27 Similarity calculation apparatus and similarity calculation method

Publications (2)

Publication Number Publication Date
JP2019008640A true JP2019008640A (en) 2019-01-17
JP6538762B2 JP6538762B2 (en) 2019-07-03

Family

ID=65028931

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017125252A Expired - Fee Related JP6538762B2 (en) 2017-06-27 2017-06-27 Similarity calculation apparatus and similarity calculation method

Country Status (1)

Country Link
JP (1) JP6538762B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024105824A1 (en) * 2022-11-16 2024-05-23 富士通株式会社 Bias evaluation program, device, and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002149697A (en) * 2000-11-07 2002-05-24 Mitsubishi Electric Corp Similar instance retrieving device
JP2007199902A (en) * 2006-01-25 2007-08-09 National Institute Of Information & Communication Technology Information extraction/display system, information extraction/display method, and information extraction/display program
US20090106705A1 (en) * 2007-10-22 2009-04-23 Sony Computer Entertainment Inc. Data Management Apparatus And Method For Organizing Data Elements Into Multiple Categories For Display
JP2009104338A (en) * 2007-10-22 2009-05-14 Sony Computer Entertainment Inc Data management device and method
JP2010092432A (en) * 2008-10-10 2010-04-22 Nec Corp Data similarity calculation system, method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002149697A (en) * 2000-11-07 2002-05-24 Mitsubishi Electric Corp Similar instance retrieving device
JP2007199902A (en) * 2006-01-25 2007-08-09 National Institute Of Information & Communication Technology Information extraction/display system, information extraction/display method, and information extraction/display program
US20090106705A1 (en) * 2007-10-22 2009-04-23 Sony Computer Entertainment Inc. Data Management Apparatus And Method For Organizing Data Elements Into Multiple Categories For Display
JP2009104338A (en) * 2007-10-22 2009-05-14 Sony Computer Entertainment Inc Data management device and method
JP2010092432A (en) * 2008-10-10 2010-04-22 Nec Corp Data similarity calculation system, method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024105824A1 (en) * 2022-11-16 2024-05-23 富士通株式会社 Bias evaluation program, device, and method

Also Published As

Publication number Publication date
JP6538762B2 (en) 2019-07-03

Similar Documents

Publication Publication Date Title
JP6231944B2 (en) Learning model creation device, determination system, and learning model creation method
US10678765B2 (en) Similarity calculation system, method of calculating similarity, and program
JP6365032B2 (en) Data classification method, data classification program, and data classification apparatus
JP2006252333A (en) Data processing method, data processor and its program
WO2022154897A1 (en) Classifier assistance using domain-trained embedding
JP5638503B2 (en) Text summarization apparatus, method and program
JP2019185244A (en) Learning program and learning method
JP7193000B2 (en) Similar document search method, similar document search program, similar document search device, index information creation method, index information creation program, and index information creation device
WO2018025707A1 (en) Table-meaning estimating system, method, and program
JP6770709B2 (en) Model generator and program for machine learning.
JP5364996B2 (en) Similar user discovery system, similar user discovery method, and similar user discovery program
JPWO2017046976A1 (en) Signal detection device, signal detection method, and signal detection program
JP6538762B2 (en) Similarity calculation apparatus and similarity calculation method
US20130007019A1 (en) Logic operation system
JP6104469B2 (en) Matrix generation device, matrix generation method, and matrix generation program
JP6660333B2 (en) Information extraction device, information extraction method, and information extraction program
JP2020071737A (en) Learning method, learning program and learning device
JP2020160667A (en) Classification device, classification method and classification program
JP7395396B2 (en) Information processing device, information processing method and program
JP2020154504A (en) Information processing apparatus and program
JP5271877B2 (en) Multi-class classification apparatus, multi-class classification method, and multi-class classification program
JP2014038392A (en) Spam account score calculation device, spam account score calculation method and program
JP6612505B2 (en) Splicing processing system, program, and splicing processing method
Nevlydov et al. MEMS accelerometers classification using machine-learning methods
JP2020027549A (en) Argument analyzer and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190410

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190606

R151 Written notification of patent or utility model registration

Ref document number: 6538762

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees