JP6765911B2 - Classification device, classification method and program - Google Patents

Classification device, classification method and program Download PDF

Info

Publication number
JP6765911B2
JP6765911B2 JP2016180696A JP2016180696A JP6765911B2 JP 6765911 B2 JP6765911 B2 JP 6765911B2 JP 2016180696 A JP2016180696 A JP 2016180696A JP 2016180696 A JP2016180696 A JP 2016180696A JP 6765911 B2 JP6765911 B2 JP 6765911B2
Authority
JP
Japan
Prior art keywords
classification
prediction
evaluation
unit
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016180696A
Other languages
Japanese (ja)
Other versions
JP2018045516A (en
Inventor
一幸 若杉
一幸 若杉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Heavy Industries Ltd
Original Assignee
Mitsubishi Heavy Industries Ltd
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 Mitsubishi Heavy Industries Ltd filed Critical Mitsubishi Heavy Industries Ltd
Priority to JP2016180696A priority Critical patent/JP6765911B2/en
Publication of JP2018045516A publication Critical patent/JP2018045516A/en
Application granted granted Critical
Publication of JP6765911B2 publication Critical patent/JP6765911B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、分類装置、分類方法およびプログラムに関する。 The present invention relates to classification devices, classification methods and programs.

機械学習の1つに決定木学習があり、決定木学習に関連して幾つかの技術が提案されている。例えば、特許文献1には、機械学習によって運転者の動作を判定するための方法が記載されている。特許文献1に記載の方法では、複数の学習用画像を決定木に適用し、ある葉ノードに到達した全ての学習用画像のうち、その葉ノードにおける予測結果と一致する学習用画像の割合を、その葉ノードの信頼度スコアとする。そして、特許文献1に記載の方法では、運転者の画像をランダムフォレストモデルに適用して決定木毎に信頼度スコアを求め、信頼度スコアを用いた重み付け多数決によって運転者の動作を判定する。 One of the machine learning is decision tree learning, and several techniques have been proposed in relation to decision tree learning. For example, Patent Document 1 describes a method for determining a driver's movement by machine learning. In the method described in Patent Document 1, a plurality of learning images are applied to a decision tree, and the ratio of the learning images that match the prediction result in the leaf node among all the learning images that reach a certain leaf node is calculated. , Let it be the confidence score of that leaf node. Then, in the method described in Patent Document 1, the driver's image is applied to a random forest model to obtain a reliability score for each decision tree, and the driver's operation is determined by a weighted majority vote using the reliability score.

特開2015−76104号公報JP 2015-76104

複数の決定木を用いたアンサンブルモデル(例えばランダムフォレストモデル)で決定木の数が多い場合など、判定の過程が複雑になり判定の根拠を解析することが困難な場合がある。判定の根拠がわからない場合、ユーザは判定結果に対するアクションの検討が困難となるため、判定結果を評価するための情報を得られることが好ましい。特許文献1では、葉ノードのみを信頼度の評価対象としており、木構造全体を総合的に評価し、因子ごとの影響度を明確化する方法は示されていない。 When the number of decision trees is large in an ensemble model using a plurality of decision trees (for example, a random forest model), the judgment process may be complicated and it may be difficult to analyze the basis of the judgment. If the basis of the determination is not known, it is difficult for the user to examine the action for the determination result, so it is preferable to obtain information for evaluating the determination result. In Patent Document 1, only leaf nodes are evaluated for reliability, and a method for comprehensively evaluating the entire tree structure and clarifying the degree of influence for each factor is not shown.

本発明は、決定木など木構造の分類モデルを用いた判定について、判定結果の信頼度を評価するための情報を提供することができる分類装置、分類方法およびプログラムを提供する。 The present invention provides a classification device, a classification method, and a program capable of providing information for evaluating the reliability of a judgment result for a judgment using a classification model of a tree structure such as a decision tree.

本発明の第1の態様によれば、分類装置は、分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価部と、前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類部と、前記分類部による分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類部による分類に関する評価値を算出する分類結果評価部と、を備える。 According to the first aspect of the present invention, the classification device includes a branch evaluation unit that calculates the evaluation value of each branch in the classification model of the tree structure used for classifying the data to be classified, and the classification model of the tree structure. For each explanatory variable , the classification unit that classifies the classification target data and obtains the classification result, and the evaluation value of the branch from the node included in the path on the classification model of the tree structure in the classification by the classification unit. It includes a classification result evaluation unit that calculates an evaluation value related to the classification by the classification unit in total .

前記分類結果評価部は、前記経路に含まれるノードからの分岐の前記評価値を合計して、前記分類結果に対する評価値を算出するようにしてもよい。 The classification result evaluation unit may calculate the evaluation value for the classification result by summing the evaluation values of the branches from the nodes included in the route.

前記分類部は、複数の前記木構造の分類モデルの各々における前記分類結果の中から、複数の前記木構造の分類モデル全体における分類結果を選択し、前記分類結果評価部は、複数の前記木構造のモデルの各々における前記分類部の分類に関する評価値に基づいて、複数の前記木構造の分類モデル全体における前記分類部の分類に関する評価値を算出するようにしてもよい。 The classification unit selects the classification results of the entire classification model of the plurality of tree structures from the classification results of each of the plurality of classification models of the tree structure, and the classification result evaluation unit selects the classification results of the plurality of the trees. Based on the evaluation value regarding the classification of the classification unit in each of the structural models, the evaluation value regarding the classification of the classification unit in the entire classification model of the plurality of tree structures may be calculated.

前記分類部は、複数の前記木構造の分類モデルの各々における分類結果に対する前記評価値に基づいて、複数の前記木構造の分類モデルの各々における分類結果の中から、複数の前記木構造の分類モデル全体における分類結果を選択するようにしてもよい。 The classification unit classifies a plurality of the tree structures from the classification results in each of the plurality of tree structure classification models based on the evaluation values for the classification results in each of the plurality of tree structure classification models. The classification result for the entire model may be selected.

前記木構造の分類モデルは決定木であり、前記分岐評価部は、前記決定木における分岐の評価値を分岐の親ノードでの平均情報量と子ノードでの平均情報量との違いに基づいて算出するようにしてもよい。 The classification model of the tree structure is a decision tree, and the branch evaluation unit determines the evaluation value of the branch in the decision tree based on the difference between the average amount of information in the parent node of the branch and the average amount of information in the child node. It may be calculated.

前記分岐評価部は、さらに、前記親ノードに到達した学習用データの数に基づいて、前記決定木における分岐の評価値を算出するようにしてもよい。 The branch evaluation unit may further calculate the evaluation value of the branch in the decision tree based on the number of learning data that has reached the parent node.

前記分岐評価部は、前記木構造のモデルのノード毎に、当該ノードに到達した学習用データに含まれる目的変数値を計数して最多数の目的変数値を検出し、前記分類結果評価部は、さらに、前記経路のうち親ノードと子ノードとで最多数の目的変数値が異なる位置に基づいて、前記分類部の分類結果に対する評価値を算出するようにしてもよい。 The branch evaluation unit counts the objective variable values included in the training data arriving at the node for each node of the tree structure model and detects the largest number of objective variable values, and the classification result evaluation unit Further, the evaluation value for the classification result of the classification unit may be calculated based on the position where the largest number of objective variable values are different between the parent node and the child node in the route.

前記木構造の分類モデルは回帰木であり、前記分岐評価部は、前記回帰木における分岐の親ノードに到達した学習用データに含まれる目的変数値の内平方和と、子ノードに到達した学習用データに含まれる目的変数値の内平方和との違いに基づいて前記分岐の評価値を算出するようにしてもよい。 The classification model of the tree structure is a regression tree, and the branch evaluation unit has reached the sum of squares within the group of the objective variable values included in the training data that reached the parent node of the branch in the regression tree and the child node. The evaluation value of the branch may be calculated based on the difference between the objective variable value included in the training data and the sum of squares within the group .

前記木構造の分類モデルに学習用データを適用した学習結果と適用した学習用データに含まれる目的変数値との関係におけるκ係数を算出し、得られたκ係数に基づいて前記木構造の分類モデルに用いる説明変数を選択する説明変数選択部をさらに備えるようにしてもよい。 The κ coefficient in the relationship between the learning result of applying the training data to the tree structure classification model and the objective variable value included in the applied learning data is calculated, and the tree structure is classified based on the obtained κ coefficient. An explanatory variable selection unit for selecting explanatory variables used in the model may be further provided.

本発明の第2の態様によれば、分類方法は、分類装置が、分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価ステップと、前記分類装置が、前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類ステップと、前記分類装置が、前記分類ステップでの分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類ステップでの分類に関する評価値を算出する分類結果評価ステップと、を含む。 According to the second aspect of the present invention, the classification method includes a branch evaluation step in which the classification device calculates the evaluation value of each branch in the classification model of the tree structure used for classifying the classification target data, and the classification device. However, the classification step of classifying the classification target data using the classification model of the tree structure and acquiring the classification result, and the classification device are used as a route on the classification model of the tree structure in the classification in the classification step. It includes a classification result evaluation step of summing the evaluation values of branches from the included nodes for each explanatory variable and calculating an evaluation value related to classification in the classification step.

本発明の第3の態様によれば、プログラムは、コンピュータに、分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価ステップと、前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類ステップと、前記分類ステップでの分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類ステップでの分類に関する評価値を算出する分類結果評価ステップと、を実行させるためのプログラムである。 According to the third aspect of the present invention, the program uses a computer to perform a branch evaluation step of calculating the evaluation value of each branch in the classification model of the tree structure used for classifying the data to be classified, and the classification of the tree structure. The classification step of classifying the classification target data using a model and acquiring the classification result, and the evaluation value of the branch from the node included in the path on the classification model of the tree structure in the classification in the classification step are described. This is a program for executing a classification result evaluation step of totaling each variable and calculating an evaluation value related to classification in the classification step.

上記した分類装置、分類方法及びプログラムによれば、木構造の分類モデルを用いた判定について、判定結果を評価するための情報を提供することができる。 According to the above-mentioned classification device, classification method and program, it is possible to provide information for evaluating the judgment result for the judgment using the classification model of the tree structure.

本発明の第1実施形態に係る予測装置の機能構成を示す概略ブロック図である。It is a schematic block diagram which shows the functional structure of the prediction apparatus which concerns on 1st Embodiment of this invention. 同実施形態に係る決定木に含まれるノードの例を示す説明図である。It is explanatory drawing which shows the example of the node included in the decision tree which concerns on this embodiment. 同実施形態に係る予測結果評価部が生成する評価用情報の第1の例を示す説明図である。It is explanatory drawing which shows the 1st example of the evaluation information generated by the prediction result evaluation part which concerns on this embodiment. 同実施形態に係る予測結果評価部が生成する評価用情報の第2の例を示す説明図である。It is explanatory drawing which shows the 2nd example of the evaluation information generated by the prediction result evaluation part which concerns on this embodiment. 同実施形態に係る予測結果評価部が評価値の算出に用いるデータの例を示す説明図である。It is explanatory drawing which shows the example of the data used for the calculation of the evaluation value by the prediction result evaluation part which concerns on this embodiment. 同実施形態に係る決定木における経路の第1の例を示す説明図である。It is explanatory drawing which shows the 1st example of the path in the decision tree which concerns on this embodiment. 同実施形態に係る決定木における経路の第2の例を示す説明図である。It is explanatory drawing which shows the 2nd example of the path in the decision tree which concerns on this embodiment. 同実施形態に係る予測結果評価部が算出する重みの例を示す説明図である。It is explanatory drawing which shows the example of the weight calculated by the prediction result evaluation part which concerns on the same embodiment. 同実施形態に係る予測部が重み付け多数決を行う場合の予測結果の確度の例を示すグラフである。It is a graph which shows the example of the accuracy of the prediction result when the prediction unit which concerns on the same embodiment performs a weighted majority vote. 同実施形態に係る回帰木に含まれるノードの例を示す説明図である。It is explanatory drawing which shows the example of the node included in the regression tree which concerns on the same embodiment. 同実施形態に係る予測装置が機械学習を行う処理手順の例を示すフローチャートである。It is a flowchart which shows the example of the processing procedure which the prediction apparatus which concerns on this embodiment performs machine learning. 同実施形態に係る予測装置が予測を行う処理手順の例を示すフローチャートである。It is a flowchart which shows the example of the processing procedure which the prediction apparatus which concerns on this embodiment makes a prediction. 本発明の第2実施形態に係る分類装置の機能構成を示す概略ブロック図である。It is a schematic block diagram which shows the functional structure of the classification apparatus which concerns on 2nd Embodiment of this invention. 同実施形態に係る予測装置による予測結果と正解との関係を示す説明図である。It is explanatory drawing which shows the relationship between the prediction result by the prediction apparatus which concerns on this embodiment, and a correct answer. 因子数が3つの場合に、同実施形態に係る説明変数選択部が因子を選択する処理の例を示す説明図である。It is explanatory drawing which shows the example of the process which the explanatory variable selection part which concerns on the same Embodiment selects a factor when the number of factors is three. 同実施形態に係る説明変数選択部が因子の最適化を行う第1の方法における処理手順の例を示すフローチャートである。It is a flowchart which shows the example of the processing procedure in the 1st method which the explanatory variable selection part which concerns on this embodiment optimizes a factor. 同実施形態に係る誤回答因子の除去に用いる学習用データの例を示す説明図である。It is explanatory drawing which shows the example of the learning data used for removing the erroneous answer factor which concerns on this embodiment. 同実施形態に係る予測結果と正解との関係に対するラベルの例を示す説明図である。It is explanatory drawing which shows the example of the label for the relationship between the prediction result and the correct answer which concerns on this embodiment. 同実施形態に係る制御部が誤回答因子の除去用に生成する決定木の例を示す説明図である。It is explanatory drawing which shows the example of the decision tree generated by the control part which concerns on the same embodiment for removal of an erroneous answer factor. 同実施形態に係る誤回答因子の検出の繰り返しの例を示す説明図である。It is explanatory drawing which shows the example of the repeated detection of the erroneous answer factor which concerns on the same embodiment. 同実施形態に係る説明変数選択部が因子の最適化を行う第2の方法における処理手順の例を示すフローチャートである。It is a flowchart which shows the example of the processing procedure in the 2nd method which the explanatory variable selection part which concerns on this embodiment optimizes a factor.

以下、本発明の実施形態を説明するが、以下の実施形態は請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。 Hereinafter, embodiments of the present invention will be described, but the following embodiments do not limit the inventions claimed. Also, not all combinations of features described in the embodiments are essential to the means of solving the invention.

<第1実施形態>
図1は、本発明の第1実施形態に係る予測装置の機能構成を示す概略ブロック図である。図1に示すように、予測装置100は、データ取得部110と、出力部120と、記憶部180と、制御部190とを備える。制御部190は、分岐評価部191と、予測部192と、予測結果評価部193とを備える。
<First Embodiment>
FIG. 1 is a schematic block diagram showing a functional configuration of the prediction device according to the first embodiment of the present invention. As shown in FIG. 1, the prediction device 100 includes a data acquisition unit 110, an output unit 120, a storage unit 180, and a control unit 190. The control unit 190 includes a branch evaluation unit 191, a prediction unit 192, and a prediction result evaluation unit 193.

予測装置100は、機械学習を行って木(Tree)構造の分類モデルを取得し、得られた分類モデルを用いて分類対象データの分類を行う。予測装置100は、分類装置の例に該当する。
予測装置100が用いる学習用データでは、説明変数値、目的変数値共に示されている。予測装置100が学習によって取得する木構造の分類モデルでは、説明変数値による分岐条件が根ノード(Root Node)及び中間ノード(Intermediate Node)に示され、目的変数値が葉ノード(Leaf Node)に示される。
The prediction device 100 performs machine learning to acquire a classification model of a tree structure, and classifies the classification target data using the obtained classification model. The prediction device 100 corresponds to an example of a classification device.
In the learning data used by the prediction device 100, both the explanatory variable value and the objective variable value are shown. In the tree structure classification model acquired by the prediction device 100 by learning, the branching condition by the explanatory variable value is shown in the root node (Root Node) and the intermediate node (Intermediate Node), and the objective variable value is in the leaf node (Leaf Node). Shown.

一方、予測装置100が用いる分類対象データでは、説明変数値は示されているが目的変数値は示されていない。予測装置100の予測部192は、分類対象データの説明変数値を木のノードに示される分岐条件に適用して、根ノードから葉ノードへ向けて木を辿り、葉ノードに示される目的変数値を取得する。
また、予測装置100の予測結果評価部193は、得られた分類結果を評価するための評価用情報を生成する。予測装置100のユーザは、この評価用情報を参照して、分類結果の確度又は分類の根拠を解析するなど、予測装置100が行った分類を解析することができる。
On the other hand, in the classification target data used by the prediction device 100, the explanatory variable value is shown but the objective variable value is not shown. The prediction unit 192 of the prediction device 100 applies the explanatory variable value of the classification target data to the branching condition shown in the tree node, traces the tree from the root node to the leaf node, and the objective variable value shown in the leaf node. To get.
Further, the prediction result evaluation unit 193 of the prediction device 100 generates evaluation information for evaluating the obtained classification result. The user of the prediction device 100 can analyze the classification performed by the prediction device 100 by referring to the evaluation information, such as analyzing the accuracy of the classification result or the basis of the classification.

以下では、予測装置100が行う分類対象データの分類を予測と称するが、予測装置100の用途は未来の事象の予測に限らない。予測装置100が、過去の事象の分析を行うようにしてもよいし、機器の制御など現在の事象に対する処理を行うようにしてもよい。
以下では、予測装置100が取得する分類対象データを予測対象データと称する。また、予測装置100が用いる分類モデルを予測モデルと称する。
Hereinafter, the classification of the classification target data performed by the prediction device 100 is referred to as prediction, but the application of the prediction device 100 is not limited to the prediction of future events. The prediction device 100 may analyze past events, or may perform processing for current events such as device control.
In the following, the classification target data acquired by the prediction device 100 will be referred to as prediction target data. Further, the classification model used by the prediction device 100 is called a prediction model.

また、以下では、予測装置100が森(Forest)構造の予測モデルを用いる場合を例に説明するが、予測装置100が用いる森構造の予測モデルに含まれる木の数は、1つであってもよい。すなわち、予測装置100が単体の木で構成される予測モデルを用いるようにしてもよい。
また、以下では、1つの装置(予測装置100)が、機械学習と予測対象データに基づく予測とを行う場合を例に説明するが、機械学習を行う装置と予測対象データに基づく予測を行う装置とが別個の装置として構成されていてもよい。
また、以下では、予測装置100が用いる木構造の予測モデルが決定木である場合を例に説明するが、予測装置100が用いる木構造の予測モデルはこれに限らない。後述するように、予測装置100が用いる木構造の予測モデルは回帰木であってもよい。
Further, in the following, the case where the prediction device 100 uses the prediction model of the forest structure will be described as an example, but the number of trees included in the prediction model of the forest structure used by the prediction device 100 is one. May be good. That is, the prediction device 100 may use a prediction model composed of a single tree.
Further, in the following description, a case where one device (prediction device 100) performs machine learning and prediction based on prediction target data will be described as an example, but a device that performs machine learning and a device that performs prediction based on prediction target data. May be configured as a separate device.
Further, in the following, the case where the prediction model of the tree structure used by the prediction device 100 is a decision tree will be described as an example, but the prediction model of the tree structure used by the prediction device 100 is not limited to this. As will be described later, the tree structure prediction model used by the prediction device 100 may be a regression tree.

データ取得部110は、学習用データを取得する。データ取得部110が取得した学習用データを用いて制御部190が機械学習を行い、決定木を生成する。
また、データ取得部110は、予測対象データを取得する。データ取得部110が取得した予測対象データに対し、制御部190の予測部192が、当該予測対象データに基づく予測を行う。
The data acquisition unit 110 acquires learning data. The control unit 190 performs machine learning using the learning data acquired by the data acquisition unit 110 to generate a decision tree.
In addition, the data acquisition unit 110 acquires the prediction target data. The prediction unit 192 of the control unit 190 makes a prediction based on the prediction target data with respect to the prediction target data acquired by the data acquisition unit 110.

データ取得部110は、例えば通信回路を含んで構成され、他の装置と通信を行って学習用データ及び予測対象データを取得する。
但し、データ取得部110が学習用データ及び予測対象データを取得する方法として、他の装置との通信による方法に限らずいろいろな方法を用いることができる。例えば、データ取得部110が外付けの記憶デバイスに対するインタフェースを含んで構成され、記憶デバイスからデータを取得するようにしてもよい。あるいは、記憶部180が学習用データを予め記憶している場合、データ取得部110が記憶部180から学習用データを読み出すようにしてもよい。あるいは、データ取得部110がキーボード等の操作入力デバイスを有し、ユーザ操作によって入力されるデータを取得するようにしてもよい。あるいは、データ取得部110がこれら複数の方法の組み合わせで学習用データ及び予測対象データを取得するようにしてもよい。
The data acquisition unit 110 is configured to include, for example, a communication circuit, and communicates with another device to acquire learning data and prediction target data.
However, as a method for the data acquisition unit 110 to acquire the learning data and the prediction target data, various methods can be used, not limited to the method by communication with other devices. For example, the data acquisition unit 110 may be configured to include an interface to an external storage device to acquire data from the storage device. Alternatively, when the storage unit 180 stores the learning data in advance, the data acquisition unit 110 may read the learning data from the storage unit 180. Alternatively, the data acquisition unit 110 may have an operation input device such as a keyboard to acquire data input by user operation. Alternatively, the data acquisition unit 110 may acquire the learning data and the prediction target data by a combination of these plurality of methods.

出力部120は、予測部192による予測結果、及び、予測結果評価部193が生成した評価用情報を出力する。
例えば出力部120は、液晶パネル又はLED(Light Emitting Diode、発光ダイオード)パネルなどの表示画面を有し、予測結果及び評価用情報を表示画面に表示する。あるいは、出力部120が通信回路を含んで構成され、予測結果及び評価用情報を他の装置へ送信するなど、表示以外の方法で出力を行うようにしてもよい。あるいは、出力部120が、これら複数の方法を組み合わせて、予測結果及び評価用情報の出力を行うようにしてもよい。
The output unit 120 outputs the prediction result by the prediction unit 192 and the evaluation information generated by the prediction result evaluation unit 193.
For example, the output unit 120 has a display screen such as a liquid crystal panel or an LED (Light Emitting Diode) panel, and displays a prediction result and evaluation information on the display screen. Alternatively, the output unit 120 may be configured to include a communication circuit, and output may be performed by a method other than display, such as transmitting a prediction result and evaluation information to another device. Alternatively, the output unit 120 may combine these plurality of methods to output the prediction result and the evaluation information.

記憶部180は、予測装置100が備える記憶デバイスを用いて構成され、各種データを記憶する。
制御部190は、予測装置100の各部を制御して各種処理を行う。制御部190は、例えば予測装置100が備えるCPU(Central Processing Unit、中央処理装置)が、記憶部180からプログラムを読み出して実行することで構成される。
上記のように、制御部190は、データ取得部110が取得した学習用データを用いて機械学習を行い、決定木を生成する。例えば、データ取得部110は、ランダムフォレスト(Random Forest)のアルゴリズムを用いて複数の決定木を生成する。
The storage unit 180 is configured by using the storage device included in the prediction device 100, and stores various data.
The control unit 190 controls each unit of the prediction device 100 to perform various processes. The control unit 190 is configured by, for example, a CPU (Central Processing Unit) included in the prediction device 100 reading a program from the storage unit 180 and executing the program.
As described above, the control unit 190 performs machine learning using the learning data acquired by the data acquisition unit 110 to generate a decision tree. For example, the data acquisition unit 110 generates a plurality of decision trees using an algorithm of a random forest (Random Forest).

分岐評価部191は、決定木における個々の分岐の評価値を算出する。具体的には、分岐評価部191は、分岐元のノードにおける平均情報量(Entropy)と分岐先のノードにおける平均情報量との違いに基づいて分岐の評価値を算出する。さらに具体的には、分岐評価部191は、分岐元のノードと分岐先のノードとの間の情報利得(Information Gain)を算出し、得られた情報利得と分岐元のノードに到達する学習用データの数とを乗算して、分岐の評価値を算出する。 The branch evaluation unit 191 calculates the evaluation value of each branch in the decision tree. Specifically, the branch evaluation unit 191 calculates the evaluation value of the branch based on the difference between the average amount of information (Entropy) at the branch source node and the average information amount at the branch destination node. More specifically, the branch evaluation unit 191 calculates the information gain between the branch source node and the branch destination node, and the obtained information gain is for learning to reach the branch source node. Multiply by the number of data to calculate the evaluation value of the branch.

図2は、決定木に含まれるノードの例を示す説明図である。図2のノードXは、分岐元のノードに該当し、ノードY及びZはいずれも分岐先のノードに該当する。
図2の「到達データ数」の項目は、ノードに到達した学習用データの個数を示している。「正常」の項目は、ノードに到達した学習用データのうち目的変数値が「正常」であるものの個数を示している。「異常」の項目は、ノードに到達した学習用データのうち目的変数値が「異常」であるものの個数を示している。「分割因子」の項目は、分岐条件を示している。ここでいう分岐条件は、予測部192が予測の際に分岐先のノードのいずれかを選択するための判定条件である。
FIG. 2 is an explanatory diagram showing an example of a node included in the decision tree. The node X in FIG. 2 corresponds to the branch source node, and the nodes Y and Z both correspond to the branch destination nodes.
The item of "number of reached data" in FIG. 2 indicates the number of learning data that has reached the node. The "normal" item indicates the number of learning data that have reached the node and whose objective variable value is "normal". The "abnormal" item indicates the number of learning data that have reached the node and whose objective variable value is "abnormal". The item of "dividing factor" shows the branching condition. The branching condition referred to here is a determination condition for the prediction unit 192 to select one of the branching destination nodes at the time of prediction.

図2の例では、ノードXに到達した100個の学習用データのうち、60個の目的変数値が「正常」となっており、40個の目的変数値が「異常」となっている。
また、ノードXでは、回転数が600より大きいか否かが分岐先になっている。予測部192は、予測対象データに示される回転数が600より大きい場合はノードYへ進み、600未満の場合はノードZへ進む。
以下では、予測部192が予測対象データに基づいて特定のノードに到達することを、予測対象データが当該ノードに到達するとも表記する。
ノードXにおける分岐条件のうち回転数は、説明変数の例に該当する。回転数の具体的な数値は、説明変数値の例に該当する。
以下では、説明変数を因子とも称する。
In the example of FIG. 2, 60 objective variable values are "normal" and 40 objective variable values are "abnormal" among the 100 learning data that have reached the node X.
Further, in the node X, whether or not the rotation speed is larger than 600 is the branch destination. The prediction unit 192 proceeds to node Y when the rotation speed shown in the prediction target data is greater than 600, and proceeds to node Z when the rotation speed is less than 600.
Hereinafter, the fact that the prediction unit 192 reaches a specific node based on the prediction target data is also described as the prediction target data reaching the node.
Of the branching conditions at node X, the rotation speed corresponds to the example of the explanatory variable. The specific numerical value of the rotation speed corresponds to the example of the explanatory variable value.
Hereinafter, the explanatory variables are also referred to as factors.

図2の例では、ノードXに到達した100個の予測対象データのうち80個がノードYに分岐し、20個がノードZに分岐している。ノードYに到達した80個の予測対象データのうち60個の目的変数値が「正常」となっており、20個の目的変数値が「異常」となっている。また、ノードYに到達した20個の予測対象データの全てで目的変数値が「異常」となっている。
分岐評価部191は、式(1)に基づいて、ノードXからの分岐の評価値S(X)を算出する。
In the example of FIG. 2, 80 of the 100 prediction target data that have reached the node X are branched to the node Y, and 20 are branched to the node Z. Of the 80 prediction target data that have reached the node Y, 60 objective variable values are "normal" and 20 objective variable values are "abnormal". In addition, the objective variable value is "abnormal" in all of the 20 prediction target data that have reached the node Y.
The branch evaluation unit 191 calculates the evaluation value S (X) of the branch from the node X based on the equation (1).

Figure 0006765911
Figure 0006765911

ここで、N(X)は、ノードXに到達した学習用データの個数を示す。図2の例の場合、N(X)=100である。
また、IG(X)は、ノードXからの分岐における情報利得を示す。情報利得IG(X)は、式(2)のように示される。
Here, N (X) indicates the number of learning data that has reached the node X. In the case of the example of FIG. 2, N (X) = 100.
Further, IG (X) indicates the information gain in the branch from the node X. The information gain IG (X) is expressed by the equation (2).

Figure 0006765911
Figure 0006765911

上記のように、N(X)は、ノードXに到達した学習用データの個数を示す。図2の例の場合、N(X)=100である。N(Y)は、ノードYに到達した学習用データの個数を示す。図2の例の場合、N(Y)=80である。N(Z)は、ノードZに到達した学習用データの個数を示す。図2の例の場合、N(Z)=20である。
また、H(X)、H(Y)、H(Z)は、それぞれノードX、ノードY、ノードZにおける平均情報量を示す。平均情報量H(W)は、式(3)のように示される。
As described above , N (X) indicates the number of training data that has reached the node X. In the case of the example of FIG. 2, N (X) = 100. N (Y) indicates the number of training data that has reached the node Y. In the case of the example of FIG. 2, N (Y) = 80. N (Z) indicates the number of training data that has reached the node Z. In the case of the example of FIG. 2, N (Z) = 20.
Further, H (X), H (Y), and H (Z) indicate the average amount of information in node X, node Y, and node Z, respectively. The average amount of information H (W) is expressed by the equation (3).

Figure 0006765911
Figure 0006765911

ここで、Wはノードを示す。図2の例の場合、WにX、Y、Zをそれぞれ代入する。
また、B1(W)及びB2(W)は、ノードWに到達した学習用データのうち、目標変数値毎に当該目的変数値を示す学習用データの個数を示す。例えばノードXの場合、B1(X)は、目的変数値「正常」を示す学習用データの数「60」であり、B2(X)は、目的変数値「異常」を示す学習用データの数「40」である。
なお、B1とB2とが逆でもよい。すなわち、B1が、目的変数値「異常」を示す学習用データの数を示し、B2が、目的変数値「正常」を示す学習用データの数を示していてもよい。
Here, W indicates a node. In the case of the example of FIG. 2, X, Y, and Z are substituted for W, respectively.
Further, B1 (W) and B2 (W) indicate the number of learning data indicating the objective variable value for each target variable value among the learning data that have reached the node W. For example, in the case of node X, B1 (X) is the number of learning data "60" indicating the objective variable value "normal", and B2 (X) is the number of learning data indicating the objective variable value "abnormal". It is "40".
Note that B1 and B2 may be reversed. That is, B1 may indicate the number of learning data indicating the objective variable value "abnormal", and B2 may indicate the number of learning data indicating the objective variable value "normal".

ノード毎の平均情報量は、当該ノードにおける目的変数値のばらつき度合いを示す。平均情報量が大きいほど、異なる目的変数値の数が同数に近く、平均情報量が小さいほど、いずれかの目的変数値に偏っている。従って、平均情報量が小さいノードほど、目的変数値の整理が進んでいる(すなわち、学習用データの分類が進んでいる)。
図2の例で、ノードXでは、「正常」と「異常」との割合が3:2であるのに対し、ノードYでは3:1になっている。また、ノードXの平均情報量H(X)≒0.971に対し、ノードYの平均情報量H(Y)≒0.811である。このように、ノードXにおける目的変数値よりもノードYにおける目的変数値の方が「正常」に偏っているため、ノードXの平均情報よりもノードYの平均情報量の方が小さくなっている。
The average amount of information for each node indicates the degree of variation in the objective variable value in the node. The larger the average amount of information, the closer the number of different objective variable values is to the same number, and the smaller the average amount of information, the more biased to one of the objective variable values. Therefore, the smaller the average amount of information, the more the objective variable values are organized (that is, the more the training data is classified).
In the example of FIG. 2, the ratio of "normal" to "abnormal" is 3: 2 in the node X, whereas it is 3: 1 in the node Y. Further, the average information amount H (X) of the node X is ≈0.971, whereas the average information amount H (Y) of the node Y is ≈0.811. In this way, since the objective variable value in node Y is biased toward "normal" than the objective variable value in node X, the average amount of information in node Y is smaller than the average information in node X. ..

また、分岐における情報利得は、分岐前後での平均情報量の違いを示す。情報利得が大きい分岐ほど、その分岐によって目的変数値の偏りが大きくなっている。従って、情報利得が大きい分岐ほど、その分岐によって学習用データが効率的に分類されている。
このことから、情報利得が大きい分岐の親ノードを経由して得られた予測結果は、確度が高いと判断できる。
The information gain at the branch indicates the difference in the average amount of information before and after the branch. The larger the information gain, the greater the bias of the objective variable value due to the branch. Therefore, the larger the information gain is, the more efficiently the learning data is classified by the branch.
From this, it can be judged that the prediction result obtained via the parent node of the branch having a large information gain has high accuracy.

ここで、情報利得は平均情報量に基づいて算出され、平均情報量は学習用データの絶対数ではなく個数の比に基づいて算出される。このため、分岐元のノードに到達した学習用データの数が少ない場合、情報利得の大きさが大きくなり易い。一方、分岐元のノードに到達した学習用データの数が少ない場合、このノードからの分岐については、学習結果に対する信頼性が低いといえる。そこで、式(1)では、ノードXに到達した学習用データの個数N(X)を、ノードXからの分岐における情報利得IG(X)に乗算している。これにより、分岐元のノードに到達した学習用データの数が少ないノードからの分岐の評価値が小さくなる。
このように、分岐の評価値として、データが効率的に分類されている度合いの評価値(情報利得の大きさの評価値)を用いる。データが効率的に分類されている分岐ほど分岐の評価値が大きくなる。この分岐の評価値は、いわば所望の分類における分岐の重要度を示す値である。
Here, the information gain is calculated based on the average amount of information, and the average amount of information is calculated based on the ratio of the number of learning data, not the absolute number. Therefore, when the number of learning data that has reached the branching node is small, the magnitude of the information gain tends to be large. On the other hand, when the number of learning data that has reached the branching node is small, it can be said that the reliability of the learning result is low for the branching from this node. Therefore, in the equation (1), the number N (X) of the learning data that has reached the node X is multiplied by the information gain IG (X) in the branch from the node X. As a result, the evaluation value of the branch from the node with a small number of learning data reaching the branch source node becomes small.
In this way, as the evaluation value of the branch, the evaluation value of the degree to which the data is efficiently classified (the evaluation value of the magnitude of the information gain) is used. The more efficiently the data is classified, the larger the evaluation value of the branch. The evaluation value of this branch is, so to speak, a value indicating the importance of the branch in the desired classification.

以下では、ノードからの分岐の評価値を、分岐元のノードのスコアとも称する。例えば、S(X)をノードXのスコアとも称する。図2の例では、IG(X)≒0.16、N(X)=100であり、S(X)≒16である。
分岐評価部191は、機械学習時に制御部190が決定木を生成した段階で、生成された決定木の根ノード及び中間ノード(すなわち、葉ノード以外)の各々について、当該ノードのスコアを算出する。予測装置100が、複数の決定木によるアンサンブルモデルを用いる場合、分岐評価部191は、決定木毎に、根ノードのスコア及び各中間ノードのスコアを算出する。ここでいうアンサンブルモデルは、木構造の予測モデルを複数含むモデルである。予測装置100は、木構造の予測モデルの各々について予測結果を取得し、例えば多数決をとるなど統計的処理を行うことでアンサンブルモデルにおける予測結果を取得する。
In the following, the evaluation value of the branch from the node is also referred to as the score of the node of the branch source. For example, S (X) is also referred to as the score of node X. In the example of FIG. 2, IG (X) ≈0.16, N (X) = 100, and S (X) ≈16.
The branch evaluation unit 191 calculates the score of each of the root node and the intermediate node (that is, other than the leaf node) of the generated decision tree at the stage when the control unit 190 generates the decision tree during machine learning. When the prediction device 100 uses an ensemble model based on a plurality of decision trees, the branch evaluation unit 191 calculates the score of the root node and the score of each intermediate node for each decision tree. The ensemble model referred to here is a model including a plurality of prediction models of a tree structure. The prediction device 100 acquires the prediction result for each of the prediction models of the tree structure, and obtains the prediction result in the ensemble model by performing statistical processing such as taking a majority vote.

また、分岐評価部191は、決定木のモデルのノード毎に、当該ノードに到達する学習用データに含まれる目的変数値を計数して最多数の目的変数値を検出し、記憶部180に記憶させる。分岐評価部191が検出する最多数の目的変数値は、予測結果評価部193が、予測部192による予測に関する評価値を算出する際に、処理対象とするノードを限定する(マスクする)ために用いられる。 Further, the branch evaluation unit 191 counts the objective variable values included in the learning data reaching the node for each node of the model of the decision tree, detects the largest number of objective variable values, and stores them in the storage unit 180. Let me. The largest number of objective variable values detected by the branch evaluation unit 191 are used to limit (mask) the nodes to be processed when the prediction result evaluation unit 193 calculates the evaluation value related to the prediction by the prediction unit 192. Used.

予測部192は、データ取得部110が取得した予測対象データに基づく予測を行う。具体的には、予測部192は、予測対象データに示される説明変数値を参照して決定木を辿り(すなわち、予測対象データを決定木に適用して)、到達した葉ノードに示される目的変数値を取得する。予測部192が取得する目的変数値は、予測結果に該当する。
予測部192は、分類部の例に該当する。
予測装置100が、複数の決定木を含むアンサンブルモデルを用いる場合、予測部192は、決定木毎に目的変数値を取得し、得られた目的変数値の多数決によって、いずれかの目的変数値を選択する。なお、予測部192が、単純多数決に代えて後述する重み付け多数決を行うようにしてもよい。
The prediction unit 192 makes a prediction based on the prediction target data acquired by the data acquisition unit 110. Specifically, the prediction unit 192 traces the decision tree with reference to the explanatory variable value shown in the prediction target data (that is, applies the prediction target data to the decision tree), and the purpose shown in the reached leaf node. Get the variable value. The objective variable value acquired by the prediction unit 192 corresponds to the prediction result.
The prediction unit 192 corresponds to the example of the classification unit.
When the prediction device 100 uses an ensemble model including a plurality of decision trees, the prediction unit 192 acquires the objective variable value for each decision tree, and determines one of the objective variable values by a majority determination of the obtained objective variable values. select. The prediction unit 192 may perform a weighted majority vote, which will be described later, instead of the simple majority vote.

このように、予測部192は、予測対象データに対応する目的変数値を取得することで、予測対象データに基づく予測(判定)を行う。
例えば、目的変数が発電機の回転数及び発電量等の測定データを示し、目的変数値が「正常」または「異常」のいずれかである場合、予測部192は、予測対象データとして取得した測定データに対応する目的変数値として「正常」または「異常」のいずれかを取得する。これにより、予測装置100は、発電機に関する測定データの入力に対して「正常」または「異常」のいずれかの判定結果を出力する。このように、予測部192が行う分類を各種判定に用いることができる。
In this way, the prediction unit 192 makes a prediction (determination) based on the prediction target data by acquiring the objective variable value corresponding to the prediction target data.
For example, when the objective variable indicates measurement data such as the number of revolutions of the generator and the amount of power generation, and the objective variable value is either "normal" or "abnormal", the prediction unit 192 acquires the measurement as the prediction target data. Acquire either "normal" or "abnormal" as the objective variable value corresponding to the data. As a result, the prediction device 100 outputs a determination result of either "normal" or "abnormal" with respect to the input of measurement data relating to the generator. In this way, the classification performed by the prediction unit 192 can be used for various determinations.

予測結果評価部193は、予測部192による予測における決定木上の経路に含まれるノードのスコアに基づいて、予測部192による予測に関する評価値を算出する。そして、予測結果評価部193は、得られた評価値に基づいて分類に関する評価用情報を生成する。予測結果評価部193は、生成した評価用情報を出力部120に出力させる。
予測結果評価部193は、分類結果評価部の例に該当する。
The prediction result evaluation unit 193 calculates an evaluation value related to the prediction by the prediction unit 192 based on the score of the node included in the path on the decision tree in the prediction by the prediction unit 192. Then, the prediction result evaluation unit 193 generates evaluation information regarding the classification based on the obtained evaluation value. The prediction result evaluation unit 193 causes the output unit 120 to output the generated evaluation information.
The prediction result evaluation unit 193 corresponds to the example of the classification result evaluation unit.

図3は、予測結果評価部193が生成する評価用情報の第1の例を示す説明図である。
図3の例で、「データNo.」の項目は、予測対象データ識別番号を示す。予測対象データ識別番号は、予測対象データを識別するための番号である。従って、図3の1行が1つの予測対象データに対応している。
「予測結果」の項目は、予測部192による予測結果を示す。すなわち、「予測結果」の項目には、予測対象データに基づいて予測部192が取得した目的変数値が示されている。
FIG. 3 is an explanatory diagram showing a first example of evaluation information generated by the prediction result evaluation unit 193.
In the example of FIG. 3, the item "Data No." indicates the prediction target data identification number. The prediction target data identification number is a number for identifying the prediction target data. Therefore, one row in FIG. 3 corresponds to one prediction target data.
The item of "prediction result" shows the prediction result by the prediction unit 192. That is, in the item of "prediction result", the objective variable value acquired by the prediction unit 192 based on the prediction target data is shown.

「賛成決定木数」の項目は、予測結果となった目的変数値を示した決定木の数を示している。例えば、予測部192が複数の決定木から得られた目的変数値の単純多数決で予測結果を選択する場合、「賛成決定木数」の項の項目には、最多数となった目的変数値を示した決定木の数を示す。
「確度」の項目は、予測部192による予測結果に対して予測結果評価部193が算出した評価値を示す。評価値が大きいほど予測結果の確度が高いとの評価を示している。
The item "Number of decision trees in favor" indicates the number of decision trees showing the objective variable value that is the prediction result. For example, when the prediction unit 192 selects the prediction result by a simple majority vote of the objective variable values obtained from a plurality of decision trees, the item of the "number of decision trees in favor" section contains the objective variable value having the largest number. The number of decision trees shown is shown.
The item of "accuracy" indicates the evaluation value calculated by the prediction result evaluation unit 193 with respect to the prediction result by the prediction unit 192. The larger the evaluation value, the higher the accuracy of the prediction result.

「重要因子1」、「重要因子2」、・・・の項目は、因子(説明変数)を、予測部192による予測の根拠として重要な順に示す。予測結果評価部193は、因子毎に当該因子の重要度の評価値を算出し、評価値の大きい順に因子を並べる。さらに、予測結果評価部193は、予測結果の項目に示される予測結果となるための目的変数値の条件(例えば、目的変数値の上下限値)を求める。予測結果評価部193は、得られた評価が大きい因子から順に、当該因子について得られた条件を「重要因子1」、「重要因子2」、・・・の欄に格納している。
以下では、重要因子1、重要因子2、・・・を総称して重要因子と表記する。
「スコア」の項目は、該当する重要因子(当該スコアと同じ欄に示されている重要因子)について予測結果評価部193が算出した評価値を示している。
The items "important factor 1", "important factor 2", ... Show the factors (explanatory variables) in the order of importance as the basis for the prediction by the prediction unit 192. The prediction result evaluation unit 193 calculates the evaluation value of the importance of the factor for each factor, and arranges the factors in descending order of the evaluation value. Further, the prediction result evaluation unit 193 obtains the condition of the objective variable value (for example, the upper and lower limits of the objective variable value) for obtaining the prediction result shown in the item of the prediction result. The prediction result evaluation unit 193 stores the conditions obtained for the factor in the columns of "important factor 1", "important factor 2", ..., In order from the factor with the highest evaluation.
In the following, important factors 1, important factors 2, ... Are collectively referred to as important factors.
The item of "score" shows the evaluation value calculated by the prediction result evaluation unit 193 for the corresponding important factor (the important factor shown in the same column as the score).

予測装置100のユーザは、「確度」の項目に示される評価値を、予測結果の確度の判断材料とすることができる。また、予測装置100のユーザは、「重要因子」の項目に示される因子及び条件と、「スコア」の欄に示される評価値とを参考にして、予測の根拠を検討することができる。予測の根拠が妥当か否かを判断することで、予測結果の確度を判断することができる。 The user of the prediction device 100 can use the evaluation value shown in the item of "accuracy" as a material for determining the accuracy of the prediction result. In addition, the user of the prediction device 100 can examine the basis of the prediction by referring to the factors and conditions shown in the item of "important factor" and the evaluation value shown in the column of "score". The accuracy of the prediction result can be judged by judging whether or not the basis of the prediction is valid.

なお、予測結果評価部193が、1つの決定木について1つの評価用情報を生成するようにしてもよい。この場合、「賛成決定木数」の項目が無くなる以外は、図3の例と同様の項目とすることができる。各行には、予測部192が、1つの予測対象データを1つの決定木に適用して行った分類に対する評価用情報が示される。 The prediction result evaluation unit 193 may generate one evaluation information for one decision tree. In this case, the same items as in the example of FIG. 3 can be used except that the item of "number of trees for approval" is eliminated. In each row, evaluation information for the classification performed by the prediction unit 192 by applying one prediction target data to one decision tree is shown.

あるいは、予測結果評価部193が、決定木毎に生成した評価用情報を結合した(1つの情報にまとめた)評価用情報を生成するようにしてもよい。この場合、上記と同様、「賛成決定木数」の項目が無くなり、各行には、予測部192が、1つの予測対象データを1つの決定木に適用して行った分類に対する評価用情報が示される。
さらに、「データNo.」の項目に加えて「決定木No.」の項目を設け、「データNo.」欄を「データNo./決定木No.」欄に置き換える。この「データNo./決定木No.」の欄には、例えば「1/3」のように、その行に示される評価用情報の対象となる予測対象データ識別番号及び決定木識別番号が示される。上記のように、予測対象データ識別番号は、予測対象データを識別するための番号である。また、決定木識別番号は、決定木を識別するための番号である。
それ以外は、図3の例と同様の項目とすることができる。
Alternatively, the prediction result evaluation unit 193 may generate evaluation information (combined into one information) by combining the evaluation information generated for each decision tree. In this case, as in the above, the item of "number of approval decision trees" disappears, and each row shows evaluation information for the classification performed by the prediction unit 192 by applying one prediction target data to one decision tree. Is done.
Further, in addition to the item of "data No.", the item of "decision tree No." is provided, and the "data No." column is replaced with the "data No. / decision tree No." column. In the column of "Data No. / Decision tree No.", for example, "1/3", the prediction target data identification number and the decision tree identification number to be the target of the evaluation information shown in the line are shown. Is done. As described above, the prediction target data identification number is a number for identifying the prediction target data. The decision tree identification number is a number for identifying the decision tree.
Other than that, the items can be the same as those in the example of FIG.

図4は、予測結果評価部193が生成する評価用情報の第2の例を示す説明図である。
図3の例では、因子がスコアの高い順に並んでいたのに対し、図4の例では、予め定められた順に因子が並んでいる。また、図3の例では、因子について得られた条件が示されているのに対し、図4では、この条件の表示は省略されている。それ以外は、図3の場合と同様である。
FIG. 4 is an explanatory diagram showing a second example of evaluation information generated by the prediction result evaluation unit 193.
In the example of FIG. 3, the factors are arranged in descending order of score, whereas in the example of FIG. 4, the factors are arranged in a predetermined order. Further, in the example of FIG. 3, the conditions obtained for the factors are shown, whereas in FIG. 4, the display of these conditions is omitted. Other than that, it is the same as the case of FIG.

図5は、予測結果評価部193が評価値の算出に用いるデータの例を示す説明図である。以下では、予測結果評価部193が評価値の算出に用いるデータを評価値算出用データと称する。
例えば、予測部192が予測対象データに基づく予測のために決定木を辿る際に、決定木毎に評価値算出用データを生成する。あるいは、予測部192が予測対象データに基づく予測を行った後に、予測結果評価部193が評価値算出用データを生成するようにしてもよい。
FIG. 5 is an explanatory diagram showing an example of data used by the prediction result evaluation unit 193 to calculate the evaluation value. In the following, the data used by the prediction result evaluation unit 193 to calculate the evaluation value will be referred to as evaluation value calculation data.
For example, when the prediction unit 192 traces a decision tree for prediction based on the prediction target data, evaluation value calculation data is generated for each decision tree. Alternatively, the prediction result evaluation unit 193 may generate the evaluation value calculation data after the prediction unit 192 makes a prediction based on the prediction target data.

評価値算出用データは、予測部192が予測対象データを分類するために辿った経路における各ノードに関する情報を示す。図5の例では、1つのノードに関する情報が1行に示されている。
図5の例で、「決定木深さ」の項目は、根ノードの深さを「1」とした場合のノードの深さを示す。
The evaluation value calculation data shows information about each node in the route followed by the prediction unit 192 to classify the prediction target data. In the example of FIG. 5, information about one node is shown on one line.
In the example of FIG. 5, the item of "decision tree depth" indicates the depth of the node when the depth of the root node is "1".

「通過ノード」の項目は、ノード識別番号を示す。ノード識別番号は、ノードを識別するための番号であり、「決定木深さ」の項目に示されるノードの深さと、同じ深さのノードの識別番号として付された通し番号とを組み合わせて構成されている。評価値算出用データの各行は、その行の「通過ノード」欄に設定されているノード識別番号のノードに関する情報を示す。 The item of "passing node" indicates the node identification number. The node identification number is a number for identifying a node, and is composed of a combination of the depth of the node shown in the item of "Decision tree depth" and the serial number assigned as the identification number of the node of the same depth. ing. Each row of the evaluation value calculation data indicates information about the node of the node identification number set in the "passing node" column of that row.

「スコア」の項目は、図2を参照して説明したノードのスコアを示す。
「因子」の項目は、分岐条件の判定(分岐先のノードの決定)に用いられた説明変数を示す。
「分岐結果」の項目は、分岐条件の判定の結果を示す。具体的には、「分岐結果」の項目は、分岐条件に含まれる判定閾値、及び、予測対象データに示される説明変数値の判定条件に対する関係(「>」、「=」または「<」など)を示す。
The "score" item indicates the score of the node described with reference to FIG.
The item of "factor" indicates the explanatory variables used for determining the branching condition (determining the node to branch to).
The item of "branch result" indicates the result of determination of the branch condition. Specifically, the item of "branch result" is the relationship between the judgment threshold value included in the branch condition and the judgment condition of the explanatory variable value shown in the prediction target data (">", "=" or "<", etc. ) Is shown.

因子と分岐結果との組み合わせで、分岐先のノードへ分岐するための分岐条件(説明変数値が満たすべき条件)を示す。例えば、図2の例でノードXからノードYへ分岐した場合、因子は「回転数」となり、分岐結果は「>600」となる。一方、ノードXからノードZへ分岐した場合、因子は「回転数」となり、分岐結果は「≦600」となる。
「マジョリティ」の項目は、ノードに到達した学習用データに含まれる目的変数値のうち最多数の目的変数値を示す。例えば、図2の例のノードXの場合、目的変数値「正常」の個数が60で最多であり、マジョリティ(Majority)は「正常」となる。予測部192は、予測対象データに基づく予測の際に到達したノードについて、分岐評価部191が検出した最多数の目的変数値を記憶部180から読出し、評価値算出用データの該当欄に書き込む。
The branch condition (condition that the explanatory variable value should satisfy) for branching to the branch destination node is shown by the combination of the factor and the branch result. For example, when branching from node X to node Y in the example of FIG. 2, the factor is "rotation speed" and the branch result is ">600". On the other hand, when branching from node X to node Z, the factor is "rotation speed" and the branch result is "≦ 600".
The item of "majority" indicates the largest number of objective variable values among the objective variable values included in the learning data that has reached the node. For example, in the case of the node X in the example of FIG. 2, the number of objective variable values “normal” is 60, which is the largest, and the majority is “normal”. The prediction unit 192 reads out the largest number of objective variable values detected by the branch evaluation unit 191 from the storage unit 180 for the node reached at the time of prediction based on the prediction target data, and writes it in the corresponding column of the evaluation value calculation data.

図6は、決定木における経路の第1の例を示す説明図である。
図6の例で、「ノード」の項目は、ノード識別番号を示す。「スコア」の項目は、ノードのスコアを示す。「マジョリティ」の項目は、図5の場合と同様である。「判定」の項目は、決定木としての予測結果を示す。すなわち、「判定」の項目に示される予測結果は、予測部192が、予測対象データに基づく予測の際に決定木を葉ノードまで辿って葉ノードで取得する目的変数値である。
FIG. 6 is an explanatory diagram showing a first example of a route in a decision tree.
In the example of FIG. 6, the item of "node" indicates a node identification number. The "Score" item indicates the score of the node. The item of "majority" is the same as in the case of FIG. The item of "judgment" shows the prediction result as a decision tree. That is, the prediction result shown in the item of "determination" is an objective variable value that the prediction unit 192 traces the decision tree to the leaf node and acquires it at the leaf node at the time of prediction based on the prediction target data.

経路W11は、予測の際に予測部192が辿った経路の例である。図6の例では、予測部192は、ノード1、2−1、3−2、4−2、5−1の順に辿り、葉ノードであるノード5−1で、「正常」との判定結果を取得している。
予測結果評価部193は、予測部192が辿った経路に含まれるノードのスコアを合計することで、決定木における予測結果に対する評価値を算出する。ここでいう決定木における予測結果に対する評価値は、1つの予測対象データについて予測部192が1つの決定木を辿って得た予測結果に対する評価値である。
The route W11 is an example of the route followed by the prediction unit 192 at the time of prediction. In the example of FIG. 6, the prediction unit 192 traces nodes 1, 2-1 and 3-2, 4-2, and 5-1 in this order, and the determination result of "normal" at the leaf node node 5-1. Is getting.
The prediction result evaluation unit 193 calculates the evaluation value for the prediction result in the decision tree by summing the scores of the nodes included in the route followed by the prediction unit 192. The evaluation value for the prediction result in the decision tree referred to here is an evaluation value for the prediction result obtained by the prediction unit 192 following one decision tree for one prediction target data.

図6の例の場合、予測結果評価部193は、ノード4−2、3−2、2−1、1の順に辿り、この決定木における予測結果に対する評価値を2000+1000+800+100=3900と算出する。
決定木における予測結果に対する評価値を算出するために、予測結果評価部193は、図5を参照して説明した評価値算出用データを用いる。具体的には、予測結果評価部193は、評価値算出用データのスコアの項目に示されるノードのスコアを合計することで、決定木における予測結果に対する評価値を算出する。
決定木における予測結果に対する評価値が高い場合、予測の際に予測部192がスコアの高いノードを経由していると考えられる。スコアの高いノードからの分岐は、情報利得が大きく、上記のように学習用データが効率的に分類されている。このことから、評価値が高い予測結果は確度が高いと判断できる。
In the case of the example of FIG. 6, the prediction result evaluation unit 193 traces the nodes 4-2, 3-2, 2-1 and 1 in this order, and calculates the evaluation value for the prediction result in this decision tree as 2000 + 1000 + 800 + 100 = 3900.
In order to calculate the evaluation value for the prediction result in the decision tree, the prediction result evaluation unit 193 uses the evaluation value calculation data described with reference to FIG. Specifically, the prediction result evaluation unit 193 calculates the evaluation value for the prediction result in the decision tree by summing the scores of the nodes shown in the item of the score of the evaluation value calculation data.
When the evaluation value for the prediction result in the decision tree is high, it is considered that the prediction unit 192 goes through the node having a high score at the time of prediction. The branch from the node with a high score has a large information gain, and the training data is efficiently classified as described above. From this, it can be judged that the prediction result with a high evaluation value has high accuracy.

さらに、予測結果評価部193は、アンサンブルモデルのうち同じ予測結果を示す決定木について、決定木における予測結果に対する評価値を合計する。これにより、予測結果評価部193は、アンサンブルモデルにおける予測結果に対する評価値を算出する。ここでいうアンサンブルモデルにおける予測結果に対する評価値は、1つの予測対象データについて予測部192がアンサンブルモデル全体から得た予測結果に対する評価値である。
アンサンブルモデルにおける予測結果に対する評価値は、図3の例及び図4の例の「確度」の項目に示される。上記のように、個々の決定木における予測結果に対する評価値が予測結果の確度を示していると考えられることから、アンサンブルモデルにおける予測結果に対する評価値も、予測結果の確度を示していると考えられる。
Further, the prediction result evaluation unit 193 sums the evaluation values for the prediction results in the decision trees for the decision trees showing the same prediction results in the ensemble model. As a result, the prediction result evaluation unit 193 calculates the evaluation value for the prediction result in the ensemble model. The evaluation value for the prediction result in the ensemble model referred to here is an evaluation value for the prediction result obtained by the prediction unit 192 from the entire ensemble model for one prediction target data.
The evaluation value for the prediction result in the ensemble model is shown in the item of "accuracy" in the example of FIG. 3 and the example of FIG. As described above, since the evaluation value for the prediction result in each decision tree is considered to indicate the accuracy of the prediction result, it is considered that the evaluation value for the prediction result in the ensemble model also indicates the accuracy of the prediction result. Be done.

また、予測結果評価部193は、個々の決定木における因子毎(説明変数毎)の評価値を算出する。具体的には、予測結果評価部193は、予測部192が辿った経路に含まれるノードのスコアを因子毎に合計する。
説明変数毎のモデルを算出するために、予測結果評価部193は、図5を参照して説明した評価値算出用データを用いる。具体的には、予測結果評価部193は、評価値算出用データの因子の項目に示される因子のうち同じ因子を検出する。そして、予測結果評価部193は、因子を検出した行のスコアの欄に示されているノードのスコアを合計することで、因子毎の評価値(すなわち、説明変数毎の評価値)を算出する。
予測結果評価部193は、因子の項目に出現する全ての因子について、因子毎の評価値を算出する。因子の項目に1つのみ出現する因子については、予測結果評価部193は、当該因子が示されている行におけるノードのスコアを、因子毎の評価値とする。
In addition, the prediction result evaluation unit 193 calculates the evaluation value for each factor (each explanatory variable) in each decision tree. Specifically, the prediction result evaluation unit 193 sums the scores of the nodes included in the route followed by the prediction unit 192 for each factor.
In order to calculate the model for each explanatory variable, the prediction result evaluation unit 193 uses the evaluation value calculation data described with reference to FIG. Specifically, the prediction result evaluation unit 193 detects the same factor among the factors shown in the item of the factor of the evaluation value calculation data. Then, the prediction result evaluation unit 193 calculates the evaluation value for each factor (that is, the evaluation value for each explanatory variable) by summing the scores of the nodes shown in the score column of the row in which the factor is detected. ..
The prediction result evaluation unit 193 calculates the evaluation value for each factor for all the factors appearing in the item of the factor. For the factor in which only one appears in the item of the factor, the prediction result evaluation unit 193 sets the score of the node in the row in which the factor is shown as the evaluation value for each factor.

さらに、予測結果評価部193は、アンサンブルモデルのうち同じ予測結果を示す決定木について、説明変数毎の評価値を合計することで、アンサンブルモデルにおける説明変数毎の評価値を算出する。アンサンブルモデルにおける説明変数毎の評価値は、図3の例及び図4の例の「スコア」の項目に示される。 Further, the prediction result evaluation unit 193 calculates the evaluation value for each explanatory variable in the ensemble model by summing the evaluation values for each explanatory variable for the decision tree showing the same prediction result in the ensemble model. The evaluation value for each explanatory variable in the ensemble model is shown in the item of "score" in the example of FIG. 3 and the example of FIG.

また、予測結果評価部193は、因子毎の条件を検出する。ここでいう因子毎の条件は、予測部192が辿った経路となるために説明変数値が有するべき条件である。
因子毎の条件を検出するために、予測結果評価部193は、図5を参照して説明した評価値算出用データを用いる。具体的には、予測結果評価部193は、評価値算出用データの因子の項目に示される因子のうち同じ因子を検出する。そして、予測結果評価部193は、因子を検出した行の分岐結果の欄に示されている分岐結果(因子の値の条件)のアンド(and)をとることで、因子毎の条件を検出する。予測結果評価部193は、例えば、上限値については最も小さい上限値を採用し、下限値については最も大きい下限値を採用する。
予測結果評価部193は、因子の項目に出現する全ての因子について、決定木における因子毎の条件(決定木における因子毎の条件)を検出する。因子の項目に1つのみ出現する因子については、予測結果評価部193は、当該因子が示されている行における分岐結果を、因子毎の条件とする。
In addition, the prediction result evaluation unit 193 detects the conditions for each factor. The condition for each factor referred to here is a condition that the explanatory variable value should have in order to be the route followed by the prediction unit 192.
In order to detect the conditions for each factor, the prediction result evaluation unit 193 uses the evaluation value calculation data described with reference to FIG. Specifically, the prediction result evaluation unit 193 detects the same factor among the factors shown in the item of the factor of the evaluation value calculation data. Then, the prediction result evaluation unit 193 detects the condition for each factor by taking an AND of the branch result (condition of the value of the factor) shown in the column of the branch result of the row in which the factor is detected. .. For example, the prediction result evaluation unit 193 adopts the smallest upper limit value for the upper limit value and the largest lower limit value for the lower limit value.
The prediction result evaluation unit 193 detects the condition for each factor in the decision tree (condition for each factor in the decision tree) for all the factors appearing in the item of the factor. For the factor in which only one appears in the item of the factor, the prediction result evaluation unit 193 sets the branching result in the row in which the factor is shown as a condition for each factor.

さらに予測結果評価部193は、予測結果評価部193は、アンサンブルモデルのうち同じ予測結果を示す決定木について、因子毎の条件のアンドをとることで、アンサンブルモデルにおける因子毎の条件を検出する。アンサンブルモデルにおける因子毎の条件は、図3の例の「重要因子」の項目に示される。
アンサンブルモデルにおける評価値が高い説明変数は、個々の決定木における評価値が高いと考えられる。従って、アンサンブルモデルにおける評価値が高い説明変数は、予測の根拠として重要であると考えられる。
Further, the prediction result evaluation unit 193 detects the condition for each factor in the ensemble model by taking the AND of the condition for each factor for the decision tree showing the same prediction result in the ensemble model. The conditions for each factor in the ensemble model are shown in the "Important Factors" section of the example in FIG.
Explanatory variables with high evaluation values in the ensemble model are considered to have high evaluation values in individual decision trees. Therefore, the explanatory variables with high evaluation values in the ensemble model are considered to be important as the basis for prediction.

図7は、決定木における経路の第2の例を示す説明図である。図7の経路12は、予測対象データに基づく予測の際に予測部192が決定木を辿った経路の例である。
図7の例における決定木は、図6の場合と同じである。一方、経路W12が示す経路が、図6の経路W11が示す経路と異なっている。具体的には、図6の例では、予測部192がノード4−2からノード5−1へ進んでいるのに対し、図7の例では、ノード4−2から5−2へ進んでいる。
FIG. 7 is an explanatory diagram showing a second example of the route in the decision tree. Route 12 in FIG. 7 is an example of a route in which the prediction unit 192 follows a decision tree during prediction based on prediction target data.
The decision tree in the example of FIG. 7 is the same as that of FIG. On the other hand, the route shown by the route W12 is different from the route shown by the route W11 in FIG. Specifically, in the example of FIG. 6, the prediction unit 192 advances from node 4-2 to node 5-1, whereas in the example of FIG. 7, it advances from node 4-2 to 5-2. ..

図6の経路W11ではいずれのノードでもマジョリティが「正常」であったのに対し、図7の経路W12では、ノード4−2で「正常」であったマジョリティが、ノード5−2では「異常」に切り替わっている。なお、葉ノードでは「判定」の項目が「マジョリティ」の項目に相当する。
図7の例のようにマジョリティが切り替わった場合、切り替わり前の分岐は予測結果の決定に貢献してないと評価できる。特に、マジョリティが決定木の深い段(葉ノードに近い箇所)で切り替わった場合、予測結果の決定に貢献している判定の回数(分岐の回数)が少ない点で、この予測結果の信頼性は低いと評価できる。
このようなマジョリティの切り替わりを決定木における予測結果に対する評価値に反映させるため、予測結果評価部193は、評価値の算出対象を限定するための重みを算出する。
In the route W11 of FIG. 6, the majority was "normal" in all the nodes, whereas in the route W12 of FIG. 7, the majority that was "normal" in the node 4-2 was "abnormal" in the node 5-2. It has been switched to. In the leaf node, the item of "judgment" corresponds to the item of "majority".
When the majority is switched as in the example of FIG. 7, it can be evaluated that the branch before the switch does not contribute to the determination of the prediction result. In particular, when the majority is switched at the deep stage of the decision tree (the part near the leaf node), the reliability of this prediction result is low in that the number of judgments (number of branches) that contributes to the determination of the prediction result is small. It can be evaluated as low.
In order to reflect such a change of majority in the evaluation value for the prediction result in the decision tree, the prediction result evaluation unit 193 calculates a weight for limiting the calculation target of the evaluation value.

図8は、予測結果評価部193が算出する重みの例を示す説明図である。図8では、図5の評価値算出用データに「重み」の項目が加わった評価値算出用データが示されている。予測結果評価部193は、図5の評価値算出用データに「重み」の列を加え、評価値算出用データの下側の行(葉ノード側の行)から順に参照してく。そして、予測結果評価部193は、マジョリティが最初に切り替わる親ノード(分岐元のノード)まで重みを「1」に設定し、それより上(根ノード側)のノードについては重みを「0」に設定する。 FIG. 8 is an explanatory diagram showing an example of the weight calculated by the prediction result evaluation unit 193. In FIG. 8, the evaluation value calculation data in which the item of “weight” is added to the evaluation value calculation data of FIG. 5 is shown. The prediction result evaluation unit 193 adds a column of "weight" to the evaluation value calculation data of FIG. 5, and refers to the evaluation value calculation data in order from the lower row (leaf node side row). Then, the prediction result evaluation unit 193 sets the weight to "1" up to the parent node (branch source node) to which the majority switches first, and sets the weight to "0" for the nodes above it (root node side). Set.

重みの値「1」は、ノードを評価値算出の対象とすることを示す。一方、重みの値「0」は、ノードを評価値算出の対象から除外することを示す。
図7の例の場合、予測結果評価部193は、ノード4−2の重みを「1」に設定し、ノード3−2、3−1、1のいずれについても重みを「0」に設定する。そして予測結果評価部193は、設定した重みに基づいてノード4−2のみを決定木における予測結果に対する評価値の算出対象として、当該評価値を100と算出する。
The weight value "1" indicates that the node is the target of the evaluation value calculation. On the other hand, the weight value "0" indicates that the node is excluded from the evaluation value calculation target.
In the case of the example of FIG. 7, the prediction result evaluation unit 193 sets the weight of the node 4-2 to “1” and sets the weight of all of the nodes 3-2, 3-1 and 1 to “0”. .. Then, the prediction result evaluation unit 193 calculates the evaluation value as 100, using only the node 4-2 as the calculation target of the evaluation value for the prediction result in the decision tree based on the set weight.

このように、予測結果評価部193は、算出した重み用いてノードに対するマスキングを行なう。但し、予測結果評価部193が、マスキング以外の重み付けを行うようにしてもよい。例えば、予測結果評価部193が、マジョリティが最初に切り替わる親ノードよりも上のノードの重みを「0.1」に設定し、各ノードのスコアに重みを乗算して合計するようにしてもよい。これにより、決定木における予測結果に対する評価値の算出について、マジョリティが最初に切り替わる親ノードよりも上のノードの影響を調整する(比較的小さくする)ことができる。 In this way, the prediction result evaluation unit 193 masks the nodes using the calculated weights. However, the prediction result evaluation unit 193 may perform weighting other than masking. For example, the prediction result evaluation unit 193 may set the weight of the node above the parent node to which the majority switches first to "0.1", multiply the score of each node by the weight, and add up. .. As a result, the influence of the node above the parent node to which the majority switches first can be adjusted (relatively reduced) for the calculation of the evaluation value for the prediction result in the decision tree.

なお、予測部192が、アンサンブルモデルにおける予測結果を取得する際に、予測結果評価部193が算出した評価値を用いた重み付け多数決を行うようにしてもよい。
具体的には、データ取得部110が予測対象データを取得すると、予測部192は、まず、予測対象データに基づいて各決定木を辿り、決定木毎の予測結果を取得する。そして、予測結果評価部193が、決定木における予測結果に対する評価値(すなわち、予測対象データ毎、かつ、決定木毎の、予測部192による分類に対する評価値)を算出する。そして、予測部192は、同じ予測結果を示す決定木毎に当該評価値を合計し、合計値が最大となった予測結果を選択する。
これにより、予測部192は、各決定木における分類への評価を加味して予測結果を選択することができる。
When the prediction unit 192 acquires the prediction result in the ensemble model, the prediction result evaluation unit 193 may perform a weighted majority vote using the evaluation value calculated by the prediction result evaluation unit 193.
Specifically, when the data acquisition unit 110 acquires the prediction target data, the prediction unit 192 first traces each decision tree based on the prediction target data, and acquires the prediction result for each decision tree. Then, the prediction result evaluation unit 193 calculates the evaluation value for the prediction result in the decision tree (that is, the evaluation value for the classification by the prediction unit 192 for each prediction target data and for each decision tree). Then, the prediction unit 192 sums the evaluation values for each decision tree showing the same prediction result, and selects the prediction result having the maximum total value.
As a result, the prediction unit 192 can select the prediction result in consideration of the evaluation of the classification in each decision tree.

図9は、予測部192が重み付け多数決を行う場合の予測結果の確度の例を示すグラフである。図9は、ランダムフォレストで決定木を生成し、上述した重み付け多数決で予測結果を選択した実験結果を示している。
線L111は、重み付け多数決で予測結果を選択した場合の結果を示している。一方、線L112は、同じくランダムフォレストで線L111の場合と同数の決定木を生成し、単純多数決で予測結果を選択した場合の結果を示している。
FIG. 9 is a graph showing an example of the accuracy of the prediction result when the prediction unit 192 performs a weighted majority vote. FIG. 9 shows the experimental results in which a decision tree was generated in a random forest and the prediction results were selected by the weighted majority vote described above.
Line L111 shows the result when the prediction result is selected by the weighted majority vote. On the other hand, the line L112 shows the result when the same number of decision trees as in the case of the line L111 is generated in the same random forest and the prediction result is selected by the simple majority vote.

また、縦軸は予測結果と学習用データに含まれる説明変数値との関係におけるκ係数(カッパ係数)の値を示している。κ係数値が大きいほど、予測結果の確度が高いと評価できる。
実験では、異なる3つの条件で重み付け多数決の場合と、単純多数決の場合とを比較した。その結果、3つの条件のいずれでも重み付け多数決の場合のほうがκ係数値が大きくなった。
このように、上述した重み付け多数決を行う方が、単純多数決を行う場合よりも予測結果の確度が高くなることが実験で示された。
The vertical axis shows the value of the κ coefficient (kappa coefficient) in the relationship between the prediction result and the explanatory variable value included in the learning data. It can be evaluated that the larger the κ coefficient value, the higher the accuracy of the prediction result.
In the experiment, the case of weighted majority voting and the case of simple majority voting were compared under three different conditions. As a result, the κ coefficient value was larger in the case of weighted majority voting under any of the three conditions.
As described above, it has been experimentally shown that the above-mentioned weighted majority vote has a higher accuracy of the prediction result than the simple majority vote.

なお、予測装置100が用いる木構造の予測モデルは決定木に限らず回帰木であってもよい。回帰木の場合、学習用データの目的変数値として数値が示され、予測装置100は、予測結果として数値を出力する。
回帰木の場合、分岐評価部191は、回帰木における分岐の親ノードに到達した学習ノードに含まれる目的変数値の内平方和と、子ノードに到達した学習用データに含まれる目的変数値の内平方和との違いに基づいてノードのスコアを算出する。
The tree structure prediction model used by the prediction device 100 is not limited to the decision tree but may be a regression tree. In the case of a regression tree, a numerical value is shown as the objective variable value of the learning data, and the prediction device 100 outputs the numerical value as the prediction result.
In the case of the regression tree, the branch evaluation unit 191 includes the sum of squares within the group of the objective variable values included in the learning node that reached the parent node of the branch in the regression tree and the objective variable value included in the learning data that reached the child node. Calculate the node score based on the difference from the sum of squares within the group .

図10は、回帰木に含まれるノードの例を示す説明図である。図10のノードXは、分岐元のノードに該当し、ノードY及びZは、いずれも分岐先のノードに該当する。
図10で、「到達データ数」の項目は、ノードに到達した学習用データの数を示している。「目的変数平均値」の項目は、ノードに到達した学習用データに含まれる目的変数値の平均値を示している。「分割因子」の項目は、図2の場合と同様、分岐条件を示している。
FIG. 10 is an explanatory diagram showing an example of a node included in the regression tree. The node X in FIG. 10 corresponds to the branch source node, and the nodes Y and Z both correspond to the branch destination nodes.
In FIG. 10, the item "number of reached data" indicates the number of learning data that has reached the node. The item of "objective variable mean value" shows the average value of the objective variable values included in the training data reaching the node. The item of "division factor" shows the branching condition as in the case of FIG.

図10の例で、ノードXに到達した学習用データの個数をm+nとする。これらのノードのうちノードYに分岐した学習用データの個数をmとし、ノードZに分岐した学習用データの個数をnとする。また、ノードX、Y、Zに到達した学習用データに含まれる目的変数値の平均値を、それぞれax、ay、azとする。
分岐評価部191は、式(4)に基づいて、ノードXからの分岐の評価値S’(X)を算出する。
In the example of FIG. 10, the number of learning data that has reached the node X is m + n. Of these nodes, the number of learning data branched to node Y is m, and the number of learning data branched to node Z is n. Further, the average value of the objective variable values included in the learning data reaching the nodes X, Y, and Z is ax, ay, and az, respectively.
The branch evaluation unit 191 calculates the evaluation value S'(X) of the branch from the node X based on the equation (4).

Figure 0006765911
Figure 0006765911

N(X)は、式(1)の場合と同様、ノードXに到達した学習用データの個数を示す。図10の例ではN(X)=m+nである。
IG’(X)は、分岐前と分岐後とでの目的変数値のばらつきの大きさの違いを示す指標値であり、式(5)のように示される。
N (X) indicates the number of training data that have reached the node X, as in the case of the equation (1). In the example of FIG. 10, N (X) = m + n.
IG'(X) is an index value indicating the difference in the magnitude of variation in the objective variable value before and after branching, and is expressed as in Eq. (5).

Figure 0006765911
Figure 0006765911

m+nは、上述したようにノードXに到達した学習用データの個数を示す。
H’(X)、H’(Y)、H’(Z)は、それぞれノードX、ノードY、ノードZにおける内平方和を示す。内平方和H’(W)は、式(6)のように示される。
m + n indicates the number of learning data that have reached the node X as described above.
H'(X), H'(Y), and H'(Z) indicate the sum of squares within the group at node X, node Y, and node Z, respectively. The sum of squares in the group H'(W) is expressed by the equation (6).

Figure 0006765911
Figure 0006765911

ここで、Wはノードを示す。図10の例の場合、WにX、Y、Zをそれぞれ代入する。
また、lは、ノードWに到達した学習用データの個数を示す。ノードX、Y、Zの場合、それぞれl=m+n、l=m、l=nとなる。
また、aは、ノードWに到達した学習用データに含まれる目的変数値を示す。aは、ノードWに到達した学習用データに含まれる目的変数値の平均値を示す。ノードX、Y、Zの場合、それぞれa=ax、a=ay、a=azとなる。
Here, W indicates a node. In the case of the example of FIG. 10, X, Y, and Z are substituted for W, respectively.
Further, l indicates the number of learning data that has reached the node W. In the case of nodes X, Y, and Z, l = m + n, l = m, and l = n, respectively.
Further, ai indicates an objective variable value included in the learning data that has reached the node W. a w indicates the average value of the objective variable values included in the learning data that has reached the node W. In the case of nodes X, Y, and Z, a w = ax, a w = ay, and a w = az, respectively.

予測装置100は、分岐の評価値S’(X)を用いることで、分岐の前後での目的変数値のばらつきの度合いの違いを評価することができる。また、式(1)の場合と同様、式(4)でも、分岐元のノードに到達した学習用データの個数が少ない場合の評価値を比較的小さくすることができる。 By using the branch evaluation value S'(X), the prediction device 100 can evaluate the difference in the degree of variation in the objective variable value before and after the branch. Further, as in the case of the equation (1), in the equation (4), the evaluation value when the number of learning data arriving at the branching node is small can be made relatively small.

予測結果評価部193が評価値を算出する際の重み付けに関して、回帰木の場合は決定木の場合と異なりマジョリティという概念が無い。そこで、予測結果評価部193は、最終的な平均値(葉ノードにおける目的変数値の平均)に近いノードほど高い重み付けを行う。具体的には、予測結果評価部193は、深さnのノードに対して式(7)に示される重みWEIGHT(n)で重み付けを行う。 Regarding the weighting when the prediction result evaluation unit 193 calculates the evaluation value, the regression tree does not have the concept of majority unlike the case of the decision tree. Therefore, the prediction result evaluation unit 193 weights the node closer to the final average value (the average of the objective variable values in the leaf nodes). Specifically, the prediction result evaluation unit 193 weights the node having a depth n by the weight WEIGHT (n) shown in the equation (7).

Figure 0006765911
Figure 0006765911

ここで、x(n)は、ノードにおける目的変数値の平均値と最終的な目的変数値の平均値との相違の計算値であり、例えば式(8)に基づいて算出する。 Here, x (n) is a calculated value of the difference between the average value of the objective variable values at the node and the average value of the final objective variable values, and is calculated based on, for example, the equation (8).

Figure 0006765911
Figure 0006765911

ここで、AVは、最終的な平均値を示す。AVn+1は、深さn+1のノードにおける目的変数値の平均を示す。DEVは、初期ノード標準偏差を示す。ここでいう初期ノード標準偏差は、学習用データに含まれる全ての目的変数の標準偏差である。
なお、式(7)は、x(n)の絶対値が大きいほど小さい重みに設定するための式である。式(7)に代えて、x(n)の絶対値が大きいほど小さい重みになるいろいろな式を用いることができる。
Here, AV L indicates the final average value. AV n + 1 indicates the average of the objective variable values in the node having a depth of n + 1. DEV indicates the initial node standard deviation. The initial node standard deviation referred to here is the standard deviation of all the objective variables included in the training data.
The equation (7) is an equation for setting a smaller weight as the absolute value of x (n) is larger. Instead of equation (7), various equations can be used in which the larger the absolute value of x (n), the smaller the weight.

次に、図11〜図12を参照して、予測装置100の動作について説明する。
図11は、予測装置100が機械学習を行う処理手順の例を示すフローチャートである。
図11の処理で、データ取得部110は、学習用データを取得する(ステップS111)。
Next, the operation of the prediction device 100 will be described with reference to FIGS. 11 to 12.
FIG. 11 is a flowchart showing an example of a processing procedure in which the prediction device 100 performs machine learning.
In the process of FIG. 11, the data acquisition unit 110 acquires learning data (step S111).

制御部190は、データ取得部110が取得した学習用データを用いて機械学習を行い、木構造の予測モデルを複数生成する(ステップS112)。制御部190は、例えばランダムフォレストなど既存のアルゴリズムを用いて木構造の予測モデルを複数生成することができる。
また、分岐評価部191は、制御部190が生成した複数の木構造の予測モデルの各々について、根ノード及び各中間ノードのスコアを算出する(ステップS113)。分岐評価部191は、式(1)〜式(3)のように情報利得に基づいてスコアを算出する。回帰木の場合は、式(4)〜式(6)のように、説明変数値の内平方和の違いに基づいてスコアを算出する。
ステップS113の後、図11の処理を終了する。
The control unit 190 performs machine learning using the learning data acquired by the data acquisition unit 110, and generates a plurality of prediction models of the tree structure (step S112). The control unit 190 can generate a plurality of prediction models of the tree structure by using an existing algorithm such as a random forest.
Further, the branch evaluation unit 191 calculates the scores of the root node and each intermediate node for each of the plurality of tree-structured prediction models generated by the control unit 190 (step S113). The branch evaluation unit 191 calculates the score based on the information gain as in the equations (1) to (3). In the case of a regression tree, the score is calculated based on the difference in the sum of squares within the group of the explanatory variable values as in equations (4) to (6).
After step S113, the process of FIG. 11 ends.

図12は、予測装置100が予測を行う処理手順の例を示すフローチャートである。
図12の処理で、データ取得部110は、予測対象データを取得する(ステップS211)。
そして、予測部192は、データ取得部110が用いた予測対象データに基づいて予測を行い、予測結果を取得する(ステップS212)。予測部192は、複数の木構造の予測モデルを辿って各々から予測結果を取得し、得られた予測結果を集計して多数決をとることで、アンサンブルモデル全体における予測結果を取得する。上述したように、予測部192が、複数の木構造の各々における予測結果に対する評価値に基づいて重み付け多数決をとるようにしてもよい。
FIG. 12 is a flowchart showing an example of a processing procedure in which the prediction device 100 makes a prediction.
In the process of FIG. 12, the data acquisition unit 110 acquires the prediction target data (step S211).
Then, the prediction unit 192 makes a prediction based on the prediction target data used by the data acquisition unit 110, and acquires the prediction result (step S212). The prediction unit 192 traces a plurality of tree-structured prediction models, acquires prediction results from each, aggregates the obtained prediction results, and takes a majority vote to acquire the prediction results for the entire ensemble model. As described above, the prediction unit 192 may take a weighted majority vote based on the evaluation value for the prediction result in each of the plurality of tree structures.

ステップS212の後、予測結果評価部193は、予測部192が取得した予測結果を評価するための評価用情報を生成する(ステップS213)。図5〜図8を参照して説明したように、予測結果評価部193は、ノードに対する重みを算出し、算出した重みに基づいて木構造のモデル毎の予測に関する評価用情報を生成する。回帰木の場合は、式(7)の例のように、最終的な平均値に近いほど高い重み付けを行う。 After step S212, the prediction result evaluation unit 193 generates evaluation information for evaluating the prediction result acquired by the prediction unit 192 (step S213). As described with reference to FIGS. 5 to 8, the prediction result evaluation unit 193 calculates the weights for the nodes and generates evaluation information regarding the prediction for each model of the tree structure based on the calculated weights. In the case of a regression tree, as in the example of equation (7), the closer to the final average value, the higher the weighting is performed.

そして、予測結果評価部193は、木構造のモデル毎の予測に関する評価用情報を集計して、図3〜図4の例のようにランダムフォレストモデルにおける予測に関する予測結果情報を生成する。
ステップS213の後、出力部120は、制御部190の制御に従って、予測結果と評価用情報とを出力する(ステップS214)。
ステップS214の後、図12の処理を終了する。
Then, the prediction result evaluation unit 193 aggregates the evaluation information regarding the prediction for each model of the tree structure, and generates the prediction result information regarding the prediction in the random forest model as in the examples of FIGS. 3 to 4.
After step S213, the output unit 120 outputs the prediction result and the evaluation information according to the control of the control unit 190 (step S214).
After step S214, the process of FIG. 12 ends.

以上のように、分岐評価部191は、予測対象データに基づく予測に用いられる木構造の予測モデルにおける個々の分岐の評価値を算出する。予測部192は、木構造の予測モデル用いて予測対象データに基づく予測を行い、予測結果を取得する。予測結果評価部193は、予測部192による予測における木構造の予測モデル上の経路に含まれるノードからの分岐の評価値に基づいて、予測部192による予測に関する評価値を算出する。
このように、予測結果評価部193が予測に関する評価値を算出することで、予測装置100のユーザは、予測結果の確度(予測装置100による判定結果の信頼度)の判断など予測結果の解析に評価値を用いることができる。このように、予測装置100によれば、木構造の予測モデルを用いた判定について、判定結果の信頼度を評価するための情報を提供することができる。
As described above, the branch evaluation unit 191 calculates the evaluation value of each branch in the tree structure prediction model used for the prediction based on the prediction target data. The prediction unit 192 makes a prediction based on the prediction target data using the prediction model of the tree structure, and acquires the prediction result. The prediction result evaluation unit 193 calculates the evaluation value related to the prediction by the prediction unit 192 based on the evaluation value of the branch from the node included in the path on the prediction model of the tree structure in the prediction by the prediction unit 192.
In this way, the prediction result evaluation unit 193 calculates the evaluation value related to the prediction, so that the user of the prediction device 100 can analyze the prediction result such as determining the accuracy of the prediction result (reliability of the judgment result by the prediction device 100). Evaluation values can be used. As described above, the prediction device 100 can provide information for evaluating the reliability of the judgment result for the judgment using the prediction model of the tree structure.

また、予測結果評価部193は、予測部192による予測における木構造の予測モデル上の経路に含まれるノードからの分岐の評価値を説明変数毎に合計して、予測部192による予測における説明変数の評価値を算出する。
予測装置100のユーザは、この評価値を参照することで、予測結果に対する各説明変数の影響の度合いを把握することができ、分類の根拠の検討の参考とすることができる。
Further, the prediction result evaluation unit 193 sums the evaluation values of the branches from the nodes included in the path on the prediction model of the tree structure in the prediction by the prediction unit 192 for each explanatory variable, and the explanatory variable in the prediction by the prediction unit 192. Calculate the evaluation value of.
By referring to this evaluation value, the user of the prediction device 100 can grasp the degree of influence of each explanatory variable on the prediction result, and can use it as a reference for examining the basis of classification.

また、予測結果評価部193は、予測部192による予測における木構造の予測モデル上の経路に含まれるノードからの分岐の評価値を合計して、予測結果に対する評価値を算出する。
この評価値は予測結果の確度に対する評価を示していると考えられ、予測装置100のユーザは、この評価値を参考にして予測結果の確度を判断することができる。
Further, the prediction result evaluation unit 193 totals the evaluation values of the branches from the nodes included in the path on the prediction model of the tree structure in the prediction by the prediction unit 192, and calculates the evaluation value for the prediction result.
This evaluation value is considered to indicate an evaluation for the accuracy of the prediction result, and the user of the prediction device 100 can determine the accuracy of the prediction result with reference to this evaluation value.

また、予測部192は、複数の木構造の予測モデルの各々における予測結果の中から、複数の木構造の予測モデル全体における予測結果を選択する。予測結果評価部193は、複数の木構造のモデルの各々における予測部192の予測に関する評価値に基づいて、複数の木構造の予測モデル全体における予測部192の予測に関する評価値を算出する。
このように、予測結果評価部193が複数の木構造の予測モデル全体における予測に関する評価値を算出することで、予測装置100のユーザは、予測結果の確度の判断など予測結果の解析に評価値を用いることができる。
予測装置が単に予測結果だけを出力する場合、ユーザは、予測の根拠及び予測の確度を判断するためには個々の決定木を自ら解析する必要がある。しかしながら、木の構造が複雑になった場合や、木の数が多くなった場合、分岐条件が複雑に組み合わさって予測が行われており、ユーザが個々の木を解析して予測の根拠や予測の確度を知ることは現実的でない。
これに対し、予測装置100では、ユーザは、予測装置100が提供する情報を予測に関する解析に役立てることができる。
Further, the prediction unit 192 selects the prediction result of the entire prediction model of the plurality of tree structures from the prediction results of each of the prediction models of the plurality of tree structures. The prediction result evaluation unit 193 calculates the evaluation value regarding the prediction of the prediction unit 192 in the entire prediction model of the plurality of tree structures based on the evaluation value regarding the prediction of the prediction unit 192 in each of the plurality of tree structure models.
In this way, the prediction result evaluation unit 193 calculates the evaluation value related to the prediction in the entire prediction model having a plurality of tree structures, so that the user of the prediction device 100 can analyze the prediction result such as determining the accuracy of the prediction result. Can be used.
When the prediction device simply outputs the prediction result, the user needs to analyze each decision tree by himself / herself in order to judge the basis of the prediction and the accuracy of the prediction. However, when the structure of the tree becomes complicated or the number of trees increases, the branching conditions are complicatedly combined to make a prediction, and the user analyzes each tree to obtain the basis for the prediction. It is not realistic to know the accuracy of the prediction.
On the other hand, in the prediction device 100, the user can use the information provided by the prediction device 100 for analysis related to prediction.

また、予測部192は、複数の木構造の予測モデルの各々における予測結果に対する評価値に基づいて、複数の木構造の予測モデルの各々における予測結果の中から、複数の木構造の予測モデル全体における予測結果を選択する。
これにより、予測部192は、各決定木における分類への評価を加味して、評価の高い予測結果を選択することができる。
Further, the prediction unit 192 is based on the evaluation values for the prediction results in each of the plurality of tree structure prediction models, and from among the prediction results in each of the plurality of tree structure prediction models, the entire prediction model of the plurality of tree structures. Select the prediction result in.
As a result, the prediction unit 192 can select a prediction result having a high evaluation in consideration of the evaluation of the classification in each decision tree.

また、分岐評価部191は、決定木における分岐の評価値を分岐の親ノードでの平均情報量と子ノードでの平均情報量との違いに基づいて算出する。
これにより、分岐評価部191は、決定木における分岐について、分岐による目的変数値の整理の度合いを評価することができる。
Further, the branch evaluation unit 191 calculates the evaluation value of the branch in the decision tree based on the difference between the average amount of information in the parent node of the branch and the average amount of information in the child node.
As a result, the branch evaluation unit 191 can evaluate the degree of arrangement of the objective variable values by the branch for the branch in the decision tree.

また、分岐評価部191は、さらに、親ノードに到達した学習用データの数に基づいて、決定木における分岐の評価値を算出する。
これにより、分岐評価部191は、学習用データ数が少ない点で信頼度が低いと考えられる分岐に対する評価値を低くすることができる。
Further, the branch evaluation unit 191 further calculates the evaluation value of the branch in the decision tree based on the number of learning data that has reached the parent node.
As a result, the branch evaluation unit 191 can lower the evaluation value for the branch which is considered to have low reliability in that the number of learning data is small.

また、分岐評価部191は、木構造のモデルのノード毎に、当該ノードに到達した学習用データに含まれる目的変数値を計数して最多数の目的変数値を検出する。そして、予測結果評価部193は、さらに、経路のうち親ノードと子ノードとで最多数の目的変数値が異なる位置に基づいて、予測部192の予測結果に対する評価値を算出する。
ここで、最多数の目的変数値(マジョリティ)が切り替わりよりも上側のノードは、予測結果に対する貢献が小さいと考えられる。予測結果評価部193は、この点を加味して予測結果を評価することができる。
Further, the branch evaluation unit 191 counts the objective variable values included in the learning data that have reached the node for each node of the tree-structured model, and detects the largest number of objective variable values. Then, the prediction result evaluation unit 193 further calculates the evaluation value for the prediction result of the prediction unit 192 based on the position where the largest number of objective variable values are different between the parent node and the child node in the route.
Here, it is considered that the node above the switching of the most objective variable values (majority) has a small contribution to the prediction result. The prediction result evaluation unit 193 can evaluate the prediction result in consideration of this point.

また、分岐評価部191は、回帰木における分岐の親ノードに到達した学習用データに含まれる目的変数値の内平方和と、子ノードに到達した学習用データに含まれる目的変数値の内平方和との違いに基づいて分岐の評価値を算出する。
これにより、分岐評価部191は、回帰木における分岐について、分岐による目的変数値の整理の度合いを評価することができる。
The branch evaluation unit 191, the group of target variable values contained with the group in the sum of squares of the target variable value included in the learning data that has arrived at the parent node of the branch in the regression tree, to the reached learning data to the child node The evaluation value of the branch is calculated based on the difference from the inner square sum.
As a result, the branch evaluation unit 191 can evaluate the degree of arrangement of the objective variable values by the branch for the branch in the regression tree.

<第2実施形態>
図13は、本発明の第2実施形態に係る分類装置の機能構成を示す概略ブロック図である。図13に示す構成では、図1に示す構成に加えて制御部190が説明変数選択部194を備える。それ以外は、図1の場合と同様である。
説明変数選択部194は、予測装置100が用いる因子(学習用データに含まれる説明変数)の最適化を行う。具体的には、説明変数選択部194は、予測装置100による分類の精度が向上するように、現在の因子のうちの一部を選択する。
<Second Embodiment>
FIG. 13 is a schematic block diagram showing a functional configuration of the classification device according to the second embodiment of the present invention. In the configuration shown in FIG. 13, in addition to the configuration shown in FIG. 1, the control unit 190 includes an explanatory variable selection unit 194. Other than that, it is the same as the case of FIG.
The explanatory variable selection unit 194 optimizes the factors (explanatory variables included in the learning data) used by the prediction device 100. Specifically, the explanatory variable selection unit 194 selects a part of the current factors so that the accuracy of classification by the prediction device 100 is improved.

ここで、一般に機械学習では、ある特定の入力データに着目した際に偶然、目的変数をうまく説明する説明因子が存在する場合がある。この説明因子は、特定の入力データのみに対応する汎用性の無い説明因子であり、他の入力データに対しては誤差要因となる。予測精度の高いモデルを得るためには、このように誤差要因となる説明因子を除外する必要がある。そこで、説明変数選択部194は、現在の因子(モデルで用いられている全ての因子)のうち、誤差要因と考えられる因子を除いた因子を選択する。 Here, in general, in machine learning, when focusing on a specific input data, there may be an explanatory factor that explains the objective variable well by chance. This explanatory factor is a non-universal explanatory factor corresponding only to specific input data, and becomes an error factor for other input data. In order to obtain a model with high prediction accuracy, it is necessary to exclude the explanatory factors that cause errors in this way. Therefore, the explanatory variable selection unit 194 selects a factor excluding the factor considered to be an error factor from the current factors (all factors used in the model).

以下では、説明変数選択部194が因子の一部を選択する2つの方法について説明する。第1の方法では、説明変数選択部194は、因子数0から開始して因子を選択していく。第2の方法では、説明変数選択部194は、現在の因子から開始して、精度低下の要因となる因子を除去していく。説明変数選択部194がいずれの方法を用いるようにしてもよい。 In the following, two methods in which the explanatory variable selection unit 194 selects a part of the factors will be described. In the first method, the explanatory variable selection unit 194 starts from the number of factors 0 and selects the factors. In the second method, the explanatory variable selection unit 194 starts from the current factor and removes the factor that causes the decrease in accuracy. Either method may be used by the explanatory variable selection unit 194.

(第1の方法)
第1の方法では、説明変数選択部194は、固定因子数0の状態からスタートし、予測結果と学習用データに含まれる説明変数値との関係におけるκ係数値が最も高くなる因子を探し出して確定因子に加える。κ係数値は、予測結果の確度の目安となり、κ係数値が高いほど予測結果の確度が高いと評価出来る。
そして、説明変数選択部194は、確定因子+残りの1つの因子の全ての組み合わせを試す。説明変数選択部194は、残りの因子がなくなるか、あるいは、κ係数値が上がらなくなるまでこれを繰り返す。
(First method)
In the first method, the explanatory variable selection unit 194 starts from the state where the number of fixed factors is 0, and finds the factor having the highest κ coefficient value in the relationship between the prediction result and the explanatory variable value included in the learning data. Add to deterministic factors. The κ coefficient value serves as a guide for the accuracy of the prediction result, and it can be evaluated that the higher the κ coefficient value, the higher the accuracy of the prediction result.
Then, the explanatory variable selection unit 194 tries all combinations of the deterministic factor + the remaining one factor. The explanatory variable selection unit 194 repeats this until the remaining factors are exhausted or the κ coefficient value does not increase.

ここで、図14を参照してκ係数値を用いた予測結果の確度の算出について説明する。ここでいうκ係数は、見かけ上の一致率から偶然の一致率を除去するために用いられる一般的なκ係数である。
図14は、予測装置100による予測結果と正解との関係を示す説明図である。
例えば予測装置100は、学習用データのうち一部をモデル生成のための学習に用い、残りを検証用データとして用いる。予測装置100は、学習で生成したモデルに検証用データの説明変数値を適用して予測結果を求める。
以下では、モデル生成のためのデータをモデル生成用データと称する。また、モデルの検証用データをモデル精度検証用データとも称する。
Here, the calculation of the accuracy of the prediction result using the κ coefficient value will be described with reference to FIG. The κ coefficient referred to here is a general κ coefficient used to remove the coincidence rate from the apparent match rate.
FIG. 14 is an explanatory diagram showing the relationship between the prediction result by the prediction device 100 and the correct answer.
For example, the prediction device 100 uses a part of the training data for training for model generation and the rest as verification data. The prediction device 100 applies the explanatory variable values of the verification data to the model generated by learning to obtain the prediction result.
Hereinafter, the data for model generation will be referred to as model generation data. The model verification data is also referred to as model accuracy verification data.

図14で、C〜Cの各々は目的変数値を示す。また、ここでいう正解とは、検証用データに含まれる目的変数値である。
また、p11〜pNNは、それぞれ正解と予測結果との組み合わせが生じた確率を示す。例えば、正解Cに対して予測結果がCであった回数を計数し、全数(検証用データの個数)で除算してpN1を算出する。また、p・1=p11+・・・+pN1であり、従って、p・1は、正解がCであった回数を示す。また、図14に示すように、p・1+・・・+p・N=1である。同様に、p1・+・・・+pN・=1である。
これらの値を式(9)の右辺に代入してκ係数値κを求める。
In Figure 14, each of the C 1 -C N denotes the object variable value. The correct answer here is the objective variable value included in the verification data.
In addition, p 11 to p NN indicate the probability that a combination of the correct answer and the prediction result has occurred, respectively. For example, the number of times the prediction result is CN with respect to the correct answer C 1 is counted and divided by the total number (the number of verification data) to calculate p N 1 . Further, a p · 1 = p 11 + ··· + p N1, therefore, p · 1 indicates the number of times the correct answer was C 1. Further, as shown in FIG. 14, p · 1 + ··· + p · N = 1. Similarly, p 1 · + ··· + p N · = 1.
Substitute these values on the right side of equation (9) to obtain the κ coefficient value κ.

Figure 0006765911
Figure 0006765911

なお、Pは、見かけの一致率を示し、Pは偶然による一致率を示す。したがって、κ係数値は、「見かけの一致率のうち、偶然によらない一致率」を「全体の一致率のうち、偶然に依らない一致率」で除算した値となっている。
κ係数の値が大きいほど、予測結果の正解率が高いと言え、このモデルを用いた予測結果は確度(信頼度)が高いと評価できる。このように、ここでのκ係数は、モデルを用いた予測結果の信頼度を示す指標として用いられている。
Incidentally, P 0 denotes the matching rate of the apparent, P e denotes a matching rate by chance. Therefore, the κ coefficient value is the value obtained by dividing the “apparent match rate that does not depend on chance” by the “total match rate that does not depend on chance”.
It can be said that the larger the value of the κ coefficient, the higher the accuracy rate of the prediction result, and it can be evaluated that the prediction result using this model has high accuracy (reliability). As described above, the κ coefficient here is used as an index showing the reliability of the prediction result using the model.

図15は、因子数が3つの場合に説明変数選択部194が因子を選択する処理の例を示す説明図である。
図15の例で、説明変数選択部194は、固定因子数0の状態からスタートする。
試行回数1〜3で、説明変数選択部194は、因子A〜Cについてそれぞれ1つだけを用いることに決定し、制御部190がそれぞれについて学習を行う。説明変数選択部194は、それぞれの学習結果についてκ変数を求める。図15の例では因子Bを用いた場合のκ係数値が最も高く、説明変数選択部194は、因子Bを固定因子に加える。
FIG. 15 is an explanatory diagram showing an example of a process in which the explanatory variable selection unit 194 selects a factor when the number of factors is three.
In the example of FIG. 15, the explanatory variable selection unit 194 starts from the state where the number of fixed factors is 0.
With the number of trials 1 to 3, the explanatory variable selection unit 194 decides to use only one for each of the factors A to C, and the control unit 190 learns about each. The explanatory variable selection unit 194 obtains a κ variable for each learning result. In the example of FIG. 15, the κ coefficient value is the highest when the factor B is used, and the explanatory variable selection unit 194 adds the factor B to the fixed factor.

試行回数4〜5では、説明変数選択部194は、固定因子である因子Bと、残りの因子A、Cのうちの1つとの全ての組み合わせ(従って、B及びAと、B及びCと)を試す。図15の例では、B及びAの組み合わせの場合のκ係数値が最も大きく、かつ、Bのみの場合のκ係数値よりも大きい。そこで、説明変数選択部194は、因子Aを固定因子に加える。
試行回数6では、説明変数選択部194は、固定因子である因子B及びAと、残りの因子である因子Cとの組み合わせ、すなわち、A、B及びCを試す。この場合、κ係数値がA及びBの場合の値よりも小さいため、説明変数選択部194は、因子Cを固定因子に加えない。
In the number of trials 4 to 5, the explanatory variable selection unit 194 uses all combinations of the fixed factor B and one of the remaining factors A and C (hence, B and A and B and C). Try. In the example of FIG. 15, the κ coefficient value in the case of the combination of B and A is the largest, and is larger than the κ coefficient value in the case of B alone. Therefore, the explanatory variable selection unit 194 adds factor A to the fixed factor.
In the number of trials 6, the explanatory variable selection unit 194 tests a combination of the fixed factors B and A and the remaining factors C, that is, A, B and C. In this case, since the κ coefficient value is smaller than the value in the case of A and B, the explanatory variable selection unit 194 does not add the factor C to the fixed factor.

試行回数6の後、残りの因子が無くなったため、説明変数選択部194は処理を終了し、固定因子に加えられている因子B及びAを用いることに決定する。制御部190は、学習用データに含まれる因子のうち、説明変数選択部194が決定した因子を用いて学習を行い、モデルを生成する。 After the number of trials 6, since the remaining factors have disappeared, the explanatory variable selection unit 194 ends the process and decides to use the factors B and A added to the fixed factors. The control unit 190 performs learning using the factors determined by the explanatory variable selection unit 194 among the factors included in the training data, and generates a model.

図16は、説明変数選択部194が因子の最適化を行う第1の方法における処理手順の例を示すフローチャートである。
図16の処理で、説明変数選択部194は、確定因子無し、かつ設定因子数0に初期設定する(ステップS311)。
次に、説明変数選択部194は、設定因子数を1増やす(ステップS312)。
FIG. 16 is a flowchart showing an example of a processing procedure in the first method in which the explanatory variable selection unit 194 optimizes the factors.
In the process of FIG. 16, the explanatory variable selection unit 194 initially sets the number of setting factors to 0 with no deterministic factor (step S311).
Next, the explanatory variable selection unit 194 increases the number of setting factors by 1 (step S312).

そして、説明変数選択部194は、確定因子を全て含んで因子数が設定因子数となる全ての組み合わせを試すループL11を開始する(ステップS313)。すなわち、ループL11で説明変数選択部194は、確定因子全部にもう1つの因子を加えた全ての組み合わせを試す。因子数が多い場合は、ステップS312で設定因子数を2つ以上増やすようにしてもよい。 Then, the explanatory variable selection unit 194 starts a loop L11 that tries all combinations including all the deterministic factors and the number of factors is the number of set factors (step S313). That is, in loop L11, the explanatory variable selection unit 194 tries all combinations in which the other factor is added to all the deterministic factors. If the number of factors is large, the number of set factors may be increased by two or more in step S312.

ループL11では、制御部190が、選択された因子の組み合わせで学習を行ってモデルを生成する(ステップS314)。説明変数選択部194は、生成されたモデルを検証してκ係数値を算出する(ステップS315)。
確定因子を全て含んで因子数が設定因子数となる全ての組み合わせを試し終えるとループL11を終了する(ステップS316)。
In loop L11, the control unit 190 learns with the combination of the selected factors to generate a model (step S314). The explanatory variable selection unit 194 verifies the generated model and calculates the κ coefficient value (step S315).
Loop L11 ends when all combinations including all deterministic factors and the number of factors becomes the number of set factors are tried (step S316).

そして、説明変数選択部194は、ループL11で試した組み合わせのうち、κ係数値が前よりも大きくなる組み合わせが有ったか否かを判定する(ステップS317)。κ係数値が前よりも大きくなる組み合わせが無かったと判定した場合(ステップS317:NO)、図16の処理を終了する。
一方、κ係数値が前よりも大きくなる組み合わせが有ったと判定した場合(ステップS317:YES)、説明変数選択部194は、ループL11で試したうち、κ係数値が最大になった追加因子を確定因子に加える(ステップS318)。ここでいう追加因子は、試した因子の組み合わせのうち、確定因子以外だった因子である。
Then, the explanatory variable selection unit 194 determines whether or not there is a combination in which the κ coefficient value is larger than before among the combinations tested in the loop L11 (step S317). When it is determined that there is no combination in which the κ coefficient value becomes larger than before (step S317: NO), the process of FIG. 16 is terminated.
On the other hand, when it is determined that there is a combination in which the κ coefficient value is larger than before (step S317: YES), the explanatory variable selection unit 194 is an additional factor having the maximum κ coefficient value among the trials in the loop L11. To the deterministic factor (step S318). The additional factor referred to here is a factor other than the deterministic factor among the combinations of the tested factors.

そして、説明変数選択部194は、さらに残りの因子が有るか否かを判定する(ステップS319)ここでは、残りの因子とは確定因子以外の因子である。
残りの因子が有ると判定した場合(ステップS319:YES)、ステップS312へ戻る。一方、残りの因子が無いと判定した場合(ステップS319:NO)、図16の処理を終了する。
Then, the explanatory variable selection unit 194 further determines whether or not there is a remaining factor (step S319). Here, the remaining factor is a factor other than the deterministic factor.
If it is determined that there are remaining factors (step S319: YES), the process returns to step S312. On the other hand, when it is determined that there is no remaining factor (step S319: NO), the process of FIG. 16 ends.

(第2の手法)
第2の手法では、説明変数選択部194は、高確度であるにもかかわらず予測精度(予測結果の確度)を下げてしまう因子を除外する。この因子は、汎用性が無い因子と言える。説明変数選択部194は、予測結果評価部193が生成する因子毎の評価値を用いて因子の確度を判定する。また、説明変数選択部194は、κ係数を用いて予測精度を判定する。
以下では、高確度であるにもかかわらず予測精度を下げてしまう因子を誤回答因子と称する。誤回答因子を検出するために、制御部190は、因子毎の評価値を説明変数値とし、予測結果と正解との関係を示すラベルを目的変数値とした学習データを用いて決定木を生成する。
(Second method)
In the second method, the explanatory variable selection unit 194 excludes factors that lower the prediction accuracy (accuracy of the prediction result) even though the accuracy is high. It can be said that this factor is not versatile. The explanatory variable selection unit 194 determines the accuracy of the factor using the evaluation value for each factor generated by the prediction result evaluation unit 193. Further, the explanatory variable selection unit 194 determines the prediction accuracy using the κ coefficient.
In the following, factors that reduce the prediction accuracy despite the high accuracy are referred to as erroneous answer factors. In order to detect the wrong answer factor, the control unit 190 generates a decision tree using the learning data in which the evaluation value for each factor is used as the explanatory variable value and the label indicating the relationship between the prediction result and the correct answer is used as the objective variable value. To do.

第2の手法で制御部190が行う処理手順の概要は以下のとおりである。
(手順1)学習用のデータをモデル生成用データとモデル精度検証用データに分割する。
(手順2)モデル生成用データから分類モデルを作成する。
(手順3)分類モデルにモデル精度検証用データを入力し、予測結果を得る。
(手順4)予測の当たり外れを目的変数とし、各因子の信頼度を説明変数として、例えば決定木等のモデルを構築する。
(手順5)構築したモデルから、信頼度が高いのに予測が外れる因子(誤回答因子)を特定し、除外する。信頼度の評価指標として、例えばκ係数を用いることができるがこれに限らない。
(手順6)手順1〜5を、誤回答因子として除外する因子が存在しなくなるまで繰り返す。
The outline of the processing procedure performed by the control unit 190 in the second method is as follows.
(Procedure 1) The training data is divided into model generation data and model accuracy verification data.
(Procedure 2) Create a classification model from the model generation data.
(Procedure 3) Input model accuracy verification data into the classification model and obtain prediction results.
(Procedure 4) A model such as a decision tree is constructed by using the hit / miss of the prediction as the objective variable and the reliability of each factor as the explanatory variable.
(Procedure 5) From the constructed model, identify and exclude factors (wrong answer factors) that are highly reliable but unpredictable. For example, the κ coefficient can be used as an evaluation index of reliability, but the present invention is not limited to this.
(Procedure 6) Steps 1 to 5 are repeated until there are no factors to be excluded as false answer factors.

図17は、誤回答因子の除去に用いる学習用データの例を示す説明図である。図7のデータは、予測装置100が学習用データの入力を受けて学習及び検証を行い、図4の例のような因子毎の評価値を入力データ毎かつ決定木毎に算出した結果に基づいて、説明変数選択部194が生成する。1つの検証用データから、図17の1行分のデータが得られる。
図17の「データNo.」の項目は、使用した検証用データの識別番号を示す。
「予測結果」の項目は、検証における予測結果を示す。
「正解」の項目は、検証用データに含まれる目的変数値を示す。
「ラベル」の項目は、予測結果と正解との関係に対するラベルを示す。
FIG. 17 is an explanatory diagram showing an example of learning data used for removing the erroneous answer factor. The data of FIG. 7 is based on the result of the prediction device 100 receiving the input of the learning data, learning and verifying, and calculating the evaluation value for each factor as in the example of FIG. 4 for each input data and for each decision tree. The explanatory variable selection unit 194 is generated. From one verification data, one row of data in FIG. 17 can be obtained.
The item "Data No." in FIG. 17 indicates the identification number of the used verification data.
The item of "Forecast result" indicates the prediction result in the verification.
The "correct answer" item indicates the objective variable value included in the verification data.
The "Label" item indicates a label for the relationship between the prediction result and the correct answer.

図18は、予測結果と正解との関係に対するラベルの例を示す説明図である。図8の「A」、「B」、・・・は、目的変数値を示す。「1」、「2」、・・・は、ラベルを示す。説明変数選択部194は、予測結果の目的変数値と正解の目的変数値との組み合わせ毎のラベルを用いる。目的変数値がn通りある場合、説明変数選択部194は、n通りのラベルを用いる。
図17の「A1」、「A2」、・・・の項目は、図4の「因子1」、「因子2」、・・・の項目のような因子毎の評価値を示す。
FIG. 18 is an explanatory diagram showing an example of a label for the relationship between the prediction result and the correct answer. “A”, “B”, ... In FIG. 8 indicate objective variable values. “1”, “2”, ... Indicates a label. The explanatory variable selection unit 194 uses a label for each combination of the objective variable value of the prediction result and the objective variable value of the correct answer. When there are n objective variable values, the explanatory variable selection unit 194 uses n two labels.
The items "A1", "A2", ... In FIG. 17 indicate the evaluation values for each factor such as the items "Factor 1", "Factor 2", ... In FIG.

図19は、誤回答因子の除去用に制御部190が生成する決定木の例を示す説明図である。制御部190は、図17に示されるデータ構造のデータのうち、「ラベル」の項目の値を目的変数値とし、「A1」、「A2」、・・・の項目の因子毎の評価値を説明変数値として用いる。
制御部190は、学習用データをモデル生成用データと検証用データとに分け、モデル生成用データを用いて決定木を生成する。
FIG. 19 is an explanatory diagram showing an example of a decision tree generated by the control unit 190 for removing the erroneous answer factor. The control unit 190 uses the value of the item "label" as the objective variable value in the data of the data structure shown in FIG. 17, and sets the evaluation value for each factor of the items "A1", "A2", ... Used as an explanatory variable value.
The control unit 190 divides the training data into model generation data and verification data, and generates a decision tree using the model generation data.

図19は、制御部190が生成する決定木の例を示す説明図である。
図19の決定木の各ノードの1行目には、説明変数および分岐条件が示されている。従って、1行目には、因子と、因子毎の評価値の閾値とが示されている。
各ノードの2行目には、ノードに到達した検証用データ数が示されている。
各ノードの3行目及び4行目には、ノードに到達した検証用データ数が、ラベル毎に示されている。
FIG. 19 is an explanatory diagram showing an example of a decision tree generated by the control unit 190.
Explanatory variables and branching conditions are shown in the first line of each node of the decision tree in FIG. Therefore, the factor and the threshold value of the evaluation value for each factor are shown in the first line.
The second line of each node shows the number of verification data that has reached the node.
The third and fourth lines of each node indicate the number of verification data that have reached the node for each label.

例えば、ノードN21の場合、分岐条件は、因子毎の評価値が0.12以下であれば、ノードN31への分岐である。従って、ノードN21の左側の子ノード(ノードN31)の方が、右側の子ノード(ノードN32)よりも因子毎の評価値が小さい。他のノードについても同様に、左側の子ノードの方が右側の子ノードよりも因子毎の評価値が小さくなっている。 For example, in the case of node N21, the branching condition is branching to node N31 if the evaluation value for each factor is 0.12 or less. Therefore, the child node on the left side of the node N21 (node N31) has a smaller evaluation value for each factor than the child node on the right side (node N32). Similarly, for the other nodes, the child node on the left side has a smaller evaluation value for each factor than the child node on the right side.

また、ノードN21に到達したデータの個数は737個であり、そのうち、ラベル「1」、「2」、「3」、「4」のものが、それぞれ253個、30個、432個、22個である。
図19の例では、目的変数値は「正常」と「故障」との2通りであり、ラベル「1」は、正解、予測結果共に「正常」を示す。ラベル「2」は、正解「故障」に対して予測結果「正常」を示す。ラベル「3」は、正解「正常」に対して予測結果「故障」を示す。ラベル「4」は、正解、予測結果共に「故障」を示す。
従って、ラベル「1」及び「4」は正解と予測結果とが一致していることを示し、「2」及び「3」は不一致を示す。
The number of data that reached the node N21 was 737, of which 253, 30, 432, and 22 were labeled "1", "2", "3", and "4", respectively. Is.
In the example of FIG. 19, there are two types of objective variable values, "normal" and "failure", and the label "1" indicates "normal" in both the correct answer and the prediction result. The label "2" indicates the prediction result "normal" with respect to the correct answer "failure". The label "3" indicates the prediction result "failure" with respect to the correct answer "normal". The label "4" indicates "failure" in both the correct answer and the prediction result.
Therefore, the labels "1" and "4" indicate that the correct answer and the prediction result match, and "2" and "3" indicate that they do not match.

説明変数選択部194は、図19の決定木を根ノード(ノードN11)から順に辿る。説明変数選択部194は、根ノードについては、誤回答因子の判定の対象外とする。根ノードの分岐は、予測が合っていたか否かの意味合いではなく、「正常」と予測したか「故障」と予測したかを分ける分岐だからである。
根ノードから出発した説明変数選択部194は、まず、ノードN21に進む。ノードN21では、右下の子ノード(ノードN32)の方が、左下の子ノード(ノードN31)よりもκ係数値が小さい。従って、確度が高い子ノードの方が、予測精度が低い。このことから、ノードN21の因子A9が予測精度を下げていると考えられる。そこで、説明変数選択部194は、ノードN21を誤回答因子として除外する。
説明変数選択部194は、誤回答因子と判定したノードから下については探索を行わない。
The explanatory variable selection unit 194 traces the decision tree of FIG. 19 in order from the root node (node N11). The explanatory variable selection unit 194 excludes the root node from the determination of the erroneous answer factor. This is because the branch of the root node does not mean whether the prediction is correct or not, but the branch that distinguishes whether the prediction is "normal" or "failure".
The explanatory variable selection unit 194 starting from the root node first proceeds to the node N21. In node N21, the lower right child node (node N32) has a smaller κ coefficient value than the lower left child node (node N31). Therefore, the child node with higher accuracy has lower prediction accuracy. From this, it is considered that the factor A9 of the node N21 lowers the prediction accuracy. Therefore, the explanatory variable selection unit 194 excludes the node N21 as an erroneous answer factor.
The explanatory variable selection unit 194 does not search below the node determined to be the erroneous answer factor.

説明変数選択部194は、ノードN21の後、ノードN22へ移動する。ノードN22では、右下の子ノード(ノードN34)の方が、左下の子ノード(ノードN33)よりもκ係数値が大きい。従って、説明変数選択部194は、ノードN22を除外せずに子ノードへ移動する。
ノードN33では、右下の子ノード(ノードN46)の方が、左下の子ノード(ノードN45)よりもκ係数値が大きい。従って、説明変数選択部194は、ノードN33を除外しない。ノードN45又はノードN46からさらに子ノードがあれば、説明変数選択部194は、子ノードのあるノードについて誤回答因子か否かの判定を行う。
The explanatory variable selection unit 194 moves to the node N22 after the node N21. In the node N22, the lower right child node (node N34) has a larger κ coefficient value than the lower left child node (node N33). Therefore, the explanatory variable selection unit 194 moves to the child node without excluding the node N22.
In the node N33, the lower right child node (node N46) has a larger κ coefficient value than the lower left child node (node N45). Therefore, the explanatory variable selection unit 194 does not exclude the node N33. If there are more child nodes from the node N45 or the node N46, the explanatory variable selection unit 194 determines whether or not the node having the child node is an erroneous answer factor.

ノードN34では、右下の子ノード(ノードN48)の方が、左下の子ノード(ノードN47)よりもκ係数値が小さい。そこで、説明変数選択部194はノードN34を誤回答因子として除外する。説明変数選択部194は、誤回答因子とした除去したノードN34から下については、誤回答因子か否かの判定を行わない。
このように、説明変数選択部194は、根ノードから出発して各分岐について、誤回答因子と判定するか、あるいは分岐先のノードが無くなる(すなわち、葉ノードに到達する)まで判定を繰り返す。
説明変数選択部194が決定木の探索を終了すると、制御部190が、誤回答因子を除いた説明変数で学習をし直す。そして、説明変数選択部194は、得られたモデルを検証してモデルのκ係数を算出した後、誤回答因子の検出を再度行う。
In the node N34, the lower right child node (node N48) has a smaller κ coefficient value than the lower left child node (node N47). Therefore, the explanatory variable selection unit 194 excludes the node N34 as an erroneous answer factor. The explanatory variable selection unit 194 does not determine whether or not the node N34 below the removed node N34, which is regarded as an erroneous answer factor, is an erroneous answer factor.
In this way, the explanatory variable selection unit 194 starts from the root node and determines that each branch is an erroneous answer factor, or repeats the determination until there are no nodes at the branch destination (that is, the leaf node is reached).
When the explanatory variable selection unit 194 finishes the search for the decision tree, the control unit 190 re-learns with the explanatory variables excluding the erroneous answer factor. Then, the explanatory variable selection unit 194 verifies the obtained model, calculates the κ coefficient of the model, and then detects the erroneous answer factor again.

図20は、誤回答因子の検出の繰り返しの例を示す説明図である。
1回目の試行では、モデルのκ係数は0.1である。また、説明変数選択部194は、因子Dを誤回答因子として除去している。誤回答因子フラグの「1」が、誤回答因子としての除去を示している。
このように、説明変数選択部194は、誤回答因子として除去した因子をフラグで記憶しておき、全ての因子が無くなるか、或いは、誤回答因子を検出しなくなるまで処理を繰り返す。
全ての因子が無くなるか、誤回答因子を検出しなくなった場合、説明変数選択部194は、検出した因子の組み合わせのうち、モデルのκ係数が最も高い組み合わせに決定する。
FIG. 20 is an explanatory diagram showing an example of repeated detection of an erroneous answer factor.
In the first trial, the κ coefficient of the model is 0.1. Further, the explanatory variable selection unit 194 removes the factor D as an erroneous answer factor. A "1" in the false answer factor flag indicates removal as a false answer factor.
In this way, the explanatory variable selection unit 194 stores the factor removed as the erroneous answer factor as a flag, and repeats the process until all the factors disappear or the erroneous answer factor is no longer detected.
When all the factors disappear or the wrong answer factor is not detected, the explanatory variable selection unit 194 determines the combination of the detected factors having the highest κ coefficient of the model.

図21は、説明変数選択部194が因子の最適化を行う第2の方法における処理手順の例を示すフローチャートである。
図21の処理で、説明変数選択部194は、学習用データに含まれる全因子を使用することに初期設定する(ステップS411)。ステップS411は、上記の手順1に対応する。
次に、制御部190が、学習を行って決定木を生成する(ステップS412)。制御部190は、学習用データをモデル生成用データと検証用データとに分け、モデル生成用データを用いて学習を行って決定木を生成する。ステップS412は、上記の手順2に対応する。
FIG. 21 is a flowchart showing an example of a processing procedure in the second method in which the explanatory variable selection unit 194 optimizes the factors.
In the process of FIG. 21, the explanatory variable selection unit 194 initially sets to use all the factors included in the learning data (step S411). Step S411 corresponds to the above procedure 1.
Next, the control unit 190 performs learning to generate a decision tree (step S412). The control unit 190 divides the training data into model generation data and verification data, and performs learning using the model generation data to generate a decision tree. Step S412 corresponds to step 2 above.

そして、説明変数選択部194は、検証用データを用いてモデルを検証し、モデルのκ係数を算出する(ステップS413)。また、予測結果評価部193が、ステップS413での検証結果に基づいて、誤回答因子検出用の決定木を生成するための学習用データを生成する。
さらに、説明変数選択部194は、図18を参照して説明したように、検証での予測結果と正解との関係(予測成否)をラベル付けする(ステップS414)。
ステップS413〜S414は、上記の手順3に対応する。
Then, the explanatory variable selection unit 194 verifies the model using the verification data and calculates the κ coefficient of the model (step S413). Further, the prediction result evaluation unit 193 generates learning data for generating a decision tree for detecting an erroneous answer factor based on the verification result in step S413.
Further, the explanatory variable selection unit 194 labels the relationship (prediction success / failure) between the prediction result in the verification and the correct answer (step S414), as described with reference to FIG.
Steps S413 to S414 correspond to the above procedure 3.

次に、制御部190は、ステップS413での検証結果に基づいて予測結果評価部193が生成した学習用データを用いて学習を行い、誤回答因子検出用の決定木を生成する(ステップS415)。ここでも制御部190は、学習用データをモデル生成用データと検証用データとに分け、モデル生成用データを用いて学習し、決定木を生成する。
説明変数選択部194は、ステップS415で得られた決定木を検証し、各ノードのκ係数値を算出する(ステップS416)。ステップS415〜S416は、上記の手順4に対応する。
Next, the control unit 190 performs learning using the learning data generated by the prediction result evaluation unit 193 based on the verification result in step S413, and generates a decision tree for detecting an erroneous answer factor (step S415). .. Here, too, the control unit 190 divides the training data into model generation data and verification data, learns using the model generation data, and generates a decision tree.
The explanatory variable selection unit 194 verifies the decision tree obtained in step S415 and calculates the κ coefficient value of each node (step S416). Steps S415 to S416 correspond to the above procedure 4.

そして、説明変数選択部194は、親ノードから順に決定木を探索して誤回答因子を検出する(ステップS417)。
説明変数選択部194は、誤回答因子の検出を完了すると、残り因子の有無、及び、誤回答因子検出の有無を判定する(ステップS418)。ここでいう残り因子とは、誤回答因子として除外されずに残っている因子である。
Then, the explanatory variable selection unit 194 searches the decision tree in order from the parent node and detects an erroneous answer factor (step S417).
When the explanatory variable selection unit 194 completes the detection of the erroneous answering factor, it determines the presence or absence of the remaining factor and the presence or absence of the erroneous answering factor detection (step S418). The remaining factor referred to here is a factor that remains without being excluded as an erroneous answer factor.

残り因子があり、かつ、ステップS417で誤回答因子を検出したと判定した場合(ステップS418:NO)、説明変数選択部194は、誤回答因子を除去する(ステップS419)。図20を参照して説明したように、説明変数選択部194は、ステップS417で誤回答因子と判定した因子にフラグを立てることで、学習時の使用対象から除外する。ステップS417〜S419は、上記の手順5に対応する。
ステップS419の後、ステップS412へ戻る。ステップS419からステップS412へ戻ることによる処理の繰り返しは、上記の手順6に対応する。
When it is determined that there is a remaining factor and the wrong answer factor is detected in step S417 (step S418: NO), the explanatory variable selection unit 194 removes the wrong answer factor (step S419). As described with reference to FIG. 20, the explanatory variable selection unit 194 sets a flag for the factor determined to be the erroneous answer factor in step S417, thereby excluding it from the target of use during learning. Steps S417 to S419 correspond to the above procedure 5.
After step S419, the process returns to step S412. The repetition of the process by returning from step S419 to step S412 corresponds to the above step 6.

一方、ステップS418で、残り因子が無い、あるいは、誤回答因子を検出していないと判定した場合(ステップS418:NO)、図20を参照して説明したように、説明変数選択部194は、誤回答因子の検出を繰り返し行って得られた組み合わせのうち、モデルのκ係数値が最も大きい組み合わせを選択する(ステップS420)。
ステップS420の後、図21の処理を終了する。
On the other hand, when it is determined in step S418 that there is no remaining factor or no erroneous answer factor is detected (step S418: NO), as described with reference to FIG. 20, the explanatory variable selection unit 194 Among the combinations obtained by repeatedly detecting the erroneous answer factors, the combination having the largest κ coefficient value of the model is selected (step S420).
After step S420, the process of FIG. 21 ends.

以上のように、説明変数選択部194は、木構造の分類モデルに学習用データを適用した学習結果と適用した学習用データに含まれる目的変数値との関係におけるκ係数を算出する。そして、説明変数選択部194は、得られたκ係数に基づいて木構造の分類モデルに用いる説明変数を選択する。
説明変数選択部194は、κ係数を用いることで予測精度を評価することができ、予測精度が高くなるように因子を選択することができる。
As described above, the explanatory variable selection unit 194 calculates the κ coefficient in the relationship between the learning result of applying the learning data to the classification model of the tree structure and the objective variable value included in the applied learning data. Then, the explanatory variable selection unit 194 selects an explanatory variable to be used in the classification model of the tree structure based on the obtained kappa coefficient.
The explanatory variable selection unit 194 can evaluate the prediction accuracy by using the κ coefficient, and can select the factors so that the prediction accuracy becomes high.

なお、制御部190の全部または一部の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することで各部の処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間の間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含むものとする。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
A program for realizing all or a part of the functions of the control unit 190 is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read by the computer system and executed. May be processed. The term "computer system" as used herein includes hardware such as an OS and peripheral devices.
In addition, the "computer system" includes a homepage providing environment (or display environment) if a WWW system is used.
Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, or a storage device such as a hard disk built in a computer system. Further, a "computer-readable recording medium" is a communication line for transmitting a program via a network such as the Internet or a communication line such as a telephone line, and dynamically holds the program for a short period of time. In that case, it also includes the one that holds the program for a certain period of time, such as the volatile memory inside the computer system that becomes the server or client. Further, the above-mentioned program may be a program for realizing a part of the above-mentioned functions, and may be a program for realizing the above-mentioned functions in combination with a program already recorded in the computer system.

以上、本発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計変更等も含まれる。 Although the embodiments of the present invention have been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and design changes and the like within a range not deviating from the gist of the present invention are also included.

100 予測装置
110 データ取得部
120 出力部
180 記憶部
190 制御部
191 分岐評価部
192 予測部
193 予測結果評価部
194 説明変数選択部
100 Predictor 110 Data acquisition unit 120 Output unit 180 Storage unit 190 Control unit 191 Branch evaluation unit 192 Prediction unit 193 Prediction result evaluation unit 194 Explanatory variable selection unit

Claims (11)

分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価部と、
前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類部と、
前記分類部による分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類部による分類に関する評価値を算出する分類結果評価部と、
を備える分類装置。
A branch evaluation unit that calculates the evaluation value of each branch in the tree structure classification model used to classify the data to be classified, and a branch evaluation unit.
A classification unit that classifies the classification target data using the tree structure classification model and acquires the classification result,
The classification result evaluation unit that calculates the evaluation value related to the classification by the classification unit by summing the evaluation values of the branches from the nodes included in the path on the classification model of the tree structure in the classification by the classification unit for each explanatory variable. When,
A classification device comprising.
前記分類結果評価部は、前記経路に含まれるノードからの分岐の前記評価値を合計して、前記分類結果に対する評価値を算出する、請求項1に記載の分類装置。 The classification device according to claim 1, wherein the classification result evaluation unit sums the evaluation values of branches from nodes included in the route to calculate an evaluation value for the classification result. 前記分類部は、複数の前記木構造の分類モデルの各々における前記分類結果の中から、複数の前記木構造の分類モデル全体における分類結果を選択し、
前記分類結果評価部は、複数の前記木構造のモデルの各々における前記分類部の分類に関する評価値に基づいて、複数の前記木構造の分類モデル全体における前記分類部の分類に関する評価値を算出する、
請求項1または請求項2に記載の分類装置。
The classification unit selects the classification results of the entire classification model of the plurality of tree structures from the classification results of each of the plurality of classification models of the tree structure.
The classification result evaluation unit calculates an evaluation value regarding the classification of the classification unit in the entire classification model of the plurality of tree structures based on the evaluation value regarding the classification of the classification unit in each of the plurality of models of the tree structure. ,
The classification device according to claim 1 or 2 .
前記分類部は、複数の前記木構造の分類モデルの各々における分類結果に対する前記評価値に基づいて、複数の前記木構造の分類モデルの各々における分類結果の中から、複数の前記木構造の分類モデル全体における分類結果を選択する、請求項に記載の分類装置。 The classification unit classifies a plurality of the tree structures from the classification results in each of the plurality of tree structure classification models based on the evaluation values for the classification results in each of the plurality of tree structure classification models. The classification device according to claim 2 , which selects the classification result in the entire model. 前記木構造の分類モデルは決定木であり、
前記分岐評価部は、前記決定木における分岐の評価値を分岐の親ノードでの平均情報量と子ノードでの平均情報量との違いに基づいて算出する、請求項1からのいずれか一項に記載の分類装置。
The classification model of the tree structure is a decision tree.
The branch evaluation unit calculates the evaluation value of the branch in the decision tree based on the difference between the average amount of information in the parent node of the branch and the average amount of information in the child node, whichever is one of claims 1 to 4. The classification device described in the section.
前記分岐評価部は、さらに、前記親ノードに到達した学習用データの数に基づいて、前記決定木における分岐の評価値を算出する、請求項に記載の分類装置。 The classification device according to claim 5 , wherein the branch evaluation unit further calculates an evaluation value of branch in the decision tree based on the number of learning data that has reached the parent node. 前記分岐評価部は、前記木構造のモデルのノード毎に、当該ノードに到達した学習用データに含まれる目的変数値を計数して最多数の目的変数値を検出し、
前記分類結果評価部は、さらに、前記経路のうち親ノードと子ノードとで最多数の目的変数値が異なる位置に基づいて、前記分類部の分類結果に対する評価値を算出する、
請求項または請求項に記載の分類装置。
The branch evaluation unit counts the objective variable values included in the learning data arriving at the node for each node of the tree-structured model, and detects the largest number of objective variable values.
The classification result evaluation unit further calculates an evaluation value for the classification result of the classification unit based on the position where the largest number of objective variable values are different between the parent node and the child node in the route.
The classification device according to claim 5 or 6 .
前記木構造の分類モデルは回帰木であり、
前記分岐評価部は、前記回帰木における分岐の親ノードに到達した学習用データに含まれる目的変数値の内平方和と、子ノードに到達した学習用データに含まれる目的変数値の内平方和との違いに基づいて前記分岐の評価値を算出する、
請求項1からのいずれか一項に記載の分類装置。
The classification model of the tree structure is a regression tree,
The branch evaluation unit, wherein the group in the sum of squares of the target variable value included in the learning data that has arrived at the parent node of the branch in the regression tree, a group of target variable values included in the learning data which has reached the child node The evaluation value of the branch is calculated based on the difference from the sum of squares.
The classification device according to any one of claims 1 to 4 .
前記木構造の分類モデルに学習用データを適用した学習結果と適用した学習用データに含まれる目的変数値との関係におけるκ係数を算出し、得られたκ係数に基づいて前記木構造の分類モデルに用いる説明変数を選択する説明変数選択部をさらに備える、請求項1からのいずれか1項に記載の分類装置。 The κ coefficient in the relationship between the learning result of applying the training data to the tree structure classification model and the objective variable value included in the applied learning data is calculated, and the tree structure is classified based on the obtained κ coefficient. The classification device according to any one of claims 1 to 8 , further comprising an explanatory variable selection unit for selecting explanatory variables to be used in the model. 分類装置が、分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価ステップと、
前記分類装置が、前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類ステップと、
前記分類装置が、前記分類ステップでの分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類ステップでの分類に関する評価値を算出する分類結果評価ステップと、
を含む分類方法。
A branch evaluation step in which the classification device calculates the evaluation value of each branch in the classification model of the tree structure used for classifying the data to be classified.
A classification step in which the classification device classifies the classification target data using the tree structure classification model and acquires a classification result.
The classification device sums the evaluation values of the branches from the nodes included in the path on the classification model of the tree structure in the classification in the classification step for each explanatory variable , and the evaluation value related to the classification in the classification step. Classification result evaluation step to calculate
Classification method including.
コンピュータに、
分類対象データの分類に用いられる木構造の分類モデルにおける個々の分岐の評価値を算出する分岐評価ステップと、
前記木構造の分類モデルを用いて前記分類対象データを分類して分類結果を取得する分類ステップと、
前記分類ステップでの分類における前記木構造の分類モデル上の経路に含まれるノードからの分岐の前記評価値を説明変数毎に合計して、前記分類ステップでの分類に関する評価値を算出する分類結果評価ステップと、
を実行させるためのプログラム。
On the computer
A branch evaluation step that calculates the evaluation value of each branch in the tree structure classification model used to classify the data to be classified, and a branch evaluation step.
A classification step of classifying the classification target data using the tree structure classification model and acquiring the classification result, and
Classification result of totaling the evaluation value of the branch from the node included in the path on the classification model of the tree structure in the classification in the classification step for each explanatory variable and calculating the evaluation value related to the classification in the classification step. Evaluation steps and
A program to execute.
JP2016180696A 2016-09-15 2016-09-15 Classification device, classification method and program Active JP6765911B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016180696A JP6765911B2 (en) 2016-09-15 2016-09-15 Classification device, classification method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016180696A JP6765911B2 (en) 2016-09-15 2016-09-15 Classification device, classification method and program

Publications (2)

Publication Number Publication Date
JP2018045516A JP2018045516A (en) 2018-03-22
JP6765911B2 true JP6765911B2 (en) 2020-10-07

Family

ID=61694886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016180696A Active JP6765911B2 (en) 2016-09-15 2016-09-15 Classification device, classification method and program

Country Status (1)

Country Link
JP (1) JP6765911B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6708847B1 (en) * 2018-07-04 2020-06-10 株式会社エイシング Machine learning apparatus and method
WO2020044815A1 (en) * 2018-08-27 2020-03-05 日本電気株式会社 Discriminable data sorting system, method, and program
JP7059220B2 (en) 2019-02-15 2022-04-25 株式会社日立製作所 Machine learning program verification device and machine learning program verification method
JP7392304B2 (en) * 2019-07-05 2023-12-06 富士通株式会社 Prediction program, prediction method and prediction device
KR102132375B1 (en) * 2019-07-05 2020-07-09 한국과학기술원 Deep learning model based image diagnosis apparatus and method thereof
JP7442310B2 (en) 2019-12-11 2024-03-04 西日本旅客鉄道株式会社 Trained model generator, failure prediction device, failure prediction system, failure prediction program, and trained model
KR102425056B1 (en) * 2021-09-17 2022-07-27 주식회사 에이아이네이션 Apparatus and Method for Evaluating Reliability of Data Prediction Results Using Artificial Intelligence Model
KR102425052B1 (en) * 2021-09-17 2022-07-27 주식회사 에이아이네이션 Apparatus for Maintaining and Managing Health Index of Artificial Intelligence Model and System Including the Same
WO2023043214A1 (en) * 2021-09-17 2023-03-23 주식회사 에이아이네이션 Health index maintenance/management device for artificial intelligence model, and system comprising same
KR102615517B1 (en) 2022-07-15 2023-12-19 주식회사 에이아이네이션 Technique for class and property classification of input data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3897169B2 (en) * 2002-11-07 2007-03-22 富士電機ホールディングス株式会社 Decision tree generation method and model structure generation apparatus
JP2014241060A (en) * 2013-06-12 2014-12-25 日本電気株式会社 Tree model learning device, tree model learning method, and tree model learning program
US9501693B2 (en) * 2013-10-09 2016-11-22 Honda Motor Co., Ltd. Real-time multiclass driver action recognition using random forests
JP2016103094A (en) * 2014-11-27 2016-06-02 株式会社豊田自動織機 Image processing method, image processor, and image processing program

Also Published As

Publication number Publication date
JP2018045516A (en) 2018-03-22

Similar Documents

Publication Publication Date Title
JP6765911B2 (en) Classification device, classification method and program
JP6509694B2 (en) Learning device, speech detection device, learning method and program
CN109729395B (en) Video quality evaluation method and device, storage medium and computer equipment
CN110532376B (en) Classifying text to determine a target type for selecting machine learning algorithm results
CN109491914B (en) High-impact defect report prediction method based on unbalanced learning strategy
CN112235327A (en) Abnormal log detection method, device, equipment and computer readable storage medium
US9842279B2 (en) Data processing method for learning discriminator, and data processing apparatus therefor
CN109408743A (en) Text link embedding grammar
JP7070584B2 (en) Discriminant model generator, discriminant model generation method and discriminant model generator
CN112699045A (en) Software test case generation method based on multi-population genetic algorithm
US11983105B2 (en) Systems and methods for generating and executing a test case plan for a software product
US20190026650A1 (en) Bootstrapping multiple varieties of ground truth for a cognitive system
CN108470194B (en) Feature screening method and device
KR101745874B1 (en) System and method for a learning course automatic generation
RU2019125454A (en) METHOD AND SYSTEM FOR AUTOMATED DETERMINATION OF INCLUSION OR EXCLUSION CRITERIA
CN111161884A (en) Disease prediction method, device, equipment and medium for unbalanced data
JPWO2020090826A1 (en) Analytical equipment, machine learning equipment, analysis systems, analysis methods and programs
JP2015225410A (en) Recognition device, method and program
US10665123B2 (en) Smart examination evaluation based on run time challenge response backed by guess detection
JP7349404B2 (en) Judgment device, judgment method and judgment program
JP7202757B1 (en) Information processing system, information processing method and program
US20220188703A1 (en) Data generation apparatus and method thereof
CN114373546A (en) Disease risk assessment method, device and storage medium
KR20230049486A (en) Political tendency analysis device and service providing method using the same
KR20160069027A (en) System and method for indexing image based on affect

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20160916

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20181109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200618

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200824

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200916

R150 Certificate of patent or registration of utility model

Ref document number: 6765911

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150