JP5391637B2 - Data similarity calculation system, data similarity calculation method, and data similarity calculation program - Google Patents
Data similarity calculation system, data similarity calculation method, and data similarity calculation program Download PDFInfo
- Publication number
- JP5391637B2 JP5391637B2 JP2008264442A JP2008264442A JP5391637B2 JP 5391637 B2 JP5391637 B2 JP 5391637B2 JP 2008264442 A JP2008264442 A JP 2008264442A JP 2008264442 A JP2008264442 A JP 2008264442A JP 5391637 B2 JP5391637 B2 JP 5391637B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- subset
- class
- similarity
- attribute
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、データ間の類似度を計算するデータ類似度計算システム、データ類似度計算方法およびデータ類似度計算プログラムに関する。 The present invention relates to a data similarity calculation system, a data similarity calculation method, and a data similarity calculation program for calculating a similarity between data.
小売店では、POS(Point of Sales)システムが用いられており、収集された商品の売上データは様々に活用されている。そして、顧客の特徴に基づいて顧客を分類して、売上データを用いて種々の分析を行うシステムが提案されている。例えば、特許文献1には、分析者の意志に従って顧客を分類し、顧客の購買履歴状況を確認可能とするシステムが記載されている。
In a retail store, a POS (Point of Sales) system is used, and the sales data of the collected products is used in various ways. A system has been proposed in which customers are classified based on customer characteristics and various analyzes are performed using sales data. For example,
また、特許文献2には、POSデータを用いて消費者の併売傾向を把握するシステムが記載されている。
また、特許文献3には、各種カテゴリにおける複数の商品を関連づけて登録するための複数の仮想BOXを有するデータベースを備え、顧客に対する推奨商品グループを提示できるシステムが記載されている。
また、データの類似度を求める装置が特許文献4に記載されている。特許文献4に記載された装置は、予め保持されている事例と、与えられた事例(クエリ)との類似度である事例間類似度を計算する。また、保持されている事例(例えば、ある地点の気象データ)にはクラス(例えば、気象データ計測時点から3時間後の天気)が定められている。特許文献4に記載された装置は、保持されている事例から相関ルールを導出する。相関ルールは、条件(事例)に応じた結論(クラス)を導くルールである。そして、相関ルールを用いて、事例間類似度から総合類似度を計算する。
Further,
特許文献4には、「A1,A2,・・・,Ak→B」という形式で表される相関ルールが記載されている。そして、「A1,A2,・・・,Ak,B」はアイテム集合と称されている。また、アイテム集合A1,A2,・・・,Ak,Bを含むレコード数の全レコードに対する比率を、相関ルールの支持度と呼び、アイテム集合A1,A2,・・・,Akを含むレコードの中で、アイテムBを含むレコードの割合を相関ルールの確信度と呼ぶ。特許文献4に記載された装置は、支持度および相関度が予め定められた各々の下限値以上となるような相関ルールを抽出する。
また、自動的にデータを分類する装置が特許文献5に記載されている。特許文献5に記載されたデータ分類装置は、注目パターンデータとの類似度の高い順に複数のパターンデータを取りだし、近傍クラスタを決定する。
An apparatus for automatically classifying data is described in
また、ルールを用いて予測を行う装置として、特許文献6に記載された装置がある。特許文献6に記載された装置は、ある地域(第1の地域)に生じた事象から論理規則を発生し、その規則を他の地域(第2の地域)に適用して、第2の地域でその事象が生じる傾向を予測する。
Moreover, there exists an apparatus described in
特許文献1に記載されたシステムでは、システムのユーザである分析者が、手動で顧客を分類する必要があった。そのため、顧客の購買行動から顧客の分類を自動的に行うことができなかった。また、特許文献3に記載された装置においても、各種カテゴリにおける複数の商品の関連付けを、顧客自身や店員等の商品観察者が行う必要があった。
In the system described in
データの分類を行うために、データ間の類似度を計算し、その類似度を用いてデータを分類することが考えられる。特許文献4に記載された装置は、相関ルールを導出し、総合類似度を計算する。しかし、特許文献4に記載された装置にように相関ルールを導出すると、関連のある属性(特許文献4におけるアイテム)がデータ中に多く存在する場合に、それらの関連のある属性の影響を強く受けてしまい、適切な類似度計算を行えない。
In order to classify data, it is conceivable to calculate the similarity between the data and classify the data using the similarity. The apparatus described in
例えば、図12に示すデータ番号1〜10の10個のデータが与えられているとする。図12に示すデータにおいて、データ番号1〜4およびデータ番号6は、属性b,c,d,eの値が共通であり、データの類別を表すクラスも共通である。従って、データの属性値を条件部としてクラスを結論部とする相関ルールを抽出する場合、多くのデータ間で属性値の組み合わせが共通となっている属性b,c,d,eの影響を強く受けてしまう。この結果、類似度も、関連のある特定の属性に影響されてしまう。すなわち、ある属性の属性値がある値に合致しているデータ間の類似度が比較的高くなり、合致していないデータ間の類似度は比較的低くなる傾向が出てしまう。
For example, it is assumed that ten pieces of data with
そこで、本発明は、データを分類するためにデータ間の類似度を求める際に、データ中に互いに関連のある属性が多く存在してもそれらの関連のある属性の影響を強く受けることなく類似度を求めることができるデータ類似度計算システム、データ類似度計算方法およびデータ類似度計算プログラムを提供することを目的とする。 Therefore, according to the present invention, when determining the similarity between data for classifying data, even if there are many attributes related to each other in the data, they are similar without being strongly influenced by those related attributes. It is an object to provide a data similarity calculation system, a data similarity calculation method, and a data similarity calculation program capable of obtaining a degree.
本発明によるデータ類似度計算システムは、データの特徴を示す属性とデータの類別を示すクラスとを含むデータの集合から、データの重複を許してその集合の部分集合を複数回生成する部分集合生成手段と、部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、部分集合に基づいて生成する分類器生成手段と、分類器が生成される毎に、分類器を用いて、部分集合に属する個々のデータのクラスを判定するクラス判定手段と、データの集合の部分集合が生成され、クラス判定手段がその部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出手段とを備えることを特徴とする。 A data similarity calculation system according to the present invention is a subset generation for generating a subset of a plurality of times by allowing data duplication from a set of data including an attribute indicating data characteristics and a class indicating data classification. A classifier that is a rule for determining a class from an attribute each time a subset is generated, a classifier generating means that generates a classifier based on the subset, and a classifier that is generated each time a classifier is generated. A class determination unit that determines a class of individual data belonging to the subset, and a subset of the data set is generated, and when the class determination unit determines a class of individual data that belongs to the subset, It is characterized by comprising similarity calculation means for adding a value to the similarity between data determined to be the same class.
本発明によるデータ類似度計算方法は、部分集合生成手段が、データの特徴を示す属性とデータの類別を示すクラスとを含むデータの集合から、データの重複を許してその集合の部分集合を複数回生成する部分集合生成ステップと、分類器生成手段が、部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、部分集合に基づいて生成する分類器生成ステップと、クラス判定手段が、分類器が生成される毎に、分類器を用いて、部分集合に属する個々のデータのクラスを判定するクラス判定ステップと、類似度算出手段が、データの集合の部分集合が生成され、クラス判定ステップでその部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出ステップとを含むことを特徴とする。 In the data similarity calculation method according to the present invention, the subset generation means allows a plurality of subsets of the set by allowing data duplication from a set of data including an attribute indicating data characteristics and a class indicating data classification. A sub-set generation step, and a classifier generation unit that generates a classifier that is a rule for determining a class from an attribute each time a sub-set is generated, based on the sub-set, class determination means, each time the classifier is generated, by using the classifier, and each class determining step of determining the class of data belonging to the subset, the similarity calculation means, a subset of the set of data A similarity calculation that adds a value to the similarity between data determined to be the same class when the class of individual data belonging to the subset is determined in the class determination step Characterized in that it comprises a step.
本発明によるデータ類似度計算プログラムは、コンピュータに、データの特徴を示す属性とデータの類別を示すクラスとを含むデータの集合から、データの重複を許してその集合の部分集合を複数回生成する部分集合生成処理、部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、部分集合に基づいて生成する分類器生成処理、分類器が生成される毎に、分類器を用いて、部分集合に属する個々のデータのクラスを判定するクラス判定処理、および、データの集合の部分集合が生成され、クラス判定処理でその部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出処理を実行させることを特徴とする。 A data similarity calculation program according to the present invention allows a computer to generate a plurality of subsets of a set of data by allowing duplication of data from a set of data including an attribute indicating data characteristics and a class indicating data classification. Each time a subset is generated, a classifier that is a rule for determining a class from an attribute every time a subset is generated, a classifier generation process that generates a classifier based on the subset, and every time a classifier is generated, a classifier Class determination processing that determines the class of individual data that belongs to the subset using, and a subset of the data set is generated, and the class determination processing determines the class of individual data that belongs to the subset Further, a similarity calculation process for adding a value to the similarity between data determined to be the same class is executed.
本発明によれば、データを分類するためにデータ間の類似度を求める際に、データ中に互いに関連のある属性が多く存在してもそれらの関連のある属性の影響を強く受けることなく類似度を求めることができる。 According to the present invention, when determining the similarity between data in order to classify the data, even if there are many attributes related to each other in the data, they are similar without being strongly influenced by these related attributes. Degree can be obtained.
以下、本発明の実施形態を図面を参照して説明する。
ここでは、商品やサービスの顧客に関するデータ間の類似度を求める場合を例にして本発明の実施形態を説明する。なお、有料で商品やサービスを利用する者だけでなく、無料で商品やサービスを利用する者や、今後商品やサービスを利用すると思われる人も顧客と呼ぶ。無料の場合は、売価は0とする。また、商品またはサービスの概念としては、製品等の完成品だけでなく、製品の機能を維持するための最小単位も含まれる。さらに、ある商品またはサービスのカテゴリを1つの商品と考えて適用することもできる。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
Here, the embodiment of the present invention will be described by taking as an example the case of obtaining the similarity between data related to customers of products and services. In addition, not only those who use products and services for a fee, but also those who use products and services for free, and those who will use the products and services in the future are called customers. In the case of free, the selling price is 0. The concept of goods or services includes not only a finished product such as a product but also a minimum unit for maintaining the function of the product. Furthermore, a certain product or service category can be considered as one product and applied.
実施形態1.
図1は、本発明の第1の実施形態の例を示すブロック図である。本発明によるデータ類似度計算システム1は、部分集合生成部11と、分類器生成部12と、自己評価部13と、類似度算出部14とを備える。
FIG. 1 is a block diagram showing an example of the first embodiment of the present invention. The data
部分集合生成部11は、データの集合から、その集合の部分集合を生成する。データの集合は、例えば、データ類似度計算システム1に設けられたキーボード等の入力装置(図示せず)を介して入力されればよいが、データの集合の入力態様は特に限定されない。以下、データの集合とは、データ全体の集合を意味する。
The
データの集合に含まれる個々のデータは、データの特徴を示す属性と、データの類別を示すクラスとを含む。ここでは、少なくとも顧客の特徴または販売条件をデータの特徴とし、顧客の行動をクラスとする場合を例にして説明する。図2は、データの例を示す説明図である。図2に示す例では、「天気」、「気温」、「湿度」、「風が強いか否か」を属性とする場合を示している。これらの属性は、販売条件であるが、「年齢」、「性別」等の顧客の特徴を属性としてもよく、顧客の特徴および販売条件がいずれも属性となっていてもよい。また、図2に示す例では、顧客の行動は、「購入する」と「購入しない」の2種類であるものとし、データも「購入する」および「購入しない」という2種類のクラスに類別される場合を例にする。図2に例示するデータは、属性が示す条件の下で、ある商品またはサービスを顧客が購入したか否かを表している。例えば、図1に示す1番目のデータは、「晴れ」、気温「29度」、湿度「85%」、「風が強くない」という条件の下で、顧客が購入しなかったということを表している。 Each piece of data included in the data set includes an attribute indicating data characteristics and a class indicating data classification. Here, a case where at least customer characteristics or sales conditions are data characteristics and customer behavior is a class will be described as an example. FIG. 2 is an explanatory diagram illustrating an example of data. In the example illustrated in FIG. 2, “weather”, “temperature”, “humidity”, and “whether wind is strong” are used as attributes. These attributes are sales conditions, but customer characteristics such as “age” and “gender” may be used as attributes, and both customer characteristics and sales conditions may be attributes. In the example shown in FIG. 2, there are two types of customer behavior, “Purchase” and “Do not purchase”, and the data is also classified into two classes, “Purchase” and “Do not purchase”. For example, The data illustrated in FIG. 2 represents whether a customer has purchased a certain product or service under the condition indicated by the attribute. For example, the first data shown in FIG. 1 represents that the customer did not purchase under the conditions of “sunny”, temperature “29 ° C.”, humidity “85%”, and “not strong wind”. ing.
部分集合生成部11は、このようなデータの集合から一部のデータを選択することで、データの集合の部分集合を生成する。また、部分集合生成部11は、部分集合を複数回生成する。このとき、データの重複を許して部分集合を生成する。すなわち、部分集合生成部11によって生成されたある部分集合と別の部分集合に、同じデータが属していてもよい。
The
分類器生成部12は、データの集合の部分集合が生成される毎に、その部分集合に基づいて分類器を生成する。分類器は、属性からクラスを判定するルールである。部分集合と、その部分集合に基づいて生成された分類器とが対応する。
Each time a subset of a data set is generated, the
自己評価部13は、分類器が生成される毎に、生成された分類器を用いて、その分類器に対応する部分集合に属する個々のデータのクラスを判定する。この判定は、分類器を用いて、個々のデータに含まれる属性からクラスを予測する処理であるということもできる。なお、自己評価部13が判定したクラス(換言すれば、予測したクラス)と、データにおいて予め定められたクラスとが合致するとは限らない。
Each time a classifier is generated, the self-
類似度算出部14は、自己評価部13で判定されたクラスに基づいて、部分集合に属する個々のデータ間の類似度を算出する。データの集合に属する任意のデータ同士の組み合わせに対して、予め類似度の初期値0が設定される。類似度算出部14は、部分集合生成部11によって部分集合が生成され、自己評価部13がその部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ間の類似度に値を加算していくことによって、各データ間の類似度を算出する。
The
部分集合生成部11、分類器生成部12、自己評価部13および類似度算出部14は、例えば、プログラム(データ類似度計算プログラム)に従って動作するCPUによって実現される。その場合、プログラムは、例えばデータ類似度計算システム1が備えるプログラム記憶装置(図示せず)に記憶され、CPUがプログラムを読み込み、そのプログラムに従って部分集合生成部11、分類器生成部12、自己評価部13および類似度算出部14として動作すればよい。
The
次に、動作について説明する。
図3は、第1の実施形態のデータ類似度計算システムの処理経過の例を示すフローチャートである。例えば、データ類似度計算システム1に設けられたキーボード等の入力装置(図示せず)を介して、データの集合が入力されると、データ類似度計算システムは以下のように動作する。ただし、データの集合に属する個々のデータ(個別データと称する)の数をNとする。また、データの集合の部分集合を生成する回数をTとする。Tは、例えば、100、500、1000等の数であるが、Tはこれらの値に限定されない。また、部分集合生成部11が1つの部分集合に属する個別データとしてデータの集合から選択する個別データの数をMとする。Mは、例えば、Nの1%、5%、または10%等の値とすればよいが、Mはこれらの値に限定されない。部分集合の生成を繰り返す繰り返し回数であるTや、部分集合に含める個別データ数であるMは、それぞれ、キーボード等の入力装置(図示せず)を介して、データ類似度計算システムのユーザによって入力されてもよい。あるいは、他の態様でT,Mが指定されてもよい。
Next, the operation will be described.
FIG. 3 is a flowchart illustrating an example of processing progress of the data similarity calculation system according to the first embodiment. For example, when a set of data is input via an input device (not shown) such as a keyboard provided in the data
また、データの集合に属する個別データを順番に指定するための第1の変数をiとし、第2の変数をjとする。iは、1≦i≦Nを満たす整数であり、同様に、jは、1≦j≦Nを満たす整数である。i,jを指定することでそれぞれ個別データを指定することができ、i,jの組み合わせによって一対の個別データの組を指定することができる。i,jによって指定される1対の個別データの類似度をSim(i,j)と記す。 Further, the first variable for designating the individual data belonging to the data set in turn is i, and the second variable is j. i is an integer that satisfies 1 ≦ i ≦ N. Similarly, j is an integer that satisfies 1 ≦ j ≦ N. Individual data can be designated by designating i and j, and a pair of individual data can be designated by a combination of i and j. The similarity of a pair of individual data designated by i, j is denoted as Sim (i, j).
最初に、部分集合生成部11は、1≦i≦Nの範囲のiと、1≦j≦Nの範囲のjとによって定められるiとjの組み合わせを順次定め、その各組み合わせに応じた各類似度Sim(i,j)を0に初期化する(ステップA1)。すなわち、i番目の個別データとj番目の個別データとの類似度となるSim(i,j)を、i,jの組み合わせ毎に0に初期化する。換言すれば、部分集合生成部11は、データの集合に属する全ての個別データから得られる一対の個別データの各組について、個別データ間の類似度を0に初期化する。
First, the
次に、部分集合生成部11は、データの集合から部分集合を生成した回数を表す変数tを0に初期化する(ステップA2)。
Next, the
続いて、部分集合生成部11は、変数tと、Tとを比較し、tがT未満であるか否かを判定する(ステップA3)。変数tがT以上であるならば(ステップA3におけるNo)、処理を終了する。また、変数tがT未満であるならば(ステップA3におけるYes)、部分集合生成部11は、データの集合からM個の個別データを選択することによって部分集合を生成する(ステップA4)。すなわち、部分集合の要素となるM個の個別データをデータの集合から選択すればよい。ステップA4の処理はtの値がインクリメントされる毎に行われるが、2回目以降の部分集合の生成時において、新たに生成する部分集合に属する個別データと、既に生成された部分集合に属する個別データとが重複していてもよい。このように、部分集合生成部11は、部分集合同士での個別データの重複を許して部分集合を生成する。
Subsequently, the
ステップA4において、データの集合から個別データを選択する際に、例えば、個別データをランダムサンプリングしてもよい。すなわち、部分集合生成部11は、データの集合から1個の個別データをランダムに選択することをM回繰り返すことによって、M個の個別データを選択してもよい。
In step A4, when selecting individual data from a set of data, for example, the individual data may be randomly sampled. That is, the
ただし、M個の個別データの選択方法はランダムサンプリングに限定されない。例えば、部分集合生成部11は、最初にステップA4を実行するときには、1番目からM番目までの個別データを選択し、次にステップA4を実行するときには、M+1番目から2・M番目までの個別データを選択するというように、個別データに予め定められた順番に従って、ステップA4毎にM個ずつ個別データを選択してもよい。
However, the selection method of M pieces of individual data is not limited to random sampling. For example, the
なお、部分集合に含める個別データは、データの集合に属する個別データに含まれる属性のうち一部の属性と、クラスを抽出したデータであってもよい。例えば、図2に示す例では、個別データには「天気」、「天候」、「湿度」、「風が強いか否か」という4つの属性が含まれているが、部分集合に含める個別データを選択するときには、この4つの個別データのうちの一部(例えば、「天気」、「天候」のみ)と、クラスとを抽出し、その属性およびクラスからなるデータを部分集合の要素としてもよい。データの集合に属する個別データに含まれる属性がA個であるとき、部分集合に属する個別データに含まれる属性をいくつにするか、また、どの属性を部分集合に属する個別データに含めるかについては、例えば、キーボード等の入力装置(図示せず)を介して、データ類似度計算システムのユーザによって入力されてもよいし、他の態様で指定されてもよい。 The individual data included in the subset may be data obtained by extracting a part of the attributes included in the individual data belonging to the data set and the class. For example, in the example shown in FIG. 2, the individual data includes four attributes “weather”, “weather”, “humidity”, and “whether the wind is strong”, but the individual data included in the subset Is selected, a part of the four individual data (for example, “weather” and “weather” only) and a class may be extracted, and the data including the attribute and the class may be used as a subset element. . When there are A attributes included in the individual data belonging to the data set, how many attributes are included in the individual data belonging to the subset, and which attributes are included in the individual data belonging to the subset? For example, it may be input by the user of the data similarity calculation system via an input device (not shown) such as a keyboard, or may be specified in another manner.
ステップA4の後、分類器生成部12は、直前のステップA4で生成された部分集合に基づいて分類器を生成する(ステップA5)。分類器として、例えば決定器やサポートベクタマシンを生成すればよい。どのような分類器を用いるかについては、キーボード等の入力装置(図示せず)を介して、データ類似度計算システムのユーザによって入力されてもよいし、他の態様で指定されてもよい。
After step A4, the
以下、分類器として決定木を用いる場合を例にして、分類器の具体例を説明する。本例では、「購入する、購入しない」をクラスとし、「天気」、「気温」、「湿度」、「風が強いか否か」を属性とする場合を例にして説明する。また、ここでは、図2に示す14個の個別データからなる部分集合が生成されている場合を例にする。図4は、分類器の例を示す説明図であり、ここでは、決定木を分類器としている。図2に示すような既知の属性およびクラスの組み合わせがあれば、その既知の属性およびクラスから決定木を生成することができる。以下の説明において、属性の値(すなわち属性値)に応じて、決定木におけるノードを枝分かれさせることを分割という。 Hereinafter, a specific example of the classifier will be described by taking a case where a decision tree is used as the classifier as an example. In this example, a case where “purchased or not purchased” is a class and “weather”, “temperature”, “humidity”, and “whether or not wind is strong” is described as an example. Further, here, a case where a subset composed of 14 pieces of individual data shown in FIG. 2 is generated is taken as an example. FIG. 4 is an explanatory diagram showing an example of a classifier. Here, a decision tree is used as a classifier. If there is a combination of known attributes and classes as shown in FIG. 2, a decision tree can be generated from the known attributes and classes. In the following description, branching a node in a decision tree according to an attribute value (that is, an attribute value) is called division.
図2に示す例では、各行が、「購入する」または「購入しない」というクラスが付された個別データに相当する。また、説明を簡単にするため、「購入する」というクラスを正(+)のクラスと表し、「購入しない」というクラスを負(−)のクラスと表す場合がある。決定木では、クラス毎(例えば、「購入する(正)」、「購入しない(負)」というクラス毎)に個別データ数をまとめた情報をノードとする。例えば、図2に示すルートのノードでは、「する:9,しない:5」という情報をノードとしている。 In the example illustrated in FIG. 2, each row corresponds to individual data to which a class “purchase” or “do not purchase” is attached. In order to simplify the description, a class “purchase” may be represented as a positive (+) class, and a class “not purchased” may be represented as a negative (−) class. In the decision tree, information that summarizes the number of individual data for each class (for example, “purchase (positive)”, “not purchase (negative)” for each class) is used as a node. For example, in the node of the route shown in FIG. 2, the information “Yes: 9, No: 5” is used as the node.
分類器生成部12は、ステップA4で生成された部分集合が与えられると、どの属性で最初にルートのノードを分割させるかを決定する。また、個別データに含まれている属性の個数をR個とした場合、各属性を属性1〜Rとする。このとき、分類器生成部12は、属性1〜Rの各属性について、分割時の評価値を計算し、その評価値が最大の属性を、分割に最も適した属性として選択する。ここでは、分割前のノードのエントロピーと、分割後のエントロピーの差を評価値とする場合を例にするが、他の計算方法で評価値を求めてもよい。ノードのエントロピーは、クラスが正(+)の個別データの割合をqとし、クラスが負(−)の個別データの割合を1−qとすると、−qlogq−(1−q)log(1−q)で表される。分割後のノードのエントロピーは、分割後の各ノードのエントロピーの加重平均である。
Given the subset generated in step A4, the
例えば、ステップA4で生成された部分集合において、「正」が9データあり、「負」が5データあるとするとルートのノードは「正:9,負:5」となる。この場合、正(+)のデータが9データあり、負(−)のデータが5データあるので、ルートのノードのエントロピーは、−(9/14)×log(9/14)−(5/14)×log(5/14)=0.940となる。ただし、本例ではlogの底を2とする。 For example, in the subset generated in step A4, if “positive” has 9 data and “negative” has 5 data, the root node is “positive: 9, negative: 5”. In this case, since there are nine positive (+) data and five negative (-) data, the entropy of the root node is-(9/14) * log (9/14)-(5 / 14) × log (5/14) = 0.940. However, in this example, the bottom of the log is 2.
分類器生成部12は、一つの属性でルートのノードを分割して得られるノードを求める。すなわち、その属性の属性値毎に、正および負の個別データ数を表す情報(ノード)を生成する。例えば、その属性1のとり得る値が「0」または「1」であり、属性1の値が「0」のときには、正が5データあり、負が2データあるとし、属性1の値が「1」のときには、正が0データあり、負が7データあるとする。この場合、属性1の値が「0」か「1」かで分岐するノードとして、「正:5,負:2」というノードと、「正:0,負:7」というノードとを生成する。分類器生成部12は、分割後の各ノードのエントロピーを計算し、分割後の各ノードにおける正または負としてカウントされる個別データ数に応じて各ノードのエントロピーの加重平均を求める。上記の例では「正:5,負:2」というノードにおいても、「正:0,負:7」というノードにおいても個別データの総数は7であるので、加重平均を行う際の重み付け係数は各ノードでいずれも(7/14)となる。従って、本例の場合、分類器生成部12は、分割後のエントロピーを以下のように計算する。
The
(7/14)×{−(5/7)×log(5/7)−(2/7)×log(2/7)}
+(7/14)×{−(0/7)×log(0/7)−(7/7)×log(7/7)}
=0.432
(7/14) × {− (5/7) × log (5/7) − (2/7) × log (2/7)}
+ (7/14) × {− (0/7) × log (0/7) − (7/7) × log (7/7)}
= 0.432
ただし、logの係数が0となる場合、その項の値は0とする。上記の例では、−(0/7)×log(0/7)の値は0としている。 However, when the log coefficient is 0, the value of the term is 0. In the above example, the value of − (0/7) × log (0/7) is 0.
従って、本例の場合、分類器生成部12は、属性1で分割した場合の評価値を、0.940−0.432=0.508と計算する。
Therefore, in the case of this example, the
分類器生成部12は、属性1だけでなく、他の属性についても同様に、その属性で分割したときの評価値を計算し、評価値が最大となる属性で分割すると決定する。このようにして、ルートのノードを分割する属性を決定する。
The
なお、上記の属性1の例では、属性1のとり得る値が「0」または「1」の二つだけである場合を示した。属性値が年齢であり、その値が20,21,22のように連続する値の場合には、どの属性値で分割させるのかも決める。この場合、分類器生成部12は、各属性値間の中間値をしきい値とし、各しきい値毎に、その「しきい値以下」および「そのしきい値より大」とに分割させた場合の評価値を求める。そして、評価値が最大となる場合を選択することによって、どの属性値で分割させるのかも決定する。例えば、属性値が20,21,22,・・・と連続する場合では、「20.5以下」および「20.5より大」で分割した場合の評価値、「21.5以下」および「21.5より大」で分割した場合の評価値等をそれぞれ計算し、評価値が最も高くなるように分割すればよい。
In the example of the
分類器生成部12は、分割後の各ノードについても、上記と同様の処理を行い、次にどの属性で分割するのかを決定する処理を順次、繰り返す。また、分類器生成部12は、所定の条件が満たされたときには、ノードの分割を停止する。所定の条件とは、例えば、「ノードにおける個別データのクラスが全て同じになる」という条件や、「ノードにおける正または負としてカウントされる個別データ数が所定数(例えば2)以下になる」という条件を用いてよい。前者の条件を採用すると、ノードにおける個別データが全て正または負になると、そのノードの分割を継続しない。このように、分類器生成部12は、ルートのノードから順次、分割を繰り返し、木構造の決定木を生成する。
The
また、分類器生成部12は、上記のように、木構造の決定木を生成した後、その決定木に対する枝刈りを行う。決定木において、分割されて生成された最終的なノードを葉と呼ぶ。ある葉に分類されたデータ数がDであるとする(すなわち、正または負としてカウントされる個別データ数がDであるとする)。この葉に分類されたDデータ中、Eデータが誤りであるとする。この仮定では、D回の試行中、誤りという事象をE回観測したとみなし、大きさDの標本で、誤りという事象が起きる確率がrである二項分布と考えることができる。予め与えられた信頼度CFに対して、rの上限をU_CF(E,D)と表すことにすると、Dデータでの誤りの発生する期待値は、D×U_CF(E,D)となる。分類器生成部12は、子のノードが全て葉である親のノードに対し、親における誤りの期待値(誤りの発生する期待値)と、子である葉の誤りの期待値の合計とを比較する。そして、子での期待値の合計の方が親の誤りの期待値よりも大きければ、分類器生成部12は、葉を縮退して、その親を葉とする。分類器生成部12は、この処理を順次繰り返すことで、決定木全体の葉の枝刈りを行う。
Further, as described above, the
葉を縮退する場合、分類器生成部12は、葉を削除して、その削除した葉の親のノードを葉とすればよい。例えば、図4に例示する決定木において、「湿度」という属性の値に応じて分割したノードを縮退する場合、分類器生成部12は、湿度の属性値が70%以下となっている個別データ数を表すノード「する:2,しない:0」と、湿度の属性値が70%より高くなっている個別データ数を表すノード「する:0,しない:3」とを削除して、その2つのノードの親ノード「する:2,しない:3」を葉とすればよい。
When degenerating a leaf, the
分類器として決定木を生成する場合、例えば、上記のように、決定木を定めて枝刈りを行うことで、決定木を生成すればよい。 When generating a decision tree as a classifier, for example, a decision tree may be generated by determining and pruning a decision tree as described above.
分類器生成部12は、ステップA4で生成された部分集合に属するデータのうち、特定のクラスのデータを重く加重してから決定木を生成してもよい。ここで、加重とは、データに対する重みを設定することである。例えば、部分集合に属するデータのうち、予め定められた特定のクラスの個別データの数が数倍になるように、そのクラスの個別データの複製を作成することで、加重を行ってもよい。なお、特定のクラスの個別データ数を何倍にするかは予め定めておけばよい。そして、特定のクラスの個別データ数を増やすように、そのクラスの個別データを複製した後に、分類器を生成してもよい。加重の対象とするクラスおよび加重量(例えば、データを何倍に増やすか等)は、キーボード等の入力装置(図示せず)を介してデータ類似度計算システムのユーザにより入力されてもよいし、他の様態で指定されてもよい。
The
ステップA5で分類器が生成されると、自己評価部13は、その分類器を用いて、ステップA3で生成された部分集合に属する個々のデータのクラスを判定する(ステップA6)。ここでも、分類器が決定木である場合を例にして説明する。分類器となる決定木を生成した場合、その決定木と、既知の属性(部分集合に属する個別データの属性)とから、クラスを予測する。このとき、自己評価部13は、決定木のルートのノードを起点として、ノードを分割する際に用いた属性に関して個別データの属性値を参照し、その属性値に応じて子ノードを辿る。自己評価部13は、子ノードを辿っていき、葉のノードまで辿ったならば、葉のノードでカウント数の多い方のクラスを、分類器を用いた判定の結果とすればよい。
When a classifier is generated in step A5, the self-
図5は、分類器から判定されたクラスの例を示す説明図である。図5に示す各属性の属性値は、図2に示す各属性値と同一である。また、図5では、図4に例示する決定木(分類器)を用いて、その属性値からクラスを判定した結果を示している。例えば、個別データにおける属性「天気」の属性値が「雨」であるとする。すると、ルートのノードから、「する:3、しない:2」という子ノードを辿る(図4参照)。そのノードが葉であるので、自己評価部13は、「する:3、しない:2」というカウント数により、「購入しない」というクラスであると判定する。このように判定した結果、図5に示す6番目および最後の個別データのクラスの判定結果は、図2に示す元のクラスと異なっている(図2、図5参照)。
FIG. 5 is an explanatory diagram illustrating an example of classes determined from the classifier. The attribute values of the attributes shown in FIG. 5 are the same as the attribute values shown in FIG. FIG. 5 shows the result of determining a class from its attribute value using the decision tree (classifier) illustrated in FIG. For example, it is assumed that the attribute value of the attribute “weather” in the individual data is “rain”. Then, the child node “Yes: 3, No: 2” is traced from the root node (see FIG. 4). Since the node is a leaf, the self-
ステップA6で部分集合に属する各個別データのクラスが判定された後、類似度算出部14は、データの集合に属する個別データを順番に指定するための第1の変数iを1に初期化する(ステップA7)。続いて、類似度算出部14は、変数iの値が個別データの総数N以下であるか否かを判定する(ステップA8)。変数iの値がNを超えていれば(ステップA8におけるNo)、変数tを1インクリメントし(ステップA8)、その後、データ類似度計算システムはステップA3以降の処理を再度繰り返す。
After the class of each individual data belonging to the subset is determined in step A6, the
変数iの値がN以下であるならば(ステップA8におけるYes)、類似度算出部14は、変数iによって定まるi番目の個別データが、直近のステップA4で生成された部分集合に含まれているか否かを判定する(ステップA10)。i番目のデータが部分集合に含まれていないならば(ステップA10におけるNo)、類似度算出部14は、変数iを1インクリメントし(ステップA11)、ステップA8以降の処理を再度繰り返す。
If the value of the variable i is N or less (Yes in step A8), the
i番目のデータが部分集合に含まれているならば(ステップA10におけるYes)、データの集合に属する個別データを順番に指定するための第2の変数jの値をi+1に設定する(ステップA12)。すなわち、jにi+1を代入する。 If the i-th data is included in the subset (Yes in step A10), the value of the second variable j for sequentially specifying individual data belonging to the data set is set to i + 1 (step A12). ). That is, i + 1 is substituted for j.
ステップA12の後、類似度算出部14は、変数jの値がN以下であるか否かを判定する(ステップA13)。変数jの値がNを超えていれば(ステップA13におけるNo)、類似度算出部14は、変数iを1インクリメントし(ステップA11)、ステップA8以降の処理を再度繰り返す。
After step A12, the
変数jの値がN以下であるならば(ステップA13におけるYes)、類似度算出部14は、変数jによって定まるj番目の個別データが、直近のステップA4で生成された部分集合に含まれているか否かを判定する(ステップA14)。j番目の個別データが部分集合に含まれていないならば(ステップA14におけるNo)、類似度算出部14は、変数jを1インクリメントし(ステップA17)、ステップA13以降の処理を繰り返す。
If the value of the variable j is N or less (Yes in step A13), the
j番目の個別データが部分集合に含まれているならば(ステップA14におけるYes)、類似度算出部14は、i番目の個別データの属性から判定されたクラス(PredCiと記す)と、j番目の個別データの属性から判定されたクラス(PredCjと記す)とをとを比較し、両者が同じクラスであるか否かを判定する(ステップA15)。PredCiおよびPredCjは、直近のステップA6で、i番目およびj番目の個別データについて、分類器を用いて属性から判定されたクラスである。PredCiとPredCjとが同じクラスであるということは、i番目の個別データおよびj番目の個別データが、同一のクラスと判定されたデータ同士であるということを意味する。
If the j-th individual data is included in the subset (Yes in Step A14), the
PredCiとPredCjとが異なっていれば(ステップA15におけるNo)、類似度算出部14は、変数jを1インクリメントし(ステップA17)、ステップA13以降の処理を繰り返す。
If PredC i and PredC j are different (No in Step A15), the
PredCiとPredCjとが同じクラスであれば(ステップA15におけるYes)、i番目の個別データとj番目の個別データの類似度Sim(i,j)に所定数を加算する(ステップA16)。本例では、この所定数を1とし、ステップA16でSim(i,j)に1を加算する場合を例にする。ステップA16の後、類似度算出部14は、変数jを1インクリメントし(ステップA17)、ステップA13以降の処理を繰り返す。
If PredC i and PredC j are the same class (Yes in step A15), a predetermined number is added to the similarity Sim (i, j) between the i-th individual data and the j-th individual data (step A16). In this example, the predetermined number is set to 1, and 1 is added to Sim (i, j) in step A16. After step A16, the
上記のように、1つの部分集合が生成されたとき、その部分集合に属している1対の個別データであって、PredCiとPredCjとが同じクラスとなっている個別データ間の類似度Sim(i,j)の値を1増加させていく。また、一方あるいは両方が部分集合に属していない個別データ同士の場合には、ステップA16に移行しないので、その個別データ間の類似度は増加しない。また、部分集合に属している1対の個別データであっても、属性から判定されたクラスが異なる場合にも、ステップA16に移行せず、その個別データ間の類似度は増加しない。 As described above, when one subset is generated, a pair of individual data belonging to the subset, and the degree of similarity between individual data in which PredC i and PredC j are in the same class The value of Sim (i, j) is increased by 1. Further, in the case of individual data that does not belong to a subset, one or both of them does not move to step A16, so the similarity between the individual data does not increase. Even if a pair of individual data belonging to the subset is different in class determined from the attribute, the process does not proceed to step A16, and the similarity between the individual data does not increase.
そして、データ類似度計算システムは、変数tをインクリメントして(ステップA8)、部分集合を生成すると(ステップA4)、ステップA5以降の処理を実行する。このとき、各個別データの組について一律にステップA16の処理を実行するわけではない。個別データの重複を許して部分集合の生成を複数回生成したときに、ステップA16が行われた回数の多い個別データの組については、Sim(i,j)の値も大きくなる。一方、ステップA16が行われた回数の少ない個別データの組については、Sim(i,j)の初期値からの増加量は少ない。部分集合の生成回数tが上限値Tに達したときにおける各データの対毎のSim(i,j)が、対をなす個別データ間の類似度となる。 Then, the data similarity calculation system increments the variable t (step A8), generates a subset (step A4), and executes the processing after step A5. At this time, the processing of step A16 is not uniformly executed for each set of individual data. When a subset is generated a plurality of times while allowing duplication of individual data, the value of Sim (i, j) is also increased for a set of individual data for which step A16 has been performed many times. On the other hand, the increment from the initial value of Sim (i, j) is small for the set of individual data in which step A16 is performed a small number of times. Sim (i, j) for each pair of data when the number of generations t of the subset reaches the upper limit value T is the similarity between the paired individual data.
また、上記の第1の実施の形態では、二つのデータがいずれも部分集合に属し、その二つのデータに対して判定されたクラスが同一であるという条件が満たされたときに、その二つのデータ類似度Sim(i,j)に対して所定値を加算する。この条件だけでなく、さらに、二つのデータに対して判定されたクラスが特定のクラス(例えば、「購入する」)であるという条件を満たしている場合に、二つのデータ類似度Sim(i,j)に対して所定値を加算し、他の場合には、Sim(i,j)への加算を行わなくてもよい。この場合、二つのデータに対するクラスの判定結果が同一であっても、そのクラスが特定のクラス出ない場合、類似度に対する加算を行わない。 In the first embodiment, when two data belong to a subset and the conditions determined for the two data are the same, the two data are satisfied. A predetermined value is added to the data similarity Sim (i, j). In addition to this condition, two data similarities Sim (i, i, i) are satisfied when the condition determined for the two data is a specific class (for example, “purchase”). A predetermined value is added to j), and in other cases, addition to Sim (i, j) may not be performed. In this case, even if the class determination results for the two data are the same, if the class does not come out of a specific class, the addition to the similarity is not performed.
上記のように類似度を求める場合、類似度算出部14は、ステップA15において、PredCiとPredCjとが同一であり、かつ、PredCiおよびPredCjが特定のクラス(例えば、「購入する」)であるか否かを判定すればよい。そして、この条件を満たしている場合に、ステップA16を行い、満たしていない場合には、ステップA17に移行すればよい。
When calculating the similarity as described above, the
次に、第1の実施形態の効果について説明する。
第1の実施形態によれば、与えられたデータの集合に属するデータ同士の組に対して、それぞれ類似度の初期値を定める。そして、そのデータの集合から部分集合を生成し、その部分集合に含まれる各データに定められている属性(例えば、顧客の特徴や販売条件)およびクラスから、分類器を生成する。さらに、分類器を用いて、その属性からクラスを判定し、部分集合に含まれているデータ同士であって、判定されたクラスが同じデータの類似度に所定値を加算する。上記の部分集合生成以後の処理を複数回繰り返すことで、各データ同士の類似度を決定する。本願発明では、このような処理によって、自動的に、各データ間の類似度を算出することができる。
Next, the effect of the first embodiment will be described.
According to the first embodiment, an initial value of similarity is determined for each set of data belonging to a given data set. Then, a subset is generated from the set of data, and a classifier is generated from attributes (for example, customer characteristics and sales conditions) and classes defined for each data included in the subset. Furthermore, using a classifier, a class is determined from the attribute, and a predetermined value is added to the similarity of the data that are included in the subset and have the same determined class. The degree of similarity between the data is determined by repeating the processing after the above subset generation a plurality of times. In the present invention, the degree of similarity between each data can be automatically calculated by such processing.
また、本実施形態において、部分集合生成時(ステップA4)では、個別データを予め定められた数Mだけ選択すればよく、既に生成された部分集合に属している個別データを重複を許して選択する。例えば、ランダムサンプリングを行ってもよい。このように、M個の個別データを選択することを複数回行って、類似度を生成する。また、類似度が求まれば、類似度に基づいて個別データを分類することができる。特許文献1に記載されたシステムのように、分析者が手動で顧客の分類を行う場合には、顧客の分類に対する特別なスキルが必要となったり、試行錯誤して分析を行って手間がかかったりすることがあるが、上記のように類似度を求めれば、システムのユーザに特別なスキルがなくても、ユーザの手間をかけずに、分類に用いるための類似度を算出することができる。
Further, in the present embodiment, at the time of generating a subset (step A4), it is only necessary to select a predetermined number M of individual data, and individual data belonging to the already generated subset is selected to allow duplication. To do. For example, random sampling may be performed. As described above, the selection of M pieces of individual data is performed a plurality of times to generate the similarity. If the similarity is obtained, the individual data can be classified based on the similarity. When an analyst manually classifies a customer as in the system described in
また、各データが個々の顧客に対応し、データの属性が顧客の特徴や販売条件であり、データに「購入する」または「購入しない」というクラスが与えられている場合、商品またはサービスに対する顧客の行動(購入したか否か)に基づいて、データの類似度を求めることができる。また、データが顧客に対応しているので、顧客同士の類似度ということもできる。 In addition, if each data corresponds to an individual customer, the attributes of the data are customer characteristics and sales conditions, and the data is given a class of “buy” or “do not buy”, the customer for the product or service Based on the behavior (whether or not purchased), the similarity of data can be obtained. In addition, since the data corresponds to the customer, it can be said that the degree of similarity between the customers.
以下に示す効果の説明では、データの属性が顧客の特徴であり、データと顧客が対応していて、データのクラスが顧客の購入行動(例えば「購入する」または「購入しない」)である場合を例にして説明する。 In the following explanation of the effect, when the attribute of the data is a characteristic of the customer, the data corresponds to the customer, and the data class is the purchase behavior of the customer (for example, “buy” or “do not buy”) Will be described as an example.
重複を許したランダムサンプリングにより部分集合を生成した場合、個々のデータ(本例では個々の顧客)は、部分集合にM/Nの確率で選択されることとなる。すなわち、M/Nの確率で部分集合に含められることになる。他のデータ(他の顧客)も、同様の確率で部分集合に含められる。データを組み合わせて得られる各データの組は、同じ確率で部分集合に属することとなる。従って、部分集合を作成する回数Tが十分大きく、仮に、元のクラスとステップA6で判定されたクラスが全て同一であれば、データ間の類似度はほぼ同じとなり、クラスが同一のデータを細かく分類することはできない。例えば、「購入する」というクラスのデータを細かく分類したり、「購入しない」というクラスのデータを細かく分類したりすることはできない。また、「購入する」というクラスのデータ(商品等を購入した顧客)と、「購入しない」というクラスのデータ(商品等を購入しなかった顧客)との類似度は0となる。これに対し、本発明の第1の実施形態では、部分集合に属する各個別データから分類器を生成し、その分類器を用いて、個別データの属性からクラスを判定することで、元のクラスと、判定後のクラスとがことなる場合を生じさせる機会を積極的に設けている。そして、判定後のクラスを用いて、個別データの類似度を求めることで、i番目のデータとj番目のデータからなる各組に対して、それぞれ類似度Sim(i,j)を定めることができる。 When a subset is generated by random sampling that allows duplication, individual data (in this example, an individual customer) is selected as a subset with a probability of M / N. That is, it is included in the subset with a probability of M / N. Other data (other customers) are also included in the subset with similar probabilities. Each data set obtained by combining data belongs to a subset with the same probability. Therefore, if the number of times T for creating the subset is sufficiently large and the original class and the class determined in step A6 are all the same, the similarity between the data is almost the same, and the data with the same class is finely divided. It cannot be classified. For example, it is not possible to classify the data of the class “Purchase” or to classify the data of the class “Do not purchase”. Also, the similarity between the class data “purchase” (customers who have purchased products) and the data class “do not purchase” (customers who did not purchase products) is zero. On the other hand, in the first embodiment of the present invention, a classifier is generated from each individual data belonging to the subset, and the class is determined from the attribute of the individual data using the classifier. And an opportunity to create a case where the class after the judgment is different. Then, the similarity Sim (i, j) can be determined for each set of the i-th data and the j-th data by obtaining the similarity of the individual data using the determined class. it can.
また、本発明では、互いに関連のある属性が多く存在しても、それらの関連ある属性の影響を強く受けることなく類似度を算出できる。例えば、図12に示すデータ番号1〜10の10個のデータが与えられているとする。図12に示すデータ番号{1,2,7,9,10}のデータを部分集合とすると、例えば、分類器として「属性aの値が1ならばクラスは『購入する』であり、属性aの値が2ならばクラスは『購入しない』である」という決定木が生成され、データ番号{1,2}のデータ間の類似度や、データ番号{7,9,10}の各データ間の類似度が加算される。また、例えば、データ番号{1,2,6,7,9,10}のデータを部分集合とする。この場合、例えば、分類器として「属性bの値が1ならばクラスは『購入する』であり、属性bの値が2ならばクラスは『購入しない』である」という決定木が生成され、データ番号{1,2,6}の各データ間の類似度や、データ番号{7,9,10}の各データ間の類似度が加算される。
In the present invention, even if there are many attributes that are related to each other, the similarity can be calculated without being strongly influenced by the related attributes. For example, it is assumed that ten pieces of data with
一般に、決定木には複数の属性が現れるが、属性に互いに関連性がある場合、決定木に現れる属性の数は減る。上記のデータ番号{1,2,6,7,9,10}を部分集合とする場合を例にすると、属性bを用いて個別データを2つに分類した場合と、属性c、d、あるいはeを用いて個別データを2つに分類した場合とで、個別データの分類のされ方が全く同一になる。よって、属性bで分割した後、属性c、d、あるいはeで分割することはない。具体例を挙げると、データ番号{1,2,6,7,9,10}のデータを属性bで分割すると、属性bの値が1のノードにはデータ番号{1,2,6}のデータが含まれ、属性bの値が2のノードにはデータ番号{7,9,10}が含まれる。データ番号{1,2,6}のノードをcで分割する場合、そのデータ番号{1,2,6}のデータは全て属性cの値が1となり、属性cの値が2となるデータはない。属性bの値が2のノードでも、属性cの値が一方に偏っている。属性bでの分割後、属性dやeで分割する場合も同様である。 In general, a plurality of attributes appear in the decision tree, but when attributes are related to each other, the number of attributes appearing in the decision tree is reduced. Taking the case where the above data numbers {1, 2, 6, 7, 9, 10} are a subset, for example, when the individual data is classified into two using the attribute b, the attributes c, d, or The classification of the individual data is exactly the same when the individual data is classified into two using e. Therefore, after dividing by attribute b, it is not divided by attributes c, d, or e. As a specific example, when the data with the data number {1, 2, 6, 7, 9, 10} is divided by the attribute b, the node with the value of the attribute b of 1 has the data number {1, 2, 6}. A node whose data is included and the value of attribute b is 2 includes data number {7, 9, 10}. When the node with the data number {1, 2, 6} is divided by c, all the data with the data number {1, 2, 6} has the attribute c value of 1 and the data with the attribute c value of 2 Absent. Even in a node where the value of attribute b is 2, the value of attribute c is biased to one side. The same applies when dividing by attribute d or e after division by attribute b.
このように、属性に互いに関連性がある場合、決定木に現れる属性の数が減り、関連のある属性の影響を強く受けることがなくなる。上記のデータ番号{1,2,6,7,9,10}を部分集合とする例では、例えば、決定木には属性bが現れるが、属性bと同時に他の属性c、d、eは決定木に現れず、属性bに関連する属性c、d、eに影響されることがない。そのため、データに関連ある属性が多く存在していても、それらの関連のある属性の影響を強く受けることなく、類似度を求めることができる。 In this way, when attributes are related to each other, the number of attributes appearing in the decision tree is reduced, and the attribute is not strongly influenced by the related attributes. In the example in which the data numbers {1, 2, 6, 7, 9, 10} are a subset, for example, the attribute b appears in the decision tree, but the other attributes c, d, and e are simultaneous with the attribute b. It does not appear in the decision tree and is not affected by the attributes c, d, and e related to the attribute b. Therefore, even when there are many attributes related to the data, the similarity can be obtained without being strongly influenced by the related attributes.
また、二つのデータがいずれも部分集合に属し、その二つのデータに対して判定されたクラスが同一であるという条件だけでなく、さらに、その二つのデータに対して判定されたクラスが特定のクラス(例えば、「購入する」)であるという条件を満たしているときにのみ、その二つのデータの類似度Sim(i,j)への加算(ステップA16)を行う場合、以下の効果が得られる。すなわち、特定のクラスのデータの持つ特徴の違いを重視して類似度を算出できる。ここでも、データと顧客とが対応している場合を例にして説明する。ステップA16に移行する条件として、二つのデータに対して判定されたクラスが特定のクラスであるという条件も加えると、特定のクラスの顧客が持つ特徴の違いを重視して類似度を算出できる。例えば、商品またはサービスを購入した顧客が複数の特徴のいずれかを持っていて、まだその商品またはサービスを購入していないが、既に購入済みの顧客と特徴が近い顧客(購入の見込みのある顧客)が複数の特徴のうちのいずれかを持っていそうな場合がある。そのような場合において、購入していない顧客との類似度は重視せず、購入した顧客との類似度を重視したいと分析者が考える場合がある。そのような場合、ステップA6で「購入する」という特定のクラスであると判定された顧客のデータと、ステップA6で「購入する」と判定された「購入の見込みのある顧客」のデータとの類似度について加算して、「購入する」というクラスの顧客が持つ特徴の違いを重視して類似度を算出することができる。 Moreover, not only is the condition that the two data belong to a subset and the classes determined for the two data are the same, but the class determined for the two data is a specific class. When the addition (step A16) of the two data to the similarity Sim (i, j) is performed only when the condition of class (for example, “purchase”) is satisfied, the following effects are obtained. It is done. That is, the similarity can be calculated with emphasis on the difference in characteristics of data of a specific class. Here, the case where data and a customer correspond is described as an example. If a condition that the class determined for the two data is a specific class is also added as a condition for shifting to step A16, the similarity can be calculated with emphasis on the difference in characteristics of customers of the specific class. For example, a customer who purchases a product or service has one of several features and has not yet purchased the product or service, but a customer who has a feature similar to an already purchased customer (a customer who is likely to purchase) ) May have one of several features. In such a case, an analyst may think that the similarity with a customer who has not purchased is not emphasized but the similarity with a purchased customer is important. In such a case, the data of the customer determined to be the specific class “purchase” in step A6 and the data of “customer who is expected to purchase” determined to be “purchase” in step A6. By adding the similarities, it is possible to calculate the similarities with an emphasis on the difference in characteristics of customers of the class “buy”.
また、分類器生成部12は、分類器を作成するときに、ステップA4で生成された部分集合に属するデータのうち、予め与えられたクラスが特定のクラスとなっているデータに対して加重を行ってから、分類器を作成してもよい。例えば、部分集合に属するデータのうち、予め与えられたクラスが「購入する」となっているクラスのデータのデータ数が、指定された分だけ増えるように、そのデータの複製を作成して、その複製したデータも用いて分類器を生成してもよい。そのような分類器を用いて類似度を算出すれば、その類似度に基づいてデータを分類する場合、特定のクラス以外のクラスのデータが持つ特徴の違いを重視してクラスタ(グループ)に分類することができる。例えば、「購入する」というクラスの顧客(データ)と、「購入しない」というクラスの顧客の数が同じくらいであるとする。データに加重を行わない場合には、いずれのクラスのデータも混ざったクラスタが生成されがちになる。特定のクラスのデータを重く加重すると、特定のクラスのデータの間の類似度がどの組み合わせでも高くなることで1つのクラスタとなる。一方、特定のクラス以外のクラスのデータは、そのように類似度が高くなることはなく、1つのクラスタにまとめられずに、複数のクラスタに分類することができる。なお、類似度を用いてデータをクラスタ(グループ)に分類する処理については、第2の実施形態で説明する。
Further, when creating the classifier, the
実施形態2.
図6は、本発明の第2の実施形態の例を示すブロック図である。第2の実施形態のデータ類似度計算システム20は、部分集合生成部11と、分類器生成部12と、自己評価部13と、類似度算出部14と、類似度クラスタリング部21とを備える。第1の実施形態と同様の構成要素については、図1と同一の符号を付し、詳細な説明を省略する。第2の実施形態のデータ類似度計算システム20は、第1の実施形態と同様に、データの集合に属する個別データ間の類似度を計算した後、その類似度を用いて個別データを分類する。従って、第2の実施形態のデータ類似度計算システム20は、分類システムと称することができる。以下、本実施形態において、個別データのグループをクラスタと記す。
FIG. 6 is a block diagram showing an example of the second embodiment of the present invention. The data
類似度クラスタリング部21は、類似度算出部14が求めた個別データ間の類似度に基づいて、データの集合に属する個別データを複数のクラスタに分類する。類似度クラスタリング部21には、目標とするクラスタ数が入力され、類似度クラスタリング部21は、そのクラスタ数になるように個別データを分類する。目標とするクラスタ数は、データ類似度計算システム20に設けられるキーボード等の入力装置(図示せず)を介して、データ類似度計算システムのユーザによって入力されてもよい。あるいは、他の態様でクラスタ数が指定されてもよい。
The
部分集合生成部11、分類器生成部12、自己評価部13、類似度算出部14および類似度クラスタリング部21は、例えば、プログラム(データ類似度計算プログラム)に従って動作するCPUによって実現される。その場合、CPUがプログラムに従って、部分集合生成部11、分類器生成部12、自己評価部13、類似度算出部14および類似度クラスタリング部21として動作すればよい。
The
次に、第2の実施形態の動作について説明する。
データ集合に属する各個別データ間の類似度を求める処理は、第1の実施形態と同様である。部分集合生成部11、分類器生成部12、自己評価部13および類似度算出部14がそれぞれ第1の実施形態と同様に動作し、例えば、図3に示す処理を行って、i,jの組毎に、個別データ間の類似度Sim(i,j)を求めればよい。
Next, the operation of the second embodiment will be described.
The process for obtaining the similarity between the individual data belonging to the data set is the same as in the first embodiment. The
それぞれの個別データ間の類似度Sim(i,j)が算出された後、類似度クラスタリング部21は、個別データの各組における類似度を用いて、個別データをクラスタリングする(すなわち分類する)。
After the similarity Sim (i, j) between the individual data is calculated, the
類似度が与えられたときのクラスタリング方法には、様々な方法がある。例えば、階層的クラスタリング法として最短距離法、最長距離法、郡平均法、ウォード法等があり、非階層的クラスタリング法としてK平均法等がある。類似度クラスタリング部21は、いずれの方法で個別データを分類してもよい。また、どの方法でクラスタリングを行うかの指定が、キーボード等の入力装置を介してデータ類似度計算システムのユーザにより入力されてもよい。あるいは、他の態様で指定されてもよい。
There are various clustering methods when the similarity is given. For example, there are a shortest distance method, a longest distance method, a county average method, a Ward method and the like as a hierarchical clustering method, and a K average method and the like as a non-hierarchical clustering method. The
以下、最短距離法によって個別データをクラスタリングする場合を例にして、個別データのクラスタリング処理を説明する。図7は、最短距離法によって個別データをクラスタリングする処理経過の例を示すフローチャートである。なお、以下の説明では、目標とするクラスタ数をK個とする。目標とするクラスタ数Kは、例えば、キーボード等の入力装置を介して、予め類似度クラスタリング部21に入力される。
Hereinafter, the clustering process of individual data will be described by taking as an example the case of clustering individual data by the shortest distance method. FIG. 7 is a flowchart illustrating an example of a process progress in which individual data is clustered by the shortest distance method. In the following description, the target number of clusters is K. The target cluster number K is input to the
類似度クラスタリング部21は、データの集合に属する個別データをそれぞれ1個だけ含むクラスタを、各個別データ毎に定める(ステップB1)。従って、類似度クラスタリング部21は、ステップB1において、データの集合に属する個別データの総数Nと等しいN個のクラスタを定めることになる。このN個のクラスタに属する個別データは、クラスタ毎に異なっている。ステップB1の後、ステップB2に移行する。
The
ステップB2では、類似度クラスタリング部21は、二つのクラスタからなるクラスタの各組についてそれぞれ、クラスタ間の類似度を求め、最もクラスタ間の類似度が高い二つのクラスタを特定し、その二つのクラスタを一つのクラスタに併合する(ステップB2)。ステップB2に移行した時点でのクラスタ数をLとすると、L個のクラスタから二つのクラスタを取り出すLC2個の組毎に、クラスタ間の類似度を求め、最もクラスタ間の類似度が高い二つのクラスタを一つのクラスタに併合すればよい。なお、最初にステップB1からステップB2に移行したときには、L=Nである。
In step B2, the
また、二つのクラスタからなる組において、その二つのクラスタ間の類似度を定める方法の例を以下に示す。類似度を求める対象となる二つのクラスタの一方をC1と記し、他方をC2と記す。また、その二つのクラスタC1,C2間の類似度をS(C1,C2)と記す。類似度クラスタリング部21は、例えば、C1に属する個別データと、C2に属する個別データとの各組み合わせにおける個別データ間の類似度のうち、最大値をC1,C2間の類似度をS(C1,C2)と定めればよい。すなわち、C1から取り出した一つの個別データをx1とし、C2から取り出した一つの個別データをx2とし、x1,x2の類似度をS(x1,x2)とすると、類似度クラスタリング部21は、式(1)に示すようにS(x1,x2)の最大値をS(C1,C2)と定めればよい。
An example of a method for determining the similarity between two clusters in a set of two clusters is shown below. One of the two clusters for which the similarity is obtained is denoted as C 1 and the other is denoted as C 2 . The similarity between the two clusters C 1 and C 2 is denoted as S (C 1 , C 2 ).
また、二つのクラスタを一つのクラスタに併合するとは、二つのクラスタに属する各個別データを一つのクラスタにまとめることである。二つのクラスタを一つのクラスタに併合することにより、クラスタの総数が1つ減少する。 Further, merging two clusters into one cluster is to combine individual data belonging to the two clusters into one cluster. By merging two clusters into one cluster, the total number of clusters is reduced by one.
ステップB2で二つのクラスタを一つのクラスタに併合した後、類似度クラスタリング部21は、クラスタ数が目標数Kになったか否かを判定する(ステップB3)。クラスタ数が目標数Kまで減っていなければ(ステップB3におけるNo)、ステップB2以降の処理を繰り返す。クラスタ数が目標数Kとなっていれば(ステップB3におけるYes)、K個のクラスタが得られ、個別データがK個に分類されているので、処理を終了する。
After merging two clusters into one cluster in step B2, the
第2の実施形態によれば、データの集合に含まれる個別データを目標数のクラスタに分類することができる。 According to the second embodiment, individual data included in a data set can be classified into a target number of clusters.
例えば、データの属性が顧客の特徴であり、データと顧客が対応していて、データのクラスが顧客の購入行動(「購入する」または「購入しない」等)を表している場合、商品またはサービスに対する顧客の購入行動に応じて、自動的に顧客を分類することができる。 For example, if a data attribute is a characteristic of a customer, the data corresponds to the customer, and the data class represents the purchase behavior of the customer (such as “buy” or “do not buy”), the product or service The customers can be automatically classified according to the purchase behavior of the customer.
また、図7に例示するように、最初に各個別データをそれぞれ別々のクラスタに振り分け、クラスタの数が目標数となるまでクラスタを併合させていけば、目標数のクラスタに個別データを分類することができる。すなわち、特定のクラスタに個別データが集まってしまい個別データのクラスタ数が目標数に達しないということを防止することができる。 In addition, as illustrated in FIG. 7, first, individual data is allocated to separate clusters, and if the clusters are merged until the number of clusters reaches the target number, the individual data is classified into the target number of clusters. be able to. That is, it is possible to prevent individual data from being collected in a specific cluster and the number of clusters of individual data from reaching the target number.
実施形態3.
図8は、本発明の第3の実施形態の例を示すブロック図である。第3の実施形態のデータ類似度計算システム30は、部分集合生成部11と、分類器生成部12と、自己評価部13と、類似度算出部14と、類似度クラスタリング部21と、属性データ分類部31と、関連性算出部32とを備える。第1の実施形態や第2の実施形態と同様の構成要素については、図1、図6と同一の符号を付し、詳細な説明を省略する。第3の実施形態のデータ類似度計算システム30は、第2の実施形態と同様に類似度を用いて個別データを分類するので、分類システムと称することができる。なお、本実施の形態においても、類似度クラスタリング部21によって分類された個別データのグループをクラスタと記す。また、第3の実施形態のデータ類似度計算システム30は、類似度算出に対する属性の関連度を算出する。類似度算出に対する属性の関連度とは、類似度算出に対する属性の関連性の度合い(換言すれば、類似度算出に対して属性が影響を与える度合い)を示す数値である。
FIG. 8 is a block diagram showing an example of the third embodiment of the present invention. The data
属性データ分類部31には、属性およびその属性値に基づく分類方法を指定する情報(以下、分類方法指定情報と記す)が入力され、属性データ分類部31は、指定された分類方法に従って、個別データを分類する。分類方法指定情報によって、属性データ分類部31による個別データの分類数も定まる。分類方法指定情の例として、「属性名Aの属性値がThres以上である個別データをグループ1に分類し、属性名Aの属性値がThres未満である個別データをグループ2に分類する。」などの情報が挙げられる。この場合、個別データは、二つのグループ1,2に分類されることになる。分類方法指定情報は、例えば、キーボード等の入力装置(図示せず)を介して属性データ分類部31に入力されるが、他の態様で入力されてもよい。
Information that specifies an attribute and a classification method based on the attribute value (hereinafter referred to as classification method designation information) is input to the attribute
関連性算出部32は、類似度クラスタリング部21によって分類されたクラスタ(グループ)と、属性データ分類部31によって分類されたグループとの関係に基づいて、類似度算出に対する属性の関連度(以下、単に属性の関連度と記す)を求める。この属性は、分類方法指定情報で指定された属性である。
Based on the relationship between the cluster (group) classified by the
部分集合生成部11、分類器生成部12、自己評価部13、類似度算出部14、類似度クラスタリング部21、属性データ分類部31および関連性算出部32は、例えば、プログラム(データ類似度計算プログラム)に従って動作するCPUによって実現される。その場合、CPUがプログラムに従って、部分集合生成部11、分類器生成部12、自己評価部13、類似度算出部14、類似度クラスタリング部21、属性データ分類部31および関連性算出部32として動作する。
The
次に、第3の実施形態の動作について説明する。
類似度クラスタリング部21が個別データを分類するまでの動作は、第2の実施形態と同様である。部分集合生成部11、分類器生成部12、自己評価部13および類似度算出部14は、第1および第2の実施形態と同様に動作し、例えば、図3に示す処理を行って、i,jの組毎に、個別データ間の類似度Sim(i,j)を求めればよい。その後、類似度クラスタリング部21は、第2の実施形態と同様に、指定されたクラスタ数に個別データを分類する。
Next, the operation of the third embodiment will be described.
The operation until the
図9は、類似度クラスタリング部21による分類後に属性の関連度を求める動作の例を示すフローチャートである。ここでは、類似度クラスタリング部21によってグループ分けされるクラスタ数と、属性データ分類部31によってグループ分けされるグループ数が等しい場合を例に説明する。本例では、類似度クラスタリング部21がデータの集合に属する個別データを二つのクラスタに分類するものとする。また、属性データ分類部31には、例えば、「属性名Aの属性値がThres以上である個別データをグループ1に分類し、属性名Aの属性値がThres未満である個別データをグループ2に分類する。」という分類方法指定情報が入力され、属性データ分類部31が個別データを2つのグループに分類するものとする。
FIG. 9 is a flowchart illustrating an example of an operation for obtaining the degree of association of attributes after classification by the
また、以下の説明において、変数kは、類似度クラスタリング部21によってグループ分けされるクラスタを指定するための変数であり、本例では、kの取り得る値は1または2である。また、変数lは、属性データ分類部31によってグループ分けされたグループを指定するための変数であり、本例では、lの取り得る値は1または2である。
In the following description, the variable k is a variable for designating a cluster grouped by the
属性データ分類部31は、まず、k=1,2、l=1,2によって決まるkとlの組み合わせを順次定め、k,lの組み合わせと一対一に対応する変数N[k][l]を全て0に初期化する(ステップC1)。N[k][l]は、k番目のクラスタに属している個別データであって、l番目のグループにも属している個別データの数を表す。
First, the attribute
属性データ分類部31は、個別データを指定するための変数iを1に初期化する(ステップC2)。
The attribute
次に、属性データ分類部31は、変数kの値を、個別データi(すなわち、i番目の個別データ)が属するクラスタのクラスタ番号とする(ステップC3)。なお、例えば類似度クラスタリング部21は、分類の結果得られたK個のクラスタに対して、クラスタを識別するための番号1〜Kを割り当てる。個々のクラスタに割り当てられた番号がクラスタ番号である。ステップC3では、変数kに、データiが属するクラスタのクラスタ番号を代入すればよい。本例ではクラスタ数は2であるので、クラスタ番号は1または2である。
Next, the attribute
次に、属性データ分類部31は、個別データiの属性値(分類方法指定情報で指定された属性の属性値)に応じて、個別データiをどのグループに含めるかを判定する(ステップC4)。すなわち、分類方法指定情報に従って、個別データiに対する分類を行う。本例では、「属性名Aの属性値がThres以上である個別データをグループ1に分類し、属性名Aの属性値がThres未満である個別データをグループ2に分類する。」という分類方法指定情報に従って、個別データiの属性Aの属性値がThres以上であるか否かを判定する。個別データiの属性Aの属性値がThres以上であるならば(すなわち、個別データiをグループ1に分類すると判定したならば)、変数lの値を1に設定する(ステップC5)。また、個別データiの属性Aの属性値がThres未満であるならば(すなわち、個別データiをグループ2に分類すると判定したならば)、変数lの値を2に設定する(ステップC6)。
Next, the attribute
ステップC5またはステップC6の後、ステップC3で定められたkと、ステップC5またはステップC6で定められたlとの組み合わせに対応するN[k][l]の値を1インクリメントする(ステップC7)。例えば、ステップC5からステップC7に移り、N[k][1]を1インクリメントした場合、k番目のクラスタに属している個別データであって、1番目のグループに属している個別データを一つカウントして、そのカウント値を1増加させたことになる。また、ステップC6からステップC7に移り、N[k][2]を1インクリメントした場合、k番目のクラスタに属している個別データであって、2番目のグループに属している個別データを一つカウントして、そのカウント値を1増加させたことになる。 After step C5 or step C6, the value of N [k] [l] corresponding to the combination of k defined in step C3 and l defined in step C5 or step C6 is incremented by 1 (step C7). . For example, when the process moves from step C5 to step C7 and N [k] [1] is incremented by 1, one piece of individual data belonging to the kth cluster and belonging to the first group is obtained. The count value is incremented by one. Further, when the process moves from step C6 to step C7 and N [k] [2] is incremented by 1, individual data belonging to the kth cluster and belonging to the second group is one. The count value is incremented by one.
次に、属性データ分類部31は、変数iの値を1インクリメントする(ステップC8)。そして、属性データ分類部31は、変数iの値が個別データの総数N以下であるか否かを判定し(ステップC9)、iの値がN以下であれば(ステップC9におけるYes)、ステップC3以降の処理を再度行う。従って、1番目からN番目までの各個別データに対してステップC3以降の処理を行うことになり、k番目のクラスタに属している個別データであって、l番目のグループにも属している個別データの数N[k][l]が、k,lの組み合わせ毎に求められる。
Next, the attribute
iの値がNを超えていれば(ステップC9におけるNo)、ステップC10に移行する。 If the value of i exceeds N (No in step C9), the process proceeds to step C10.
ステップC10において、関連性算出部32は、N[k][l]を用いて、類似度クラスタリング部による分類と属性データ分類部による分類との独立性を検定し、p値を算出する(ステップC10)。このp値を、分類方法指定情報で指定された属性の関連度とすることができる。
In step C10, the
関連性算出部32は、例えば、類似度クラスタリング部21が行った分類と属性データ分類部31が行った分類とが独立であるという仮説によりp値を求める。この場合、関連性算出部32は、まずk,lの各組み合わせに関して、N[k][l]の期待値(E[k][l]と記す)を計算する。上記の仮説のもとでは、関連性算出部32は、以下に示す式(2)の計算によって各N[k][l]の期待値E[k][l]を求めればよい。
For example, the
そして、N[k][l]およびE[k][l]を用いて、以下に示す式(3)の計算によりχ0 2を計算すると、χ0 2はχ2分布に従う。 Then, using the N [k] [l] and E [k] [l], when computing the chi 0 2 by calculation of equation (3) below, chi 0 2 follows the chi 2 distribution.
そこで、関連性算出部32は、式(3)の計算によりχ0 2を求め、χ2分布表を参照してp値を決定すればよい。このp値が、分類方法指定情報で指定された属性の関連度である。なお、χ2分布表は、例えば、予めデータ類似度計算システム30が備える記憶装置(図示せず)に記憶させておけばよい。
Therefore, the
χ2分布表からp値を決定する際に用いる自由度は、類似度クラスタリング部21によって分類されるクラスタ数−1である。従って、本例では、クラスタ数=2であるので、自由度は、2−1=1とすればよい。
The degree of freedom used when determining the p value from the χ 2 distribution table is the number of clusters −1 classified by the
図10は、χ2分布表の例を示す説明図である。図10では、自由度をνで表し、ν=1,2,3の場合を例示しているが、ν=4以上の場合も含めておく。図10に示すχ2分布表の最上段の値「0.7」、「0.5」、「0.3」、「0.2」、「0.1」等はp値である。例えば、式(3)でχ0 2を計算した結果、関連性算出部32は、χ0 2≒1.07であったとする。本例では、χ0 2は、自由度1のχ2分布に従うので、自由度1におけるχ0 2≒1.07に応じたp値“0.3”をχ2分布表から特定し、そのp値“0.3”を、類似度算出に対する属性Aの関連度とすればよい。
FIG. 10 is an explanatory diagram showing an example of the χ 2 distribution table. In FIG. 10, the degree of freedom is represented by ν, and the case of ν = 1, 2, 3 is illustrated, but the case of ν = 4 or more is also included. The uppermost values “0.7”, “0.5”, “0.3”, “0.2”, “0.1”, etc. in the χ 2 distribution table shown in FIG. 10 are p values. For example, as a result of calculating χ 0 2 by the expression (3), it is assumed that the
以上のように、属性Aの関連度を求めることができる。他の属性の関連度も、分類方法指定情報を入力して求めることができる。 As described above, the relevance level of the attribute A can be obtained. The degree of association of other attributes can also be obtained by inputting classification method designation information.
また、関連性算出部32は、例えば、χ0 2を計算した後に以下に示す式(4)の計算を行って、クラメールの関連係数を求め、そのクラメールの関連係数を、類似度算出に対する属性の関連度としてもよい。
In addition, the
クラメールの連関係数は、0から1までの数値であり、1に近いほど強く関連していることを示す。 The number of relations of Kramer is a numerical value from 0 to 1, and the closer to 1, the stronger the relation.
また、関連性算出部32が類似度算出に対する属性の関連度を求めた後、その属性の関連度を、ディスプレイ装置またはプリンタ装置等の出力装置(図示せず)に出力させてから、終了してもよい。ユーザが入力装置(図示せず)を介して、属性を指定した分類方法指定情報を入力し、データ類似度計算システム30がその属性の関連を求めてもよい。そして、関連性算出部32は、そのようにして求めた各属性の関連度をディスプレイ装置またはプリンタ装置等の出力装置(図示せず)に出力させる際、表形式やグラフ形式で出力させてもよい。
Further, after the
次に、第3の実施形態の効果について説明する。
本発明によれば、類似度によるクラスタリングと属性値との関連の度合いを調べることができる。例えば、商品またはサービスに対する顧客の行動に応じて算出した類似度によるクラスタリングと属性値との関連を調べることができる。具体例を挙げると、例えば、類似度によるクラスタリングと男女(性別)との関連性が高いかどうかを調べることができ、商品またはサービスに対する顧客の行動に応じて、顧客を分類する際に関連のある顧客の特徴や販売条件を抽出することができる。これにより、商品またはサービスの今後ターゲットとすべき顧客等を分析することができる。
Next, effects of the third embodiment will be described.
According to the present invention, the degree of association between clustering based on similarity and attribute values can be examined. For example, the relationship between the clustering based on the similarity calculated according to the customer's behavior for the product or service and the attribute value can be examined. For example, for example, it is possible to examine whether the clustering by similarity is highly related to gender (gender), and when classifying customers according to customer behavior for goods or services, It is possible to extract the characteristics and sales conditions of a certain customer. As a result, it is possible to analyze a customer or the like to be a future target of the product or service.
次に、本発明の概要について説明する。図11は、本発明の概要を示すブロック図である。本発明のデータ類似度計算システム80は、部分集合生成手段81と、分類器生成手段82と、クラス判定手段83と、類似度算出手段84とを備える。
Next, the outline of the present invention will be described. FIG. 11 is a block diagram showing an outline of the present invention. The data
部分集合生成手段81(例えば、部分集合生成部11)は、データの特徴を示す属性とデータの類別を示すクラスとを含むデータの集合から、データの重複を許してその集合の部分集合を複数回生成する。 The subset generation unit 81 (for example, the subset generation unit 11) allows a plurality of subsets of the set by allowing data duplication from a set of data including an attribute indicating data characteristics and a class indicating data classification. Generate times.
分類器生成手段82(例えば、分類器生成部12)は、部分集合が生成される毎に、属性からクラスを判定するルールである分類器(例えば、決定木)を、部分集合に基づいて生成する。 The classifier generation unit 82 (for example, the classifier generation unit 12) generates a classifier (for example, a decision tree) that is a rule for determining a class from an attribute every time a subset is generated based on the subset. To do.
クラス判定手段83(例えば、自己評価部13)は、分類器が生成される毎に、分類器を用いて、部分集合に属する個々のデータのクラスを判定する。 The class determination unit 83 (for example, the self-evaluation unit 13) determines a class of individual data belonging to the subset using the classifier every time a classifier is generated.
類似度算出手段84(例えば、類似度算出部14)は、データの集合の部分集合が生成され、クラス判定手段がその部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する。 The similarity calculation unit 84 (for example, the similarity calculation unit 14) generates a subset of data sets, and when the class determination unit determines the classes of individual data belonging to the subset, A value is added to the similarity between the determined data.
本発明によれば、データの重複を許して、データの集合から部分集合を複数回生成し、部分集合毎に、分類器を生成して、部分集合に属するデータのクラスを判定する。そして、この判定結果を用いて類似度を計算するので、データ中に互いに関連のある属性が多く存在してもそれらの関連のある属性の影響を強く受けることなく、データの類似度を求めることができる。 According to the present invention, data duplication is permitted, a subset is generated a plurality of times from a set of data, a classifier is generated for each subset, and a class of data belonging to the subset is determined. Since the similarity is calculated using this determination result, even if there are many attributes that are related to each other in the data, the similarity of the data can be obtained without being strongly influenced by those related attributes. Can do.
また、上記の実施形態には、データ同士の類似度に基づいて、データの集合に属するデータを複数のグループに分類するデータグループ化手段(例えば、類似度クラスタリング部21)を備える構成が開示されている。そのような構成によれば、データの集合に含まれる個別データを分類することができる。 Further, the above embodiment discloses a configuration including data grouping means (for example, the similarity clustering unit 21) that classifies data belonging to a data set into a plurality of groups based on the similarity between the data. ing. According to such a configuration, the individual data included in the data set can be classified.
また、上記の実施形態には、データグループ化手段が、データの集合に属する個々のデータをそれぞれ別々のグループに分類し、互いに異なる二つのグループに属するデータ同士の類似度を求め、類似度が最大となる二つのグループを併合することを繰り返し、グループの総数を目標数まで減少させる構成が開示されている。そのような構成によれば、データの集合に含まれる個別データを目標数のグループに分類することができる。 In the above embodiment, the data grouping means classifies the individual data belonging to the set of data into different groups, obtains the similarity between the data belonging to two different groups, and the similarity is The structure which repeats merging two largest groups and reduces the total number of groups to a target number is disclosed. According to such a configuration, the individual data included in the data set can be classified into a target number of groups.
また、上記の実施形態には、データ集合に属するデータを、特定の属性の属性値に応じて、グループに分類する属性データ分類手段(属性データ分類部31)と、データグループ化手段によって分類されたデータのグループと、属性データ分類手段によって分類されたデータのグループとの関係に基づいて、類似度算出に対する特定の属性の関連度を計算する関連度計算手段(関連性算出部32)とを備える構成が開示されている。そのような構成によれば、類似度を用いて分類を行った結果と属性値との関連の度合いを調べることができる。 In the above embodiment, the data belonging to the data set is classified by the attribute data classification unit (attribute data classification unit 31) that classifies the data into a group according to the attribute value of the specific attribute, and the data grouping unit. Relevance calculating means (relevance calculating unit 32) for calculating the relevance of a specific attribute to the similarity calculation based on the relationship between the group of data and the data group classified by the attribute data classifying means. An arrangement comprising the above is disclosed. According to such a configuration, it is possible to check the degree of association between the result of classification using the similarity and the attribute value.
また、上記の実施形態には、部分集合生成手段81が、データの集合からデータをランダムサンプリングすることによって、集合の部分集合を生成する構成が開示されている。
Further, the above embodiment discloses a configuration in which the
また、上記の実施形態には、類似度算出手段84が、クラス判定手段83によって特定のクラスと判定されたデータ同士の類似度に対してのみ値を加算する構成が開示されている。そのような構成によれば、特定のクラスのデータの持つ特徴の違いを重視して類似度を算出できる。
Further, the above embodiment discloses a configuration in which the
また、上記の実施形態には、分類器生成手段82が、部分集合に属するデータのうち所与のクラスが特定のクラスであるデータを加重して分類器を生成する構成が開示されている。そのような構成によれば、得られた類似度に基づいてデータを分類するときに、特定のクラス以外のクラスのデータが持つ特徴の違いを重視してグループに分類することができる。
In the above-described embodiment, a configuration is disclosed in which the
また、上記の実施形態には、部分集合生成手段81が、少なくとも顧客の特徴または販売条件を属性とし顧客の行動をクラスとするデータの集合から、その集合の部分集合を生成する構成が開示されている。
In the above embodiment, a configuration is disclosed in which the
本発明は、データの集合に属する各データ間の類似度を求めるデータ類似度計算システムや、データ間の類似度を計算してデータを分類する分類システムに好適に適用される。 The present invention is suitably applied to a data similarity calculation system for obtaining a similarity between data belonging to a data set and a classification system for classifying data by calculating a similarity between data.
11 部分集合生成部
12 分類器生成部
13 自己評価部
14 類似度算出部
21 類似度クラスタリング部
31 属性データ分類部
32 関連性算出部
DESCRIPTION OF
Claims (24)
部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、前記部分集合に基づいて生成する分類器生成手段と、
分類器が生成される毎に、分類器を用いて、前記部分集合に属する個々のデータのクラスを判定するクラス判定手段と、
データの集合の部分集合が生成され、クラス判定手段が当該部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出手段とを備える
ことを特徴とするデータ類似度計算システム。 A subset generation means for generating a subset of the set a plurality of times by allowing data duplication from a set of data including an attribute indicating data characteristics and a class indicating data classification;
Classifier generation means for generating a classifier, which is a rule for determining a class from an attribute each time a subset is generated, based on the subset;
Class determination means for determining a class of individual data belonging to the subset using the classifier each time a classifier is generated;
A similarity calculation that adds a value to the similarity between data determined to be the same class when a subset of the data set is generated and the class determination means determines the class of each data belonging to the subset And a data similarity calculation system.
請求項1に記載のデータ類似度計算システム。 The data similarity calculation system according to claim 1, further comprising data grouping means for classifying data belonging to the data set into a plurality of groups based on the similarity between the data.
請求項2に記載のデータ類似度計算システム。 The data grouping means classifies the individual data belonging to the data set into separate groups, calculates the similarity between the data belonging to two different groups, and merges the two groups having the maximum similarity The data similarity calculation system according to claim 2, wherein the total number of groups is reduced to a target number.
データグループ化手段によって分類されたデータのグループと、属性データ分類手段によって分類されたデータのグループとの関係に基づいて、類似度算出に対する前記特定の属性の関連度を計算する関連度計算手段とを備える
請求項2または請求項3に記載のデータ類似度計算システム。 Attribute data classification means for classifying data belonging to a data set into groups according to attribute values of specific attributes;
Relevance calculating means for calculating the relevance of the specific attribute to similarity calculation based on the relationship between the group of data classified by the data grouping means and the group of data classified by the attribute data classifying means; The data similarity calculation system according to claim 2 or 3.
請求項1から請求項4のうちのいずれか1項に記載のデータ類似度計算システム。 The data similarity calculation system according to any one of claims 1 to 4, wherein the subset generation unit generates a subset of the set by randomly sampling data from the set of data.
請求項1から請求項5のうちのいずれか1項に記載のデータ類似度計算システム。 The data similarity according to any one of claims 1 to 5, wherein the similarity calculation means adds a value only to the similarity between the data determined as the specific class by the class determination means. Calculation system.
請求項1から請求項6のうちのいずれか1項に記載のデータ類似度計算システム。 7. The classifier generation unit generates a classifier by weighting data in which a given class is a specific class among data belonging to the subset. 8. Data similarity calculation system.
請求項1から請求項7のうちのいずれか1項に記載のデータ類似度計算システム。 The subset generation means generates a subset of the set from a set of data having at least customer characteristics or sales conditions as attributes and customer behavior as a class. The data similarity calculation system described in 1.
分類器生成手段が、部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、前記部分集合に基づいて生成する分類器生成ステップと、
クラス判定手段が、分類器が生成される毎に、分類器を用いて、前記部分集合に属する個々のデータのクラスを判定するクラス判定ステップと、
類似度算出手段が、データの集合の部分集合が生成され、クラス判定ステップで当該部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出ステップとを含む
ことを特徴とするデータ類似度計算方法。 A subset generation step for generating a subset of the set a plurality of times by allowing duplication of data from a set of data including an attribute indicating the characteristics of the data and a class indicating the classification of the data;
A classifier generating step for generating a classifier as a rule for determining a class from an attribute each time a subset is generated based on the subset;
A class determination step for determining a class of individual data belonging to the subset using the classifier each time a classifier is generated;
When the similarity calculation means generates a subset of a set of data and determines the class of individual data belonging to the subset in the class determination step, the similarity is calculated for the data determined to be the same class. A data similarity calculation method comprising: a similarity calculation step of adding.
請求項9に記載のデータ類似度計算方法。 Data grouping means, on the basis of the similarity of data among the data similarity calculation method according to claim 9 comprising a data grouping step of classifying the data belonging to the set of data into a plurality of groups.
請求項10に記載のデータ類似度計算方法。 In the data grouping step , the data grouping means classifies the individual data belonging to the data set into separate groups, obtains the similarity between the data belonging to two different groups, and the similarity is the maximum. The data similarity calculation method according to claim 10, wherein the two groups are repeatedly merged to reduce the total number of groups to a target number.
関連度計算手段が、データグループ化ステップで分類されたデータのグループと、属性データ分類ステップで分類されたデータのグループとの関係に基づいて、類似度算出に対する前記特定の属性の関連度を計算する関連度計算ステップとを備える
請求項10または請求項11に記載のデータ類似度計算方法。 An attribute data classification means for classifying data belonging to the data set into groups according to attribute values of specific attributes;
The relevance calculation means calculates the relevance of the specific attribute to the similarity calculation based on the relationship between the data group classified in the data grouping step and the data group classified in the attribute data classification step. The data similarity calculation method according to claim 10, further comprising: a relevance level calculating step.
請求項9から請求項12のうちのいずれか1項に記載のデータ類似度計算方法。 The data according to any one of claims 9 to 12, wherein the subset generation means generates a subset of the set by randomly sampling data from the set of data in the subset generation step. Similarity calculation method.
請求項9から請求項13のうちのいずれか1項に記載のデータ類似度計算方法。 The similarity calculation means adds a value only to the similarity between the data determined to be a specific class in the class determination step in the similarity calculation step. The data similarity calculation method described in 1.
請求項9から請求項14のうちのいずれか1項に記載のデータ類似度計算方法。 The classifier generation means generates a classifier by weighting data in which a given class is a specific class among data belonging to the subset in the classifier generation step. The data similarity calculation method according to claim 1.
請求項9から請求項15のうちのいずれか1項に記載のデータ類似度計算方法。 The subset generation means generates a subset of the set from a set of data in which at least the feature or sales condition of the customer is an attribute and the behavior of the customer is a class in the subset generation step. The data similarity calculation method according to any one of the above.
データの特徴を示す属性とデータの類別を示すクラスとを含むデータの集合から、データの重複を許して前記集合の部分集合を複数回生成する部分集合生成処理、
部分集合が生成される毎に、属性からクラスを判定するルールである分類器を、前記部分集合に基づいて生成する分類器生成処理、
分類器が生成される毎に、分類器を用いて、前記部分集合に属する個々のデータのクラスを判定するクラス判定処理、および、
データの集合の部分集合が生成され、クラス判定処理で当該部分集合に属する個々のデータのクラスを判定したときに、同一のクラスと判定されたデータ同士の類似度に値を加算する類似度算出処理
を実行させるためのデータ類似度計算プログラム。 On the computer,
A subset generation process for generating a subset of the set multiple times by allowing data duplication from a set of data including an attribute indicating data characteristics and a class indicating data classification;
A classifier generation process for generating a classifier that is a rule for determining a class from an attribute each time a subset is generated, based on the subset,
A class determination process for determining a class of individual data belonging to the subset using the classifier each time a classifier is generated; and
A similarity calculation that adds a value to the similarity between data determined to be the same class when a subset of the data set is generated and the class of each data belonging to the subset is determined in the class determination process Data similarity calculation program to execute processing.
データ同士の類似度に基づいて、データの集合に属するデータを複数のグループに分類するデータグループ化処理
を実行させる請求項17に記載のデータ類似度計算プログラム。 On the computer,
The data similarity calculation program according to claim 17, wherein a data grouping process for classifying data belonging to a set of data into a plurality of groups based on the similarity between the data is executed.
データグループ化処理で、データの集合に属する個々のデータをそれぞれ別々のグループに分類させ、互いに異なる二つのグループに属するデータ同士の類似度を求めさせ、前記類似度が最大となる二つのグループを併合することを繰り返させ、グループの総数を目標数まで減少させる
請求項18に記載のデータ類似度計算プログラム。 On the computer,
In the data grouping process, the individual data belonging to the data set is classified into different groups, the similarity between the data belonging to two different groups is obtained, and the two groups having the maximum similarity are determined. The data similarity calculation program according to claim 18, wherein the merging is repeated to reduce the total number of groups to a target number.
データ集合に属するデータを、特定の属性の属性値に応じて、グループに分類する属性データ分類処理、および、
データグループ化処理で分類されたデータのグループと、属性データ分類処理で分類されたデータのグループとの関係に基づいて、類似度算出に対する前記特定の属性の関連度を計算する関連度計算処理
を実行させる請求項18または請求項19に記載のデータ類似度計算プログラム。 On the computer,
Attribute data classification processing for classifying data belonging to a data set into groups according to attribute values of specific attributes; and
Relevance calculation processing for calculating the relevance of the specific attribute to the similarity calculation based on the relationship between the data group classified by the data grouping processing and the data group classified by the attribute data classification processing. The data similarity calculation program according to claim 18 or 19 to be executed.
部分集合生成処理で、データの集合からデータをランダムサンプリングすることによって、前記集合の部分集合を生成させる
請求項17から請求項20のうちのいずれか1項に記載のデータ類似度計算プログラム。 On the computer,
The data similarity calculation program according to any one of claims 17 to 20, wherein a subset of the set is generated by randomly sampling data from the set of data in the subset generation process.
類似度算出処理で、クラス判定処理で特定のクラスと判定されたデータ同士の類似度に対してのみ値を加算させる
請求項17から請求項21のうちのいずれか1項に記載のデータ類似度計算プログラム。 On the computer,
The data similarity according to any one of claims 17 to 21, wherein a value is added only to the similarity between data determined to be a specific class in the class determination processing in the similarity calculation processing. Calculation program.
分類器生成処理で、部分集合に属するデータのうち所与のクラスが特定のクラスであるデータを加重して分類器を生成させる
請求項17から請求項22のうちのいずれか1項に記載のデータ類似度計算プログラム。 On the computer,
The classifier generation process generates a classifier by weighting data in which a given class is a specific class among the data belonging to the subset. Data similarity calculation program.
部分集合生成処理で、少なくとも顧客の特徴または販売条件を属性とし顧客の行動をクラスとするデータの集合から、当該集合の部分集合を生成させる
請求項17から請求項23のうちのいずれか1項に記載のデータ類似度計算プログラム。 On the computer,
24. The subset generation processing generates a subset of the set from a set of data having at least customer characteristics or sales conditions as attributes and customer behavior as a class. The data similarity calculation program described in 1.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008264442A JP5391637B2 (en) | 2008-10-10 | 2008-10-10 | Data similarity calculation system, data similarity calculation method, and data similarity calculation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008264442A JP5391637B2 (en) | 2008-10-10 | 2008-10-10 | Data similarity calculation system, data similarity calculation method, and data similarity calculation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2010092432A JP2010092432A (en) | 2010-04-22 |
| JP5391637B2 true JP5391637B2 (en) | 2014-01-15 |
Family
ID=42255051
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008264442A Expired - Fee Related JP5391637B2 (en) | 2008-10-10 | 2008-10-10 | Data similarity calculation system, data similarity calculation method, and data similarity calculation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5391637B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11907991B2 (en) | 2018-08-21 | 2024-02-20 | Walmart Apollo, Llc | Method and system for item line assignment |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016139939A1 (en) * | 2015-03-03 | 2016-09-09 | 日本電気株式会社 | Analysis device, analysis method, and computer-readable recording medium |
| JP6670572B2 (en) * | 2015-09-29 | 2020-03-25 | 株式会社エヌ・ティ・ティ・データ | Information processing apparatus, information processing method, and program |
| JPWO2017122437A1 (en) | 2016-01-12 | 2018-11-08 | ソニー株式会社 | Information processing apparatus, information processing system, information processing method, and program |
| JP6538762B2 (en) * | 2017-06-27 | 2019-07-03 | 株式会社東芝 | Similarity calculation apparatus and similarity calculation method |
| JP6637206B1 (en) * | 2019-03-20 | 2020-01-29 | 株式会社 日立産業制御ソリューションズ | Cluster division evaluation apparatus, cluster division evaluation method, and cluster division evaluation program |
| CN111026966B (en) * | 2019-12-06 | 2023-12-22 | 创新奇智(成都)科技有限公司 | Search recommendation ordering method based on user and product portrait and association degree of user and product portrait |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2002149697A (en) * | 2000-11-07 | 2002-05-24 | Mitsubishi Electric Corp | Similar case search device |
| JP2005078240A (en) * | 2003-08-29 | 2005-03-24 | Mamoru Tanaka | Method for extracting knowledge by data mining |
| JP4041081B2 (en) * | 2004-03-23 | 2008-01-30 | 東芝ソリューション株式会社 | Divided clustering apparatus and divided data number determination method |
-
2008
- 2008-10-10 JP JP2008264442A patent/JP5391637B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11907991B2 (en) | 2018-08-21 | 2024-02-20 | Walmart Apollo, Llc | Method and system for item line assignment |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2010092432A (en) | 2010-04-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20220391767A1 (en) | System and method for relational time series learning with the aid of a digital computer | |
| JP5391637B2 (en) | Data similarity calculation system, data similarity calculation method, and data similarity calculation program | |
| US20080097937A1 (en) | Distributed method for integrating data mining and text categorization techniques | |
| CN112559900B (en) | Product recommendation method and device, computer equipment and storage medium | |
| CN111612491B (en) | State analysis model construction method, analysis method and device | |
| KR102059263B1 (en) | Rfm analysis system and method applying machine learning algorithm | |
| US12095781B2 (en) | Hidden Markov model based data ranking for enhancement of classifier performance to classify imbalanced dataset | |
| Alghobiri | A comparative analysis of classification algorithms on diverse datasets | |
| AL-Bakri et al. | Multi label restaurant classification using support vector machine | |
| JP2001117947A (en) | Method for classifying high-dimensional data and classification tree and computer system formed thereby | |
| US7272583B2 (en) | Using supervised classifiers with unsupervised data | |
| Sana et al. | Data transformation based optimized customer churn prediction model for the telecommunication industry | |
| CN114996446B (en) | A text classification method, device and storage medium | |
| JP2006319220A (en) | Abnormal equipment estimation device, abnormal equipment estimation method, abnormal equipment estimation program, and recording medium | |
| KR20210023453A (en) | Apparatus and method for matching review advertisement | |
| Deng et al. | Sampling method based on improved C4. 5 decision tree and its application in prediction of telecom customer churn | |
| CN113962565A (en) | Project scoring method and system based on big data and readable storage medium | |
| Pandithurai et al. | Telecom customer churn prediction using supervised machine learning techniques | |
| JP4234841B2 (en) | Data analyzer | |
| Alizadeh et al. | An OWA-powered dynamic customer churn modeling in the banking industry based on customer behavioral vectors | |
| CN113191259B (en) | Dynamic data expansion method and image classification method for hyperspectral image classification | |
| KR20200072207A (en) | item recommendation method based on preference sensitivity over purchase decision factor | |
| Romeu | On operations research and statistics techniques: Keys to quantitative data mining | |
| JP7706100B1 (en) | Information Processing System | |
| Kannan et al. | Prediction of consumer review analysis using Naive Bayes and Bayes Net algorithms |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110908 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130307 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130319 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130513 |
|
| 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: 20130917 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130930 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |