JP3761868B2 - Data classification apparatus, data classification method, and program for causing computer to execute the method - Google Patents
Data classification apparatus, data classification method, and program for causing computer to execute the method Download PDFInfo
- Publication number
- JP3761868B2 JP3761868B2 JP2003074367A JP2003074367A JP3761868B2 JP 3761868 B2 JP3761868 B2 JP 3761868B2 JP 2003074367 A JP2003074367 A JP 2003074367A JP 2003074367 A JP2003074367 A JP 2003074367A JP 3761868 B2 JP3761868 B2 JP 3761868B2
- Authority
- JP
- Japan
- Prior art keywords
- classification
- binary
- feature value
- priority
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 62
- 238000004364 calculation method Methods 0.000 claims description 19
- 230000001174 ascending effect Effects 0.000 claims description 11
- 238000012706 support-vector machine Methods 0.000 description 14
- 230000000694 effects Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 241000287462 Phalacrocorax carbo Species 0.000 description 1
- NIXOWILDQLNWCW-UHFFFAOYSA-N acrylic acid group Chemical group C(C=C)(=O)O NIXOWILDQLNWCW-UHFFFAOYSA-N 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】
【発明の属する技術分野】
この発明は、入力データが第1の分類あるいは第2の分類のいずれに分類されるかを判別する2値分類器を複数使用して前記入力データの多値分類を行うデータ分類装置、データ分類方法およびその方法をコンピュータに実行させるプログラムに関する。
【0002】
【従来の技術】
サポートベクターマシン(SVM:Support Vector Machine)は汎化能力の高い2値分類器であるが、複数のSVMを組み合わせることで多値分類器へと拡張した場合に、処理速度の遅さがネックとなっている。
【0003】
SVMを利用した多値分類アルゴリズムとして、代表的なものにone vsrest法、pairwise法、DDAG(Decision Directed Acyclic Graph)法などがある。このうち最も分類が高速なDDAG法は、「John C.Platt,Nello Cristiani,John Shawe−Taylor (2000) Large Margin DAGs for Multiclass Classification. In Advances in NIPS 12,MIT Press.」で発表している通り、pairwise法の高速化手法である。
【0004】
図6は、DDAG法による多値分類の手順を模式的に示す説明図である。DDAG法ではまず分類(分類先となるカテゴリ)、すなわち同図の例では「A」「B」「C」「D」の4つを一列に並べる。次に分類対象である入力データが、列の先頭の分類「A」と末尾の分類「D」のいずれに分類されるかをSVMで判別する(図中「A/D判別」)。そして判別されなかったほうの分類、たとえば上記SVMでAと判別された場合には、Dを列から棄却(削除)して、次に入力データが当該列の先頭「A」と末尾「C」のいずれに分類されるかを他のSVMで判別する(図中「A/C判別」)。
【0005】
以後は上記と同様の処理を、列内の分類が1つになるまで繰り返し、最終的に残った分類を多値分類の結果として出力する。n値分類に必要な2値分類の回数が、pairwise法ではnC2回であるのに対し、DDAG法ではn−1回となるので、そのぶん処理時間を短縮できる。
【0006】
【発明が解決しようとする課題】
しかしながらDDAG法をもってしても、実用上十分な速度での多値分類を実現できない場合がある。そしてその原因としては、SVMそのものの遅さもさることながら、上記手法が個々の2値分類にかかる時間の長短を考慮していないことが挙げられる。
【0007】
たとえば図6で示した例において、多値分類にかかる平均時間(平均多値分類時間)は、
平均多値分類時間=(A/D判別時間)+{p(A/C判別時間)+(1−p)(B/D判別時間)}+{q(A/B判別時間)+r(B/C判別時間)+(1−q−r)(C/D判別時間)}
ただしp:A/C判別が実行される確率(0≦p≦1)
q:A/B判別が実行される確率(0≦q≦1)
r:B/C判別が実行される確率(0≦r≦1)
である。
【0008】
したがって、A〜Dの任意の2つの組み合わせのうち、たとえばAとDとの判別が最も時間のかかる2値分類だったとすると、それだけ上記時間は大きくなってしまう。言い換えれば、分類を1列に並べたときにたまたまAが先頭、Dが末尾にあったというだけで、多値分類の都度この最も時間のかかるA/D判別を必ず経由することになり、無駄が大きい。
【0009】
この発明は上記従来技術による問題を解決するため、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置、データ分類方法およびその方法をコンピュータに実行させるプログラムを提供することを目的とする。
【0010】
【課題を解決するための手段】
上述した課題を解決し、目的を達成するため、この発明にかかるデータ分類装置は、入力データが第1の分類あるいは第2の分類のいずれに分類されるかを判別する2値分類器を複数使用して前記入力データの多値分類を行うデータ分類装置において、前記各2値分類器の特徴値を算出する特徴値算出手段と、前記特徴値算出手段により算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定手段と、前記優先順位決定手段により決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類手段と、を備えたことを特徴とする。
【0011】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0012】
また、この発明にかかるデータ分類装置は、上記に記載の発明において、前記2値分類器がSVMであり、前記特徴値算出手段が前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出することを特徴とする。
【0013】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはSVの個数などから算出されたその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0014】
また、この発明にかかるデータ分類装置は、上記に記載の発明において、前記優先順位決定手段が、前記特徴値算出手段により算出された特徴値の昇順にソートしたときの各2値分類器の順位を前記優先順位として決定することを特徴とする。
【0015】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値が小さいものから順に使用される。
【0016】
また、この発明にかかるデータ分類装置は、上記に記載の発明において、前記多値分類手段が、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定手段により決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すことを特徴とする。
【0017】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0018】
また、この発明にかかるデータ分類装置は、上記に記載の発明において、前記条件が、棄却された分類の個数が所定の個数に達したか、あるいは次に使用する2値分類器につき前記特徴値算出手段により算出された特徴値が所定の閾値に達したことであることを特徴とする。
【0019】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用されるとともに、ある程度以上にコスト高となる2値分類器は使用されない。
【0020】
また、この発明にかかるデータ分類方法は、入力データが第1の分類あるいは第2の分類のいずれに分類されるかを判別する2値分類器を複数使用して前記入力データの多値分類を行うデータ分類方法において、前記各2値分類器の特徴値を算出する特徴値算出工程と、前記特徴値算出工程で算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定工程と、前記優先順位決定工程で決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類工程と、を含んだことを特徴とする。
【0021】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0022】
また、この発明にかかるデータ分類方法は、上記に記載の発明において、前記2値分類器がSVMであり、前記特徴値算出工程では前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出することを特徴とする。
【0023】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはSVの個数などから算出されたその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0024】
また、この発明にかかるデータ分類方法は、上記に記載の発明において、前記優先順位決定工程では、前記特徴値算出工程で算出された特徴値の昇順にソートしたときの各2値分類器の順位を前記優先順位として決定することを特徴とする。
【0025】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値が小さいものから順に使用される。
【0026】
また、この発明にかかるデータ分類方法は、上記に記載の発明において、前記多値分類工程では、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定工程で決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すことを特徴とする。
【0027】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用される。
【0028】
また、この発明にかかるデータ分類方法は、上記に記載の発明において、前記条件が、棄却された分類の個数が所定の個数に達したか、あるいは次に使用する2値分類器につき前記特徴値算出工程で算出された特徴値が所定の閾値に達したことであることを特徴とする。
【0029】
この発明によれば、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用されるとともに、ある程度以上にコスト高となる2値分類器は使用されない。
【0030】
また、この発明にかかるプログラムによれば、上記に記載された方法がコンピュータによって実行される。
【0031】
【発明の実施の形態】
以下に添付図面を参照して、この発明によるデータ分類装置、データ分類方法およびその方法をコンピュータに実行させるプログラムの好適な実施の形態を詳細に説明する。
【0032】
図1は、この発明の実施の形態によるデータ分類装置のハードウエア構成の一例を示す説明図である。図中、101は装置全体を制御するCPUを、102は基本入出力プログラムを記憶したROMを、103はCPU101のワークエリアとして使用されるRAMを、それぞれ示している。
【0033】
また、104はCPU101の制御にしたがってHD(ハードディスク)105に対するデータのリード/ライトを制御するHDD(ハードディスクドライブ)を、105はHDD104の制御にしたがって書き込まれたデータを記憶するHDを、それぞれ示している。
【0034】
また、106はCPU101の制御にしたがってFD(フレキシブルディスク)107に対するデータのリード/ライトを制御するFDD(フレキシブルディスクドライブ)を、107はFDD106の制御にしたがって書き込まれたデータを記憶する着脱自在のFDを、それぞれ示している。
【0035】
また、108はCPU101の制御にしたがってCD−RW109に対するデータのリード/ライトを制御するCD−RWドライブを、109はCD−RWドライブ108の制御にしたがって書き込まれたデータを記憶する着脱自在のCD−RWを、それぞれ示している。
【0036】
また、110はカーソル、メニュー、ウィンドウ、あるいは文字や画像などの各種データを表示するディスプレイを、111は文字、数値、各種指示などの入力のための複数のキーを備えたキーボードを、112は各種指示の選択や実行、処理対象の選択、マウスポインタの移動などを行うマウスを、それぞれ示している。
【0037】
また、113は通信ケーブル114を介してLANやWANなどのネットワークに接続され、当該ネットワークとCPU101とのインターフェースとして機能するネットワークI/Fを、100は上記各部を接続するためのバスを、それぞれ示している。
【0038】
次に、図2はこの発明の実施の形態によるデータ分類装置の構成を機能的に示す説明図である。本発明によるデータ分類装置は、1日前と現在の天気・気温および気圧を入力データとし、そこから予想される1日後の天気を出力データとする。すなわち、データの分類として「晴れ」「曇り」「雨」の3つを用意し、上記入力がいずれの分類に該当するかを特定して、分類結果すなわち「晴れ」「曇り」「雨」のいずれかを出力する。
【0039】
まず、200はデータ入力部であり、後述する多値分類部202による分類の対象となるデータを取り込んで、後述するベクトル変換部201に出力する機能部である。上記データはキーボード111から入力されるのでも、HD105やCD−RW109から読み出されるのでも、あるいはネットワークI/F113を介して他の情報処理装置などから受信されるのであってもよい。
【0040】
データ入力部200により取り込まれるデータは、具体的には
▲1▼1日前の天気(晴れ/曇り/雨のいずれか一つ)
▲2▼1日前の気温
▲3▼1日前の気圧
▲4▼現在の天気(晴れ/曇り/雨のいずれか一つ)
▲5▼現在の気温
▲6▼現在の気圧
の6つであるものとする。
【0041】
201はベクトル変換部であり、データ入力部200から入力したデータにもとづいて、当該データに代わる入力ベクトルを生成する機能部である。ここでは上記データを、下記10個の要素からなるベクトルに変換するものとする。ベクトル内の各要素の意味はそれぞれ下記の通りである。なお、x4やx5などで数値を変換しているのは、一般に、数値のスケールを揃えたほうが学習の効率が上がるためである。
【0042】
入力ベクトル:(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10)
ただしx1:1日前の天気が晴れの場合1、その他の場合0
x2:1日前の天気が曇りの場合1、その他の場合0
x3:1日前の天気が雨の場合1、その他の場合0
x4:1日前の気温(摂氏)/100
x5:1日前の気圧(hPa)/100−10
x6:現在の天気が晴れの場合1、その他の場合0
x7:現在の天気が曇りの場合1、その他の場合0
x8:現在の天気が雨の場合1、その他の場合0
x9:現在の気温(摂氏)/100
x10:現在の気圧(hPa)/100−10
【0043】
たとえば、1日前の天気が晴れ、気温が24℃、気圧が1020hPaであり、現在の天気が曇り、気温が22℃、気圧が1010hPaであった場合は、当該データにつき生成される入力ベクトルは(1,0,0,0.24,0.20,0,1,0,0.22,0.10)となる。
【0044】
次に、202は多値分類部であり、ベクトル変換部201から入力した入力ベクトルの分類を判定する機能部である。多値分類部202は、分類が「晴れ」か「曇り」かを判別するSVM甲202a、「晴れ」か「雨」かを判別するSVM乙202b、「曇り」か「雨」かを判別するSVM丙202c、および後述する手順により上記いずれかのSVMを選択するSVM選択部202dを備えている。なお、ここでは分類が3つのため、SVMの数はそのうち任意の2つの組み合わせ(ペア)の数、すなわち3C2=3であるが、一般に分類がn個ある場合、SVMの個数はnC2となる。
【0045】
後述する手順による多値分類の前に、あらかじめ、多値分類部202内の個々のSVMについて学習を行っておく必要がある。本発明では学習の方法は問わないため、たとえば「John C.Platt (1998) Sequential Minimal Optimization:A Fast Algorithm for Training Support Vector Machines. Technical Report MSR−TR−98−14.」などに記載された任意の学習方法を取ればよい。
【0046】
ここでは各SVMについて、pairwise法に準じた学習を行うものとする。すなわち、あらかじめ分類が得られている教師データを用意しておき、SVMごとにそれぞれ下記のような学習を行う。
▲1▼教師データ中、出力が「晴れ」となる入力ベクトル群を正例、「曇り」となる入力ベクトル群を負例として、SVM甲202aを学習させる。
▲2▼教師データ中、出力が「晴れ」となる入力ベクトル群を正例、「雨」となる入力ベクトル群を負例として、SVM乙202bを学習させる。
▲3▼教師データ中、出力が「曇り」となる入力ベクトル群を正例、「雨」となる入力ベクトル群を負例として、SVM丙202cを学習させる。
【0047】
なお、SVMのパラメータ(後述するkernel関数として何を利用するか、どの程度のエラーを許容するか、など)の選択方法については、本発明は特に関知しないが、たとえば「工藤拓、松本裕治 (2000) Support Vector Machineを用いたChunk同定、情報処理学会研究報告NL−140」で示されているように、交差検定(cross−validation)法などの既知の方法によって、最適なパラメータを求めることが考えられる。
【0048】
次に、203は特徴値算出部であり、多値分類部202内の個々のSVMについて、その性能やパフォーマンスを示す特徴値を算出する機能部である。ここではSVMの特徴値を、当該SVMを使用することのコストの観点からとらえ、コストとして具体的にはその処理時間、すなわち各SVMにおける2値分類にかかる時間を考えるものとする。処理時間が短いSVMほど、当該SVMを使用することのコストは低く、逆に処理時間が長いSVMほどコストは高い。
【0049】
周知のように、一般にSVMは下記の式を計算することにより2値分類を行う。
【数1】
ただしsgn:正負を判定する関数
Sn:SV(サポートベクター)の集合(学習によって得られる)
αi:SVごとの重み(学習によって得られる)
yi:SVが正例か負例かによって定まる数値
h:定数(学習によって得られる)
【0050】
なお、K(xi,x)はSV(xi)と入力ベクトル(x)により算出されるkernel関数である。一般には、以下のようなkernel関数が利用される(a、bは適当な定数)。
K1(x,y)=(<x,y>+1)2
K2(x,y)=exp(−||x−y||2/a)
K3(x,y)=tanh(a<x,y>−b)
【0051】
上記(1)式から、分類時の計算時間を左右するのはSVの数、すなわちkernel関数Kを通る回数であることが分かる。そこで、あるSVMの処理時間の指標として、当該SVMにおけるSVの個数が利用できる。
【0052】
また、個々のSVを利用したkernel関数Kの処理時間が予測できる場合、SVの個数の代わりに、その和をもってSVMによる処理時間の指標として用いることもできる。たとえば標準的な実装の場合、SV中の0でない要素数が多ければ多いほど、上記のkernel関数の計算時間は長くなる。そこで、すべてのSVの、0でない要素数の和を、SVMによる処理時間の指標として用いることができる。
【0053】
特徴値算出部203は、上記の指標により推定した各SVMの処理時間、すなわち各SVMを使用することのコストを、特徴値として後述する優先順位決定部204に出力する。ここでは、SVM甲202a/乙202b/丙202cのSVの個数が、それぞれ15/10/30であり、これに比例して各SVMの特徴値が、それぞれ下記のように算出されたものとする。
SVM甲202a(晴れ/曇り判別)の特徴値:15
SVM乙202b(晴れ/雨判別)の特徴値:10
SVM丙202c(曇り/雨判別)の特徴値:30
【0054】
次に、204は優先順位決定部であり、多値分類部202内の各SVMの優先順位、すなわちどのSVMを他のSVMより優先的に使用するかを決定する機能部である。具体的には、特徴値算出部203で算出された特徴値の小さいSVMが、特徴値の大きいSVMよりも優先的に使用されるよう、SVMを特徴値の昇順にソートしたときの順位を各SVMの優先順位とする。なお、ソートの手法は特に問わないので、クイックソート法・マージソート法など、既知のアルゴリズムを利用すればよい。
【0055】
上記の例では、特徴値(すなわちコスト、より具体的には処理時間)の最も小さいSVM乙202bの優先順位が1位、次に特徴値の小さいSVM甲202aの優先順位が2位、特徴値の最も大きいSVM丙202cの優先順位が3位となる。
【0056】
なお、特徴値算出部203で算出された処理時間(絶対処理時間)をそのまま利用するのでなく、下記式により相対処理時間を算出し、その順にソートするようにしてもよい。
【数2】
ただしTr(a,b):分類aと分類bとへの2値分類器の相対処理時間
Ta(a,b):分類aと分類bとへの2値分類器の絶対処理時間
G:多値分類器の結果となりうるすべての分類の集合
n:Gの要素数(多値分類の分類数)
【0057】
上記(2)式により、絶対処理時間が同一と予測された2値分類器でも、より関連する分類(上記式の場合、分類aや分類b)の平均処理時間が長いほうが、相対処理時間としては短くなる。これによって、処理時間の長い2値分類器(上記式の場合、分類a・分類bとその他の分類を判別する2値分類器)の代わりに、処理時間の短い2値分類器(上記式の場合、分類aと分類bを判別する2値分類器)の利用が促進されることになる。
【0058】
次に、図3はこの発明の実施の形態によるデータ分類装置における、2値分類の組み合わせによる多値分類処理の手順を示すフローチャートである。図示する処理に入る前に、あらかじめ以下のものを用意しておく。
a:優先順位の順にソートされたSVM(上記例ではSVM乙202b、SVM甲202a、SVM丙202cの順)
b:aの中の位置を1つだけ保持できる機構(初期状態では先頭のSVM、上記例ではSVM乙202bを指す)
c:2値分類で棄却された分類を複数保持できる機構(初期状態では空)
【0059】
多値分類部202のSVM選択部202dは、bが指し示すSVMに指示して2値分類を実行させ、判別された分類dと棄却された分類eを得る(ステップS301)。上記例では、まずSVM乙202bが呼び出されて「晴れ」または「雨」の判別が行われる。ここではたとえば判別された分類dが「雨」、棄却された分類eが「晴れ」であったものとする。
【0060】
次に、SVM選択部202dはステップS301で棄却された分類eを、上述のcに追加する(ステップS302)。この時点で、cにはSVM乙202bにより棄却された「晴れ」のみが入っている状態となる。
【0061】
そして、SVM選択部202dはcの要素数が、多値分類の分類数−1に達したかどうかを判定する(ステップS303)。ここでは分類の総数が「晴れ」「曇り」「雨」の3個であるため、cの要素数が2個に達したかどうかを判定することになる。そして、現時点ではcの要素数は「晴れ」の1個のみであり、2個に満たないので(ステップS303:No)、次はステップS305に分岐する。
【0062】
cの要素数が分類の総数−1に満たない場合、SVM選択部202dは上記bが指し示す位置をaの中で1つ進める(ステップS305)。ここではbの指し示す位置が、先頭のSVM乙202bから2番目のSVM甲202aに切り替えられることになる。
【0063】
そして、SVM選択部202dはbにより指し示されるSVMが判別する2つの分類(f・g)を得る(ステップS306)。ここではSVM甲202aは、「晴れ」または「曇り」を判別するので、fは「晴れ」gは「曇り」となる。なお、fとgとは逆であってもよい。
【0064】
次にSVM選択部202dは、fまたはgのいずれかがcの中にあるかどうか、すなわちfまたはgがすでに棄却された分類であるか否かを判定する(ステップS307)。ここではfが「晴れ」で、cに格納された「晴れ」と一致するため(ステップS307:Yes)、ステップS305に戻ってさらにbを1つ進める(ステップS305)。
【0065】
そして、次のSVM丙202cではfが「曇り」gが「雨」となり(ステップS306)、そのいずれもまだcの中にはないので(ステップS307:No)、ステップS301に戻ってSVM丙202cに「曇り」または「雨」の判別を行わせる(ステップS301)。
【0066】
ここで判別された分類dが「曇り」、棄却された分類eが「雨」であったとすると、SVM選択部202dは棄却された分類eをcに追加するとともに(ステップS302)、cの要素数が分類の総数−1、すなわち2に達したかどうかを判定する(ステップS303)。
【0067】
そして、この時点でcの要素数は「晴れ」および「雨」の2個に達したので(ステップS303:Yes)、SVM選択部202dは分類結果出力部202eに多値分類の終了を通知し、これを受けた分類結果出力部202eでは、現時点でのd、すなわち「曇り」を多値分類の結果として出力する(ステップS304)。
【0068】
上記手順は要するに、優先順位の高い順に並べたSVMの中から、過去の2値分類で棄却されていない分類の組み合わせのSVMを順次検索し、最初に見つかったSVMで2値分類を行うとともに、この繰り返しをまだ棄却されていない分類が1つとなるまで続けるものである。
【0069】
そして、優先順位は上述のようにSVMの処理時間に応じて定められているので、上記手順により、処理時間の短いSVMが優先的に選択されて使用されることになる。言い換えれば、処理時間の長いSVMが使われる確率を下げることができ、たとえばSVM乙202bで晴れ、SVM甲202aでも晴れと判別された場合は、最も時間のかかるSVM丙202cの曇り/雨判別を経由しないで、多値分類の結果を得ることができる。
【0070】
図4は、分類が4個だった場合の6個(=4C2)のSVMの使用確率を示すグラフ、図5は、分類が10個だった場合の45個(=10C2)のSVMの使用確率を示すグラフである。図示するように、「速い」すなわち処理時間の短いSVMほど使用確率が高く、「遅い」すなわち処理時間の長いSVMほど使用確率が低くなるので、全体として多値分類にかかる平均時間を短縮することができる。
【0071】
なお、上述した実施の形態では2値分類器としてもっぱらSVMを考えたが、2値分類器としてはこれに限らず、たとえばニューロンネットワークにおけるパーセプトロンなど、2つの分類を判別できるものなら何であってもよい。
【0072】
また、上述した実施の形態では2値分類器の使用コストを、もっぱら時間の観点から把握したが、コストとしてはこれ以外にも、たとえば分類で発生するエラーなどを考えてもよい。
【0073】
一例としてSVMのエラー率の上限値は、教師データ中のSVの割合に比例することが知られている。そこで、時間が多少かかるとしてもできるだけ正確な分類結果が欲しいような場合は、エラー率が低く信頼できるSVMを優先的に使用するため、「SVの個数/教師データ数」を指標として各SVMの特徴値(信頼度の観点からとらえた特徴値)を算出するようにしてもよい。
【0074】
また、コストとして2値分類器の使用料などを考えてもよい。たとえば、ある2値分類器による判別サービスが1回10万円、別の2値分類器による判別サービスが1回5万円、というように、それぞれの2値分類の費用が異なる場合、より安価な2値分類が優先的に行われるよう、特徴値を上記費用に応じて算出する。
【0075】
また、上述した実施の形態では棄却された分類がn−1個になるまで2値分類を続けたが、途中のどこかの2値分類器で分類を停止し、当該2値分類器による判別結果を多値分類の結果として出力するようにしてもよい。
【0076】
一般に、データ数に対するSVの個数が少ないほど、SVMの汎化能力が高まることが知られている。つまりSVの数が多く、判別に時間がかかるSVMほど、信頼性も低くなる傾向にある。そこで、SVの数が少ない(信頼性が高い)SVMを利用できるうちは、上記の方法で分類の候補を絞り、
▲1▼上述のbにより指し示されるSVMのSVの数が一定の個数に達した場合
▲2▼上述のcの要素数が一定の個数(具体的にはn−1)に達した場合
のいずれかの条件が満たされる場合に、多値分類を終了するようにしてもよい。
【0077】
なお、上述したデータ入力部200、ベクトル変換部201、多値分類部202、特徴値算出部203および優先順位決定部204は、具体的にはHD105からRAM103に読み出されたプログラムをCPU101が実行することにより実現される。このプログラムはHD105のほか、FD107、CD−RW109、MOなどの各種の記録媒体に格納して配布することができ、ネットワークを介して配布することも可能である。
【0078】
【発明の効果】
以上説明したようにこの発明は、入力データが第1の分類あるいは第2の分類のいずれに分類されるかを判別する2値分類器を複数使用して前記入力データの多値分類を行うデータ分類装置において、前記各2値分類器の特徴値を算出する特徴値算出手段と、前記特徴値算出手段により算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定手段と、前記優先順位決定手段により決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類手段と、を備えたので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置が得られるという効果を奏する。
【0079】
また、この発明は、上記に記載の発明において、前記2値分類器がSVMであり、前記特徴値算出手段が前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出するので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはSVの個数などから算出されたその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置が得られるという効果を奏する。
【0080】
また、この発明は、上記に記載の発明において、前記優先順位決定手段が、前記特徴値算出手段により算出された特徴値の昇順にソートしたときの各2値分類器の順位を前記優先順位として決定するので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値が小さいものから順に使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置が得られるという効果を奏する。
【0081】
また、この発明は、上記に記載の発明において、前記多値分類手段が、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定手段により決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置が得られるという効果を奏する。
【0082】
また、この発明は、上記に記載の発明において、前記条件が、棄却された分類の個数が所定の個数に達したか、あるいは次に使用する2値分類器につき前記特徴値算出手段により算出された特徴値が所定の閾値に達したことであるので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用されるとともに、ある程度以上にコスト高となる2値分類器は使用されず、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類装置が得られるという効果を奏する。
【0083】
また、この発明は、入力データが第1の分類あるいは第2の分類のいずれに分類されるかを判別する2値分類器を複数使用して前記入力データの多値分類を行うデータ分類方法において、前記各2値分類器の特徴値を算出する特徴値算出工程と、前記特徴値算出工程で算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定工程と、前記優先順位決定工程で決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類工程と、を含んだので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類方法が得られるという効果を奏する。
【0084】
また、この発明は、上記に記載の発明において、前記2値分類器がSVMであり、前記特徴値算出工程では前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出するので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはSVの個数などから算出されたその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類方法が得られるという効果を奏する。
【0085】
また、この発明は、上記に記載の発明において、前記優先順位決定工程では、前記特徴値算出工程で算出された特徴値の昇順にソートしたときの各2値分類器の順位を前記優先順位として決定するので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値が小さいものから順に使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類方法が得られるという効果を奏する。
【0086】
また、この発明は、上記に記載の発明において、前記多値分類工程では、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定工程で決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用され、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類方法が得られるという効果を奏する。
【0087】
また、この発明は、上記に記載の発明において、前記条件が、棄却された分類の個数が所定の個数に達したか、あるいは次に使用する2値分類器につき前記特徴値算出工程で算出された特徴値が所定の閾値に達したことであるので、多値分類器を構成する複数の2値分類器は、それぞれの2値分類器を使用することのコスト(具体的にはその処理時間やエラー率など)を示す特徴値の大小に応じた順序で使用されるとともに、ある程度以上にコスト高となる2値分類器は使用されず、これによって、複数の2値分類器を効率的な順序で使用して多値分類を高速に行うことが可能なデータ分類方法が得られるという効果を奏する。
【0088】
また、この発明によれば、上記に記載された方法をコンピュータに実行させることが可能なプログラムが得られるという効果を奏する。
【図面の簡単な説明】
【図1】この発明の実施の形態によるデータ分類装置のハードウエア構成の一例を示す説明図である。
【図2】この発明の実施の形態によるデータ分類装置の構成を機能的に示す説明図である。
【図3】この発明の実施の形態によるデータ分類装置における、2値分類の組み合わせによる多値分類処理の手順を示すフローチャートである。
【図4】この発明の実施の形態によるデータ分類装置において、分類が4個だった場合のSVMの使用確率を示すグラフである。
【図5】この発明の実施の形態によるデータ分類装置において、分類が10個だった場合のSVMの使用確率を示すグラフである。
【図6】DDAG法による多値分類の手順を模式的に示す説明図である。
【符号の説明】
100 バス
101 CPU
102 ROM
103 RAM
104 HDD
105 HD
106 FDD
107 FD
108 CD−RWドライブ
109 CD−RW
110 ディスプレイ
111 キーボード
112 マウス
113 ネットワークI/F
114 通信ケーブル
200 データ入力部
201 ベクトル変換部
202 多値分類部
202a SVM甲
202b SVM乙
202c SVM丙
202d SVM選択部
203 特徴値算出部
204 優先順位決定部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data classification device for performing multi-level classification of the input data by using a plurality of binary classifiers for determining whether the input data is classified into the first classification or the second classification, and data classification The present invention relates to a method and a program for causing a computer to execute the method.
[0002]
[Prior art]
A support vector machine (SVM: Support Vector Machine) is a binary classifier with a high generalization ability, but when it is expanded to a multi-value classifier by combining multiple SVMs, the slow processing speed is the bottleneck. It has become.
[0003]
Typical examples of multi-value classification algorithms using SVM include the one vsrest method, the pairwise method, and the DDAG (Decision Directed Acrylic Graph) method. Among them, the fastest DDAG method is “John C. Platt, Nello Christian, John Shawe-Taylor (2000) Large Margin DAGs for Multiclass Classification. In Advanced IP. , A method of speeding up the pairwise method.
[0004]
FIG. 6 is an explanatory diagram schematically showing the procedure of multi-value classification by the DDAG method. In the DDAG method, first, classification (category to be a classification destination), that is, four “A”, “B”, “C”, and “D” in the example of FIG. Next, it is determined by SVM whether the input data to be classified is classified into the first classification “A” or the last classification “D” of the column (“A / D determination” in the figure). If it is determined that the classification is not determined, for example, A in the SVM, D is rejected (deleted) from the column, and then the input data is the first “A” and the last “C” of the column. Which SVM is classified is determined by another SVM (“A / C determination” in the figure).
[0005]
Thereafter, the same processing as described above is repeated until the number of classifications in the column becomes one, and finally the remaining classification is output as the result of the multi-level classification. Since the number of binary classifications required for the n-value classification is nC2 times in the pairwise method, but n-1 times in the DDAG method, the processing time can be shortened.
[0006]
[Problems to be solved by the invention]
However, even with the DDAG method, there are cases in which multi-value classification at a practically sufficient speed cannot be realized. The reason is that the above method does not take into account the length of time required for individual binary classification, as well as the slowness of the SVM itself.
[0007]
For example, in the example shown in FIG. 6, the average time required for multi-level classification (average multi-level classification time) is
Average multilevel classification time = (A / D discrimination time) + {p (A / C discrimination time) + (1−p) (B / D discrimination time)} + {q (A / B discrimination time) + r (B / C discrimination time) + (1-q−r) (C / D discrimination time)}
However, p: probability that A / C discrimination is executed (0 ≦ p ≦ 1)
q: Probability that A / B discrimination is executed (0 ≦ q ≦ 1)
r: Probability of executing B / C discrimination (0 ≦ r ≦ 1)
It is.
[0008]
Therefore, if the discrimination between A and D is the most time-consuming binary classification among any two combinations of A to D, the time is increased accordingly. In other words, when the classifications are arranged in one column, it happens that A happens to be at the top and D is at the end, and every time a multi-level classification is made, the most time-consuming A / D discrimination must be made. Is big.
[0009]
In order to solve the above-described problems due to the prior art, the present invention provides a data classification apparatus, a data classification method, and a method for performing multi-level classification at high speed using a plurality of binary classifiers in an efficient order. An object is to provide a program to be executed by a computer.
[0010]
[Means for Solving the Problems]
In order to solve the above-mentioned problems and achieve the purpose, This invention The data classifying apparatus according to the present invention performs multi-level classification of the input data by using a plurality of binary classifiers that determine whether the input data is classified into the first class or the second class. The feature value calculating means for calculating the feature value of each binary classifier and the priority order determining means for determining the priority order of each binary classifier based on the feature value calculated by the feature value calculating means And multi-value classification means for performing multi-value classification of the input data using the binary classifier in descending order of priority determined by the priority determination means.
[0011]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in order according to size.
[0012]
Also, This invention The data classification device according to the above The binary classifier is an SVM, and the feature value calculation means calculates the feature value of each binary classifier as the number of SVs in each SVM or a non-zero element of all SVs in each SVM. It is characterized in that it is calculated based on the total number of.
[0013]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier have the cost of using each binary classifier (specifically, the processing time and error calculated from the number of SVs, etc.). Used in the order according to the magnitude of the feature value indicating the rate).
[0014]
Also, This invention The data classification device according to the above In the invention described in (2), the priority order determining means determines the order of each binary classifier when sorting in ascending order of the feature values calculated by the feature value calculating means as the priority order. .
[0015]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier have characteristic values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in ascending order.
[0016]
Also, This invention The data classification device according to the above In the invention according to claim 2, the priority determined by the priority determining means is a binary classifier in which neither the first classification nor the second classification is rejected. The binary classification of the input data is performed using the highest binary classifier, and the first classification or the second classification in which the input data is not classified in the binary classification The rejection is repeated until a predetermined condition is satisfied.
[0017]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in order according to size.
[0018]
Also, This invention The data classification device according to the above In the invention described in (2), the condition is that the number of rejected classifications reaches a predetermined number or the characteristic value calculated by the characteristic value calculating means for a binary classifier to be used next is a predetermined threshold value. It is characterized by having reached.
[0019]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. A binary classifier that is used in the order according to the size and is more expensive than a certain level is not used.
[0020]
Also, This invention The data classification method according to the present invention is a data classification method for performing multi-level classification of the input data using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification. A feature value calculating step for calculating a feature value of each binary classifier, and a priority order determining step for determining a priority order of each binary classifier based on the feature value calculated in the feature value calculation step And a multi-level classification step of performing multi-level classification of the input data using the binary classifier in descending order of priority determined in the priority determination step.
[0021]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in order according to size.
[0022]
Also, This invention The data classification method for the above In the invention described in the above, the binary classifier is an SVM, and in the feature value calculating step, the feature value of each binary classifier is set to the number of SVs in each SVM or a non-zero element of all SVs in each SVM. It is characterized in that it is calculated based on the total number of.
[0023]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier have the cost of using each binary classifier (specifically, the processing time and error calculated from the number of SVs, etc.). Used in the order according to the magnitude of the feature value indicating the rate).
[0024]
Also, This invention The data classification method for the above In the invention according to
[0025]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier have characteristic values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in ascending order.
[0026]
Also, This invention The data classification method for the above In the invention according to
[0027]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Used in order according to size.
[0028]
Also, This invention The data classification method for the above In the invention described in (2), the condition is that the number of rejected classifications reaches a predetermined number, or the characteristic value calculated in the characteristic value calculation step for a binary classifier to be used next is a predetermined threshold value. It is characterized by having reached.
[0029]
This Departure According to Ming, a plurality of binary classifiers constituting a multi-level classifier are feature values indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. A binary classifier that is used in the order according to the size and is more expensive than a certain level is not used.
[0030]
Also, This invention According to the program the above Is executed by a computer.
[0031]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a data classification device, a data classification method, and a program for causing a computer to execute the method according to the present invention will be described below in detail with reference to the accompanying drawings.
[0032]
FIG. 1 is an explanatory diagram showing an example of a hardware configuration of a data classification device according to an embodiment of the present invention. In the figure, 101 indicates a CPU that controls the entire apparatus, 102 indicates a ROM that stores basic input / output programs, and 103 indicates a RAM that is used as a work area of the
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
FIG. 2 is an explanatory diagram functionally showing the configuration of the data classification apparatus according to the embodiment of the present invention. The data classification apparatus according to the present invention uses the weather, temperature, and atmospheric pressure one day before and the current as input data, and the weather one day after that as the output data. In other words, three types of data “sunny”, “cloudy”, and “rain” are prepared, and the classification corresponding to the above input is specified, and the classification result, that is, “sunny” “cloudy” “rainy” Output one of them.
[0039]
First,
[0040]
Specifically, the data captured by the
(1) Weather one day ago (any one of sunny / cloudy / rainy)
▲ 2 ▼ The temperature one day ago
(3) Atmospheric pressure one day ago
▲ 4 ▼ Current weather (Sunny / Cloudy / Rain)
▲ 5 ▼ Current temperature
(6) Current barometric pressure
It is assumed that there are six.
[0041]
A
[0042]
Input vector: (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
X1: 1 if the weather is clear 1 day ago, 0 otherwise
x2: 1 if the weather is cloudy one day ago, 0 otherwise
x3: 1 if rainy day before rain, 0 otherwise
x4: Temperature one day ago (Celsius) / 100
x5: Atmospheric pressure (hPa) / 100-10 before 1 day
x6: 1 if the current weather is clear, 0 otherwise
x7: 1 if the current weather is cloudy, 0 otherwise
x8: 1 if the current weather is rainy, 0 otherwise
x9: Current temperature (Celsius) / 100
x10: Current atmospheric pressure (hPa) / 100-10
[0043]
For example, if the weather one day ago is clear, the temperature is 24 ° C., and the atmospheric pressure is 1020 hPa, the current weather is cloudy, the temperature is 22 ° C., and the atmospheric pressure is 1010 hPa, the input vector generated for the data is ( 1, 0, 0, 0.24, 0.20, 0, 1, 0, 0.22, 0.10).
[0044]
Next,
[0045]
Prior to multi-value classification according to the procedure described later, it is necessary to learn each SVM in the
[0046]
Here, learning according to the pairwise method is performed for each SVM. That is, teacher data in which classification is obtained in advance is prepared, and the following learning is performed for each SVM.
(1) In the teacher data, the
(2) In the teacher data, the
(3) In the teacher data, the SVM 丙 202c is learned by taking an input vector group whose output is “cloudy” as a positive example and an input vector group whose output is “rain” as a negative example.
[0047]
The present invention is not particularly concerned with the method of selecting SVM parameters (what to use as a kernel function, which will be described later, how much error is allowed, etc.), but for example, “Taku Kudo, Yuji Matsumoto ( 2000) As shown in Chunk identification using Support Vector Machine, Information Processing Society of Japan Research Report NL-140, an optimal parameter can be obtained by a known method such as a cross-validation method. Conceivable.
[0048]
Next,
[0049]
As is well known, SVM generally performs binary classification by calculating the following equation.
[Expression 1]
However, sgn: a function for judging positive / negative
Sn: SV (support vector) set (obtained by learning)
αi: Weight for each SV (obtained by learning)
yi: Value determined by whether SV is positive or negative
h: Constant (obtained by learning)
[0050]
K (xi, x) is a kernel function calculated from SV (xi) and the input vector (x). In general, the following kernel function is used (a and b are appropriate constants).
K1 (x, y) = (<x, y> +1) 2
K2 (x, y) = exp (-|| xy- || 2 //)
K3 (x, y) = tanh (a <x, y> −b)
[0051]
From the above equation (1), it can be seen that it is the number of SVs, that is, the number of passes through the kernel function K, that affects the calculation time during classification. Therefore, the number of SVs in the SVM can be used as an index of the processing time of a certain SVM.
[0052]
Further, when the processing time of the kernel function K using each SV can be predicted, the sum thereof can be used as an index of the processing time by the SVM instead of the number of SVs. For example, in the standard implementation, the more the number of non-zero elements in the SV, the longer the calculation time of the above kernel function. Therefore, the sum of the number of non-zero elements of all SVs can be used as an index of processing time by SVM.
[0053]
The feature
Feature value of SVM A 202a (clear / cloudy discrimination): 15
Feature value of
SVM 丙 202c (cloud / rain discrimination) feature value: 30
[0054]
Next,
[0055]
In the above example, the priority of the
[0056]
Instead of using the processing time (absolute processing time) calculated by the feature
[Expression 2]
However, Tr (a, b): Relative processing time of the binary classifier for classification a and classification b
Ta (a, b): Absolute processing time of the binary classifier for classification a and classification b
G: the set of all classifications that can result in a multi-value classifier
n: Number of elements of G (number of classifications of multi-value classification)
[0057]
Even in the binary classifier predicted to have the same absolute processing time according to the above equation (2), the longer the average processing time of the more related classification (in the case of the above equation, classification a and classification b), the relative processing time Becomes shorter. Thus, instead of a binary classifier having a long processing time (in the case of the above formula, a binary classifier for discriminating between classification a / b and other classifications), a binary classifier having a short processing time (of the above formula) In this case, the use of a binary classifier for discriminating between classification a and classification b is promoted.
[0058]
Next, FIG. 3 is a flowchart showing a procedure of multi-value classification processing by a combination of binary classifications in the data classification apparatus according to the embodiment of the present invention. Before starting the processing shown in the figure, the following items are prepared in advance.
a: SVM sorted in order of priority (in the above example,
b: A mechanism capable of holding only one position in a (initial SVM in the initial state,
c: Mechanism that can hold multiple classifications rejected in binary classification (empty in the initial state)
[0059]
The
[0060]
Next, the
[0061]
Then, the
[0062]
When the number of elements of c is less than the total number of classifications−1, the
[0063]
Then, the
[0064]
Next, the
[0065]
Then, in the next SVM 丙 202c, f becomes “cloudy” and g becomes “rain” (step S306), and none of them is still in c (step S307: No). Is discriminated as “cloudy” or “rainy” (step S301).
[0066]
If the determined category d is “cloudy” and the rejected category e is “rain”, the
[0067]
At this time, the number of elements of c has reached two, “sunny” and “rain” (step S303: Yes), so the
[0068]
In short, the above procedure is to sequentially search SVMs of combinations of classifications that have not been rejected in the past binary classification from among the SVMs arranged in descending order of priority, perform binary classification with the first SVM found, This repetition is continued until one classification has not yet been rejected.
[0069]
Since the priority is determined according to the processing time of the SVM as described above, the SVM with a short processing time is preferentially selected and used by the above procedure. In other words, it is possible to reduce the probability that an SVM with a long processing time will be used. The result of multi-value classification can be obtained without going through.
[0070]
FIG. 4 shows six cases (== Four C 2 FIG. 5 is a graph showing the use probability of SVM of FIG. Ten C 2 It is a graph which shows the use probability of SVM. As shown in the figure, “fast”, that is, SVM with a short processing time has a higher use probability, and “slow”, that is, an SVM with a long processing time, has a lower use probability. Can do.
[0071]
In the above-described embodiment, SVM is exclusively considered as a binary classifier. However, the binary classifier is not limited to this, and any classifier that can discriminate between two classes, such as a perceptron in a neuron network, for example. Good.
[0072]
In the above-described embodiment, the use cost of the binary classifier is grasped exclusively from the viewpoint of time. However, other than this, for example, an error caused by classification may be considered.
[0073]
As an example, it is known that the upper limit value of the error rate of SVM is proportional to the ratio of SV in teacher data. Therefore, even if it takes some time, if you want accurate classification results as much as possible, SVM with low error rate and reliability is preferentially used. A feature value (a feature value taken from the viewpoint of reliability) may be calculated.
[0074]
Moreover, you may consider the usage fee of a binary classifier, etc. as cost. For example, if the binary classification costs are different, such as a discrimination service with one binary classifier is 100,000 yen once and a discrimination service with another binary classifier is 50,000 yen once, it is cheaper. The characteristic value is calculated according to the cost so that the binary classification is preferentially performed.
[0075]
In the above-described embodiment, the binary classification is continued until the number of rejected classifications reaches n−1. However, the classification is stopped at some binary classifier in the middle, and the determination by the binary classifier is performed. The result may be output as a result of multi-level classification.
[0076]
In general, it is known that the smaller the number of SVs relative to the number of data, the higher the generalization ability of the SVM. That is, as the number of SVs increases and the time required for discrimination increases, the reliability tends to decrease. Therefore, as long as the SVM with a small number of SVs (high reliability) can be used, the classification candidates are narrowed down by the above method,
(1) When the number of SVMs indicated by b above reaches a certain number
(2) When the number of elements c above reaches a certain number (specifically n-1)
The multi-value classification may be terminated when any one of the above conditions is satisfied.
[0077]
Note that the
[0078]
【The invention's effect】
As explained above This invention Is a data classification apparatus that performs multi-level classification of the input data using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification. Feature value calculating means for calculating a feature value of the value classifier, priority order determining means for determining a priority order of each binary classifier based on the feature value calculated by the feature value calculating means, and the priority order Multi-level classifying means for performing multi-level classification of the input data using the binary classifier in descending order of priority determined by the determining means, so that a plurality of 2 constituting the multi-level classifier The value classifiers are used in an order according to the magnitude of the feature value indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Use value classifiers in an efficient order There is an effect that the data classification apparatus capable of performing high-speed multi-level classification can be obtained Te.
[0079]
Also, This invention Is the above The binary classifier is an SVM, and the feature value calculation means calculates the feature value of each binary classifier as the number of SVs in each SVM or a non-zero element of all SVs in each SVM. The number of binary classifiers constituting the multi-level classifier is calculated based on the cost of using each binary classifier (specifically, the number calculated from the number of SVs, etc.). This is used in the order according to the size of the feature value indicating the processing time, error rate, etc.), so that multi-level classification can be performed at high speed using a plurality of binary classifiers in an efficient order. There is an effect that a data classification device can be obtained.
[0080]
Also, This invention Is the above In the invention described in the above, since the priority order determining means determines the order of each binary classifier when the feature values calculated by the feature value calculating means are sorted in ascending order, the multi-value classification A plurality of binary classifiers constituting a classifier are used in order from the smallest feature value indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Thus, there is an effect that a data classification device capable of performing multi-level classification at high speed using a plurality of binary classifiers in an efficient order can be obtained.
[0081]
Also, This invention Is the above In the invention according to claim 2, the priority determined by the priority determining means is a binary classifier in which neither the first classification nor the second classification is rejected. The binary classification of the input data is performed using the highest binary classifier, and the first classification or the second classification in which the input data is not classified in the binary classification Since the rejection is repeated until a predetermined condition is satisfied, the plurality of binary classifiers constituting the multi-level classifier are required to use the cost of using each binary classifier (specifically, the processing thereof) Data that can be used for multiple-value classification at high speed using multiple binary classifiers in an efficient order. Once a classification device is obtained Achieve the cormorant effect.
[0082]
Also, This invention Is the above In the invention described in (2), the condition is that the number of rejected classifications reaches a predetermined number or the characteristic value calculated by the characteristic value calculating means for a binary classifier to be used next is a predetermined threshold value. Therefore, the plurality of binary classifiers constituting the multi-level classifier indicate the cost (specifically, processing time, error rate, etc.) of using each binary classifier. A binary classifier that is used in the order according to the magnitude of the feature value and that is more expensive than a certain level is not used, thereby using multiple binary classifiers in an efficient order to achieve multiple values. There is an effect that a data classification device capable of performing classification at high speed can be obtained.
[0083]
Also, This invention In the data classification method for performing multi-value classification of the input data using a plurality of binary classifiers for determining whether the input data is classified into the first classification or the second classification, each of the 2 A feature value calculating step for calculating a feature value of a value classifier, a priority determining step for determining a priority of each binary classifier based on the feature value calculated in the feature value calculating step, and the priority A multi-level classification step of performing multi-level classification of the input data using the binary classifier in descending order of priority determined in the determination step, so that a plurality of 2 constituting the multi-level classifier The value classifiers are used in an order according to the magnitude of the feature value indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Multivalue using value classifier in efficient order Data classification method capable of performing class at high speed an effect that can be obtained.
[0084]
Also, This invention Is the above In the invention described in the above, the binary classifier is an SVM, and in the feature value calculation step, the feature value of each binary classifier is set to the number of SVs in each SVM or a non-zero element of all SVs in each SVM. The number of binary classifiers constituting the multi-level classifier is calculated based on the cost of using each binary classifier (specifically, the number calculated from the number of SVs, etc.). This is used in the order according to the size of the feature value indicating the processing time, error rate, etc.), so that multi-level classification can be performed at high speed using a plurality of binary classifiers in an efficient order. The data classification method can be obtained.
[0085]
Also, This invention Is the above In the invention according to claim 2, in the priority order determination step, the order of each binary classifier when sorted in ascending order of the feature values calculated in the feature value calculation step is determined as the priority order. A plurality of binary classifiers constituting a classifier are used in order from the smallest feature value indicating the cost (specifically, processing time, error rate, etc.) of using each binary classifier. Thus, there is an effect that a data classification method capable of performing multi-level classification at high speed using a plurality of binary classifiers in an efficient order can be obtained.
[0086]
Also, This invention Is the above In the invention according to
[0087]
Also, This invention Is the above In the invention described in (2), the condition is that the number of rejected classifications reaches a predetermined number, or the characteristic value calculated in the characteristic value calculation step for a binary classifier to be used next is a predetermined threshold value. Therefore, the plurality of binary classifiers constituting the multi-level classifier indicate the cost (specifically, processing time, error rate, etc.) of using each binary classifier. A binary classifier that is used in the order according to the magnitude of the feature value and that is more expensive than a certain level is not used, thereby using multiple binary classifiers in an efficient order to achieve multiple values. There is an effect that a data classification method capable of performing classification at high speed can be obtained.
[0088]
Also, This invention According to the above It is possible to obtain a program capable of causing a computer to execute the method described in 1).
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing an example of a hardware configuration of a data classification device according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram functionally showing the configuration of the data classification device according to the embodiment of the present invention.
FIG. 3 is a flowchart showing a procedure of multi-value classification processing by a combination of binary classifications in the data classification device according to the embodiment of the present invention.
FIG. 4 is a graph showing the use probability of SVM when there are four classifications in the data classification apparatus according to the embodiment of the present invention;
FIG. 5 is a graph showing the use probability of SVM when the classification is 10 in the data classification device according to the embodiment of the present invention;
FIG. 6 is an explanatory diagram schematically showing a procedure of multi-value classification by the DDAG method.
[Explanation of symbols]
100 buses
101 CPU
102 ROM
103 RAM
104 HDD
105 HD
106 FDD
107 FD
108 CD-RW drive
109 CD-RW
110 display
111 keyboard
112 mouse
113 Network I / F
114 Communication cable
200 Data input part
201 Vector converter
202 Multi-value classification part
202a SVM A
202b SVM B
202c SVM 丙
202d SVM selector
203 feature value calculator
204 Priority determining unit
Claims (11)
前記各2値分類器の特徴値を算出する特徴値算出手段と、
前記特徴値算出手段により算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定手段と、
前記優先順位決定手段により決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類手段と、
を備え、
前記2値分類器がSVMであり、前記特徴値算出手段は前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出することを特徴とするデータ分類装置。 In a data classification device that performs multi-level classification of the input data using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification,
Feature value calculating means for calculating the feature value of each binary classifier;
Priority order determining means for determining the priority order of each of the binary classifiers based on the feature value calculated by the feature value calculating means;
Multi-value classification means for performing multi-value classification of the input data using the binary classifier in descending order of priority determined by the priority order determination means;
With
The binary classifier is an SVM, and the feature value calculation means calculates the feature value of each binary classifier based on the number of SVs in each SVM or the total number of non-zero elements of all SVs in each SVM. features and to Lud over data classification device to.
前記各2値分類器の特徴値を算出する特徴値算出手段と、
前記特徴値算出手段により算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定手段と、
前記優先順位決定手段により決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類手段と、
を備え、
前記多値分類手段は、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定手段により決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すことを特徴とするデータ分類装置。 In a data classification device that performs multi-level classification of the input data using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification,
Feature value calculating means for calculating the feature value of each binary classifier;
Priority order determining means for determining the priority order of each of the binary classifiers based on the feature value calculated by the feature value calculating means;
Multi-value classification means for performing multi-value classification of the input data using the binary classifier in descending order of priority determined by the priority order determination means;
With
The multi-level classifying means is a binary classifier having the highest priority determined by the priority determining means among binary classifiers in which neither the first classification nor the second classification is rejected. And performing the binary classification of the input data using, and rejecting the first classification or the second classification, in which the input data is not classified in the binary classification, features and to Lud over data classifier repeating until the condition is satisfied.
前記コンピュータが、
前記各2値分類器の特徴値を算出する特徴値算出工程と、
前記特徴値算出工程で算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定工程と、
前記優先順位決定工程で決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類工程と、
を実行し、
前記2値分類器がSVMであり、前記特徴値算出工程では、前記コンピュータが、前記各2値分類器の特徴値を、各SVMにおけるSVの個数あるいは各SVMにおけるすべてのSVの0でない要素の総数にもとづいて算出することを特徴とするデータ分類方法。 In a data classification method for performing multi-level classification of the input data using a computer using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification,
The computer is
A feature value calculating step for calculating a feature value of each of the binary classifiers;
A priority determining step for determining the priority of each binary classifier based on the feature value calculated in the feature value calculating step;
A multilevel classification step of performing multilevel classification of the input data using the binary classifier in descending order of priority determined in the priority determination step;
Run
The binary classifier is an SVM, and in the feature value calculation step, the computer calculates the feature value of each binary classifier as the number of SVs in each SVM or non-zero elements of all SVs in each SVM. features and to Lud over data classification method to be calculated based on the total number.
前記コンピュータが、
前記各2値分類器の特徴値を算出する特徴値算出工程と、
前記特徴値算出工程で算出された特徴値にもとづいて前記各2値分類器の優先順位を決定する優先順位決定工程と、
前記優先順位決定工程で決定された優先順位の高い順に前記2値分類器を使用して前記入力データの多値分類を行う多値分類工程と、
を実行し、
前記多値分類工程では、前記コンピュータが、前記第1の分類および前記第2の分類がいずれも棄却されていない2値分類器のうち、前記優先順位決定工程で決定された優先順位が最も高い2値分類器を使用して前記入力データの2値分類を行うとともに、前記第1の分類または前記第2の分類のうち、前記2値分類において前記入力データが分類されなかったものを棄却することを、所定の条件が満足されるまで繰り返すことを特徴とするデータ分類方法。 In a data classification method for performing multi-level classification of the input data using a computer using a plurality of binary classifiers that determine whether the input data is classified into the first classification or the second classification,
The computer is
A feature value calculating step for calculating a feature value of each of the binary classifiers;
A priority determining step for determining the priority of each binary classifier based on the feature value calculated in the feature value calculating step;
A multilevel classification step of performing multilevel classification of the input data using the binary classifier in descending order of priority determined in the priority determination step;
Run
In the multilevel classification step, the computer has the highest priority determined in the priority determination step among binary classifiers in which neither the first classification nor the second classification is rejected. The binary classification of the input data is performed using a binary classifier, and the first classification or the second classification in which the input data is not classified in the binary classification is rejected things, features and to Lud over data classification method to be repeated until a predetermined condition is satisfied.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003074367A JP3761868B2 (en) | 2003-03-18 | 2003-03-18 | Data classification apparatus, data classification method, and program for causing computer to execute the method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003074367A JP3761868B2 (en) | 2003-03-18 | 2003-03-18 | Data classification apparatus, data classification method, and program for causing computer to execute the method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2004280712A JP2004280712A (en) | 2004-10-07 |
| JP3761868B2 true JP3761868B2 (en) | 2006-03-29 |
Family
ID=33290040
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003074367A Expired - Fee Related JP3761868B2 (en) | 2003-03-18 | 2003-03-18 | Data classification apparatus, data classification method, and program for causing computer to execute the method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3761868B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4536445B2 (en) * | 2004-07-26 | 2010-09-01 | 三菱電機株式会社 | Data classification device |
| JP5699713B2 (en) * | 2011-03-17 | 2015-04-15 | 富士通株式会社 | Data analysis program, data analysis method, and data analysis apparatus |
| KR101501349B1 (en) * | 2013-05-15 | 2015-03-11 | 세종대학교산학협력단 | Music genre classification apparatus and method thereof |
| CN107025547B (en) * | 2016-09-19 | 2020-10-16 | 创新先进技术有限公司 | Payment channel detection method, device and terminal |
| JP6644281B2 (en) * | 2018-07-26 | 2020-02-12 | 株式会社スカイディスク | True / false judgment system |
| CN118885926B (en) * | 2024-09-26 | 2024-11-29 | 山东征途信息科技股份有限公司 | Intelligent government affair information identification method and system based on big data |
-
2003
- 2003-03-18 JP JP2003074367A patent/JP3761868B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2004280712A (en) | 2004-10-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9910829B2 (en) | Automatic document separation | |
| CN109189767B (en) | Data processing method and device, electronic equipment and storage medium | |
| US9002101B2 (en) | Recognition device, recognition method, and computer program product | |
| CN110163234A (en) | A kind of model training method, device and storage medium | |
| JP7117934B2 (en) | Image classification device and program | |
| JP7028322B2 (en) | Information processing equipment, information processing methods and information processing programs | |
| WO2022036520A1 (en) | Method and apparatus for enhancing performance of machine learning classification task | |
| JP6937330B2 (en) | Machine learning model compression system, machine learning model compression method and program | |
| JP6897749B2 (en) | Learning methods, learning systems, and learning programs | |
| US20110176725A1 (en) | Learning apparatus, learning method and program | |
| KR102134472B1 (en) | A method for searching optimal structure of convolution neural network using genetic algorithms | |
| US10635991B2 (en) | Learning method, information processing device, and recording medium | |
| CN109919236A (en) | A kind of BP neural network multi-tag classification method based on label correlation | |
| JP3761868B2 (en) | Data classification apparatus, data classification method, and program for causing computer to execute the method | |
| JP2007065844A (en) | Face detection method, apparatus and program | |
| JPWO2012032889A1 (en) | Learning apparatus, learning system, learning method, and learning program for object identification | |
| CN113283514B (en) | A method, device and medium for classifying unknown categories based on deep learning | |
| CN113408546A (en) | Single-sample target detection method based on mutual global context attention mechanism | |
| EP4287075A1 (en) | Training data generation device and method | |
| JP5633424B2 (en) | Program and information processing system | |
| Kotsiantis | A hybrid decision tree classifier | |
| JP2021174117A (en) | Learning device, representative image extraction device and program | |
| Bai et al. | Combination of rough sets and genetic algorithms for text classification | |
| CN111915018A (en) | Rule extraction method and system based on GBDT model | |
| US20240330405A1 (en) | Information processing device, information processing method, and computer-readable storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20051004 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051202 |
|
| 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: 20051227 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060111 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120120 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |