• 沒有找到結果。

以類神經網路驗證及評估模糊知識庫系統 (II)

N/A
N/A
Protected

Academic year: 2021

Share "以類神經網路驗證及評估模糊知識庫系統 (II)"

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會專題研究計劃成果報告 以類神經網路驗證及評估模糊知識庫系統(II) Verification and Validation of Fuzzy Rule-Based Systems

-A Neural Network Approach (II) 計劃編號:NSC 89-2218-E-011-016 執行期限:89年8月1日至90年7月31日 主持人:李漢銘 國立台灣科技大學電子工程系

研究生:黃瓊緯、黃嘉新、高子婷、洪偉棠

一、中文摘要(關鍵詞:模糊類神經網路、規則驗 證、系統效能評估)

本年度計劃依據前一年之成果,進一步提出一 個具有梯形模糊集合輸入之類神經網路知識庫系 統KBNN/TFS,此一架構能夠處理梯形模糊集合輸 入,並且具有模糊規則修正、驗證以及模糊規則 產生等特點。基於KBNN/TFS,我們提出一個有效 的方法來評估模糊推論系統的複雜度,此外,我 們也提出三個簡化模糊類神經網路的方法來增進 模糊推論的效率,第一個方法為模糊列表法(fuzzy tabulation method),它可以被用來藉由修改模糊規 則的前提來作模糊規則的結合,並且可以剔除一 些在推論過程中無效的模糊變數;第二個方法稱 為 遞 移 模 糊 規 則 的 方 法 (transitive fuzzy rule compacting method) , 它 主 要 是 結 合 遞 移 關 係 (transitive relation)來降低模糊推論的複雜度;第三 個 方 法 稱 為 相 同 前 提 之一致化的方法(identical antecedent unifying method),它可以藉由替換具有 單一相同前提之模糊規則方式來簡化多餘的模糊 規則。利用以上這三種方法可以有效降低模糊規 則結構的複度降,此外,本計劃也提出基於前面 三個有效化簡模糊規則的評估驗證模糊規則方 法,實驗結果顯示在經過這三個方法處理過後的 模糊規則,其推論的效率可以被有效的提昇。本 研究之部分成果發表於電機電子工程學會IEEE所 舉辦之第十屆Tools with Artificial Intelligence國際 研討會。

英文摘要(Keyword: Fuzzy Neural Network, Rule Verification, Validation)

Knowledge-Based Neural Network with Trapezoidal Fuzzy Set (KBNN/TFS) is a fuzzy neural network model, which handles trapezoidal fuzzy inputs with the abilities of fuzzy rule revision, verification and generation. Based on KBNN/TFS, an efficiency validation method is proposed to evaluate the rule inference complexity on KBNN/TFS.

Besides, three methods that simplify the structure of this fuzzy rule-based neural network model are provided to enhance the inference efficiency. Fuzzy tabulation method, the first method, is performed to do rule combination by modifying the antecedents of some specific rules and then to eliminate the don’t care variables in the rules. The second method, named transitive fuzzy rule compacting method, combines the rules with the transitive relations to decrease the computational load of inference. The third method, called identical antecedent unifying method, simplifies the redundant antecedents of rules by replacing the identical antecedents of the rules with a single specific antecedent. By these methods, the structure of rules can be simplified without changing the results of its inference. The proposed efficiency validation method is used to analyze and support the results of performing these three efficiency enhancing methods. Also the simulation results show that the efficiency is enhanced after performing these three efficiency enhancing methods.

二、計劃緣由與目的

在結合模糊理論、類神經網路與專家系統之知 識推論系統發展之過程中,模糊規則的驗證與評

(2)

估的方法被應用來保證所建構系統的推論品質 [1],驗證的程序可以保證系統的推論正確性,而 評估則是用來決定系統的效率與正確性是否可以 被接受[2],一個有效的評估是去估測系統對於一 個問題可以多快的速度進行推論,以及完成此一 工作需要多少記憶空間[2],當我們發現效率評估 的結果無法接受時,我們可能需要考慮簡化系統 本身的架構,因此,依據規則的架構我們提出一 個有效率的評估方法可以計算推論系統的計算複 雜度,藉由此一方法我們亦可以正確的評估系統 效率被改善多少。此外,簡化模糊類神經網路推 論規則的三個方法可以被使用來增進系統推論的 效率,這三個方法可以修正知識庫中的模糊規 則,也因此可以提昇系統推論的速度,而這些方 法均可以藉由提出之評估方法來進行分析。

三、研究方法與成果

我們在過去的研究中,已經完成如何利用類神 經網路來實作模糊知識庫,以及如何修正不完整 的模糊規則,而本計劃主要著重在模糊規則的驗 證(verification)以及效能(validation)的提昇。

(一) KBNN/TFS 的架構 (1) 梯形LR型態的模糊輸入

梯形LR型態的模糊數是一個特例[3] [4],它可 以被使用來表示一個模糊語意變數,藉由這個表 示法,諸如語意變數、區間值等均可以被清楚的 描述,除此之外,它的計算複雜度也不高,它被 應用在我們提出的KBNN/TFS[5]架構中。一個梯 形 LR 型 態 的 模 糊 區 間 可 以 被 表 示 為

) I , I , I , (I

~I

n

m α β

= ,如圖(1)所示,其中Im In分別 是介於區間[Im,In]中的平均值(mean)且其歸屬函 數值為1,Iα Iβ則分別是左右的邊界,因此一 個梯形LR型態的模糊區間可以被定義如下[3]:



>

=

0 1

0

~

β α

β

µ α

,I I for x )

R(

I x for I

,I for x<I )

L(

(x)

I n I x

n m

I m x) (I

I

n m

(1)

其中

=



α

α I

x , I

I Max x)

L (Im 01- m

以及

=

 −

β

β I

I , x I Max

) I

R (x n 01 n

Im

1

x

µ (I x)

Iα

In

Iβ

圖(1) 梯形LR型態的模糊區間 ~ ( , , , )

β α I I I I

I = m n 示意

(2)系統架構

一 個 初 始 的 KBNN/TFS 架 構 是 由 一 些 屬 於 Horn-clause 形式 [6],且存在不完整或不正確模糊 規 則 訊 息 的 架 構 組 成 , 一 般 而 言 S-neurons 及 G-neurons可以被使用來解譯模糊規則,S-neurons 用於計算模糊規則的觸發強度,而G-neurons則是 用來產生結論,每一個連結到S-neurons的輸入代 表一個前提,也就是每一個前提被表示成模糊權 值的連結,因此,所有模糊規的前提是由一些 S-neurons的輸入連結所組成,而結論部份則利用 G-neuron來表示之。

(二)有效的模糊規則驗證

本研究提出一個依據計算複雜度來評估推論 系統效率的方法,要得到推論系統整體的複雜 度 , 我 們 必 須 將 所 有 conjunction operation 、 disjunction operation以及 matching operation加總起 來 , 而 conjunction operation 以 及 disjunction operation的計算量是相依於他們的輸入量,在此我 們假設每一個新加入的輸入量所增加的複雜度是 相同的,因此這些計算量可以被視為是由一些固 定的項(constant term)以及一些新加入的項(added term)的加總,因此,第j 個conjunction operation ( Conj _CL j) 以 及 第 k 個 disjunction operation

(3)

(Disj _CLk)可以被表示如下:

CL Aconj NI

Conj CL Cconj CL

Conj_ j= _ +( _ j1)* _ (2)

CL Adisj NI

Disj CL Cdisj CL

Disj_ k= _ +( _ k1)* _ (3) 其中Conj _NIj表示第j個 conjunction operation的輸 入量,Disj_NIk表示第k個 disjunction operation的 輸入量,Cconj_CL, Cdisj_CL Aconj CL_ 以及

Adisj CL_ 分別表示固定項以及增加項的conjunction operation 以及 disjunction operation的計算量。

根 據 方 程 式 (2) 以 及 (3) , 我 們 可 以 計 算 所 有 conjunction operation 以及 disjunction operation的 計 算 量 , 在 此 分 別 表 示 成 Conj_CLTotal 以 及

Total

CL

Disj_ ,在一個推論系統裡,它們的計算量 可以被以如下的推導得到:

{ }

=

=

+

=

Nconj

j j

Nconj

j j

Total

CL Aconj NI

Conj CL Cconj

CL Conj CL

Conj

1 1

_

* ) 1 _ ( _

=

_

_ (4)

{ }

=

=

+

=

Ndisj

k k

Ndisj

k k

Total

CL Adisj NI

Disj CL Cdisj

CL Disj CL

Disj

1 1

_

* ) 1 _ ( _

=

_ _

(5) 其中Nconj Ndisj分別表示conjunction operation 以及 disjunction operation的總數量。

另一方面,在輸入以及規則前提之間的matching operation 通 常 是 一 個 常 數 , 在 此 我 們 表 示 為

CL

match _ , 假 設 總 共 有

match

N 個 matching operation,則matching operation的總計算量可以被 表示如下:

CL match N

CL

match_ Total = match* _ (6) 由加總Conj_CLTotalDisj_CLTotal以及 match_CLTotal, 整體的計算量Total_CL可以被表示如下:

Total Total

Total Disj CL match CL

CL Conj CL

Total_ = _ + _ + _

{

_ ( _ 1)* _

}

=

1

= +

Nconj j

j Aconj CL NI

Conj CL

Cconj

{ _ ( _ 1)* _ }

+

1

disj= +

N

k Cdisj CL Disj NIk Adisj CL +Nmatch*match_CL (7)

(三)推論效率的提昇

由前面的研究我們知道藉由降低模糊推論系 統的計算負載、簡化模糊規則以及降低模糊規則 的數量,可以達到最小化模糊規則知識庫的目 的,並且也能得到相同的推論結果,以下我們提

出三種方法來達到簡化模糊規則的目的。

(1)模糊列表法

為了降低模糊規則的數量,Lin和Lee[7]藉由剔 除一些不影響結果的變數以及多餘的規則,提出 一個模糊規則結合的條件,此外,Kóczy 藉由CNF union[8]來簡化具有相同結論之模糊規則的概念。

在本研究中,我們基於應用化簡布林變數之列表 法(tabulation method) [9][10],提出一個稱為模糊 列表法(fuzzy tabulation method)的模糊規則結合方 法,藉由這個方法,具有相同結論之模糊規則可以 使用CNF union有系統的結合並化簡規則,例如,

考慮下列兩個模糊規則:

Rule 1: IF the speed of the car is HIGH and the volume of the car is LARGE, THEN car stopping is NOT EASY.

Rule 2: IF the speed of the car is HIGH and the volume of the car is MIDDLE, THEN car stopping is NOT EASY.

規則一、二具有相同的結論,但是關於“the volume of the car”的前提不同,假設模糊變數“the volume of the car”被定義為具有三個模糊項(fuzzy term):

LARGE、MIDDLE以及SMALL,如圖(2)所示。

1 µ

LARGE MIDDLE

SMALL

the volume of the car

圖(2) 模糊項“the volume of the car”的定義 很明顯的,模糊項LARGE 及 MIDDLE為相鄰 的,這兩個模糊規則可以被結合如下:

Rule 1: IF the speed of the car is HIGH

and the volume of the car is LARGE MIDDLE, THEN car stopping is NOT EASY.

其 中 “LARGE MIDDLE” 表 示 為 LARGE 及 MIDDLE的聯集(union),這兩個CNF項的聯集可以 被表示如圖(3)所示。

(4)

LARGE

MIDDLE

LARGE MIDDLE 1

1

1 µ

µ

µ

圖(3) 圖(2)中模糊項 LARGE 及 MIDDLE 的聯集 綜合而論,假如兩個模糊規則滿足下列的條 件,則可以履行模糊規則的合併。

(1). 兩個模糊規則的結論是相同或是相似的情況。

(2). 除了前提之外,兩個模糊規則的其他部分是相 同或非常的相似。

(3). 兩個模糊規則中前提是彼此互相相鄰。

(2)遞移模糊規則化簡法

考慮一個如圖(4)(a)的簡單網路,“the speed of the car” 以及 “the weight of the car” 為輸入變 數,“car stopping”為隱藏變數,“safe degree”則為輸 出變數。假如兩條模糊規則被描述如下:

Rule 1: IF the speed of the car is HIGH and the weight of the car is HEAVY,

THEN car stopping is NOT EASY.

Rule 2: IF car stopping is NOT EASY, THEN safe degree is LOW.

很明顯的,規則1的結論與規則2的結論是一樣 的,所以我們能直接從規則1的結論中隱含規則2 的結果,也就是,這二條模糊規則具有遞移關係,

並且可以被合併為一條規則如下所示:

Rule 1': IF the speed of the car is HIGH and the weight of the car is HEAVY, THEN safe degree is LOW.

規則 1' 可以被表示如圖(4)(b)所示。根據我們在前 面所描述之計算量的計算公式,圖(4)(a)的計算量

是96 BMO_CLs, 在使用遞移模糊規則化簡後的計

算量為63 BMO_CLs。

the speed of car

the weight of car

S1 G1 S2 G2

HIGH

HEAVY

NOT EASY

car stopping NOT

EASY LOW

safe degree

(a)

the speed of car

the weight of car

S1' G1'

HIGH

HEAVY

LOW safe degree

(b)

圖(4) (a)在KBNN/TFS模式下的兩條模糊規則 (b) 模糊規則合併後的結果

(3)相同前提一致化的方法

第 三個方法稱為 相同前提下 一致化的方法 (identical antecedent unifying method),此一方法主 要是藉由替換具有相同前提之模糊規則來達到簡 化模糊規則的目的,藉由此一方法許多多餘的模 糊規則可以被剔除,雖然可能新加入一條模糊規 則,但計算量可能因此而降低。例如表(1)中有三 條模糊規則,很明顯的這三條規則具有相同的前 提 分 別 是 “WORTH is High” 、 “EMPLOYEE ACCEPTANCE is Negative” 以 及 “SOLUTION AVAILABLE is Partial”,為了簡化整個模糊規則,

我們使用一個稱為anonymous的指定前提來替代 原本每一條模糊規則的前提,此外,為了隱含一 個 新 的 anonymous 前 提 , 一 個 具 有 “WORTH is High”、 “EMPLOYEE ACCEPTANCE is Negative” 以 及 “SOLUTION AVAILABLE is Partial”前提的模糊 規則被插入,這個anonymous前提被定義為“X is x”,在這裡x是一個模糊值,且X是一個anonymous 變數,表(2)列舉了化簡這三條模糊規則的結果。

根據計算量描述的方程式,原來在表(1)的三條 模糊規則計算量為553 BMO_CLs,在經過化簡後,

在 表 (2) 中 四 條 新 的 規 則 的 計 算 量 下 降 為 BMO_CLs。

(5)

(四)實驗結果

為了評估本研究所提出之三種有效化簡模糊 規則的方法,我們使用KBNN/TFS模式實作出一個 知識庫評估器(Knowledge Base Evaluator)[11],首 先我們使用所提出之有效的評估方法來量度模糊 規則庫的總計算量,然後使用所提出之三種有效 之模糊規則化簡方法來化簡模糊規則,在履行完 這三種化簡方法後再來評估其總計算量,藉由此 一方法可以有效評估所降低的計算量。

知識庫評估器是一個用來評估是否某一個知 識推論系統是否適用於某一領域的專家系統,它 的規則部分被使用於實作KBNN/TFS模式中的類 神經網路架構,所有的實驗結果被列舉於表(3) 中,規則8、17以及18為新加入的模糊規則,滿足 履行遞移模糊規則化簡的三個條件,此外,為了 與原始之模糊規則的輸出比較,均方根誤差(mean square error)記為E被定義為:

2 2

2 2

2 1 2

1 2

2 q(D O ) (D O ) (D O )

) O q(D

E= m m + n n + α α + β β (8)

其中 ~ ( , , , )

β

α D

D D D

D= m n ~ ( , , , )

β α O O O O

O= m n 分別為

某一輸入資料下的期望輸出以及網路的實際輸出 值。

參數q為均值mn的重要因子,在我們的實驗中,

q被設定為3,表(4)顯示出履行三種化簡法後的比 較結果。

四、結論與討論

在本計劃中,一個一般化的有效率評估模糊規 則推論複雜度的方法被提出,根據在KBNN/TFS 模式以及在網路結構模糊規則上運算的定義,本 研究實際的以KBNN/TFS模式來進行模糊規則計 算量的評估。此外,本研究提出三個降低由規則 所建構之類神經網路推論效率的方法,這三個方 法可以修正知識庫中的模糊規則,實驗顯示藉由 這三種方法可以有效的改善推論的效率。

五、參考文獻

[1] C. T. Chao and C. C. Teng, “Implementation of a fuzzy inference system using a normalized fuzzy neural network,” Fuzzy Sets and Systems, vol. 75, pp. 17-31, 1995.

[2] L. M. Fu, Neural Networks in Computer Intelligence, McGraw-Hill, 1994.

[3] J. Zimmermann, Fuzzy Set Theory and Its Applications, Kluwer Academic Publishers, 1991.

[4] D. Dubois and H. Prade, Fuzzy Sets and Systems, Academic Press, 1980.

[5] H. M. Lee, F. T. Lin and J. M. Chen, “A Fuzzy Neural Network model for Fuzzy Rule Verification, Refinement and Generation,”

Journal of Information Science and Engineering, vol. 13, pp. 311-333, 1997.

[6] T. Dean, J. Allen and Y. Aloimonos, Artificial Intelligence: Theories and Practice, The Benjamin/Cummings Publishing Company, 1995.

[7] C. T. Lin and C. S. G.

Lee, ”Neural-Network-Based Fuzzy Logic Control and Decision System,” IEEE Transactions on Computers, vol. 40, no. 12, pp.

1320-1336, 1991.

[8] L. T. Kóczy, “Fuzzy If … Then Rule Models and Their Transformation Into One Another,” IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans, vol.

26, no. 5, pp. 621-637, 1996.

[9] W. V. Quine, “The Problem of Simplifying Truth Functions,” American Mathematics Monthly, vol.

59, no. 8, pp. 512-531, 1952.

[10] E. J. McCluskey, ”Minimization of Boolean Functions,” The Bell System Technical Journal, vol.35, no. 6, pp. 1417-1444, 1956.

[11] R. Keller, Expert System Technology Development & Application, Yourdon Press, Englewood Cliffs, NJ, 1987.

(6)

表(1) 具有三個相同前提之模糊規則

Worth Employee Acceptance

Solution Available

Easier Solution Teachability Risk Output (Suitability)

R1 High Negative Partial None Difficult Moderate Poor

R2 High Negative Partial None Frequent High Fair

R3 High Negative Partial Complete Possible Low Fair

表(2) 運用相同前提一致化的方法化簡表(1)模糊規則之結果

Χ Easier Solution Teachability Risk Output

(Suitability)

R1’ x None Difficult Moderate Poor

R2’ x None Frequent High Fair

R3’ x Complete Possible Low Fair

Worth Employee

Acceptance

Solution Available Output X

R4’ High Negative Partial x

表(3) 原來在 知識評估器中的模糊規則(計算量為1674 BMO_CLs)

Variables Rule no.

Complexity Efficiency Satisfaction

Expertise Control Output

(Risk)

R1 High * * * High

R2 Low * Available Tight Low

R3 Moderate * OK OK Moderate

R4 Low * Available OK ⊕ Tight Low

R5 Moderate * OK OK ⊕ Tight Moderate

R6 Low * Available Loose High

R7 Low ⊕ Moderate * Unavailable * High

R8 * Satisfied * * Low

Variables

Rule no.

Intuition/

Common Sense

Technology Decision Definition Knowledge Domain

Output (Complexity)

R9 Over 50% * Fuzzy * High

R10 Under 10% Exists Well-Defined Narrow Low

R11 10%~50% Modify OK OK Moderate

R12 Under 10% Build Fuzzy Narrow High

R13 Over 50% Build OK Eclectic High

R14 Under 10% Exists Fuzzy Eclectic Moderate

R15 Over 50% Exists Well-Defined Eclectic Moderate

R16 Under 10% Build Fuzzy Eclectic High

Variables

Rule no.

Hardware Performance

Response Time Requirement

Output (Efficiency Satisfaction)

R17 High Low Satisfied

R18 High Moderate Satisfied

(7)

*: don’t care

表(4) 履行三種化簡模糊規則方法後的比較結果

Methods

Number of Connections

Number of Rules

Computational load(in BMO_CLs)

Result (MSE)

Original 71 18 1674 0.00000

(1) 59 15 1389 0.00101

(1)+(2) 57 14 1356 0.00101

(1)+(2)+(3) 59 15 1329 0.00101

(1). fuzzy tabulation method

(2). transitive fuzzy rule compacting method (3). identical antecedent unifying method

參考文獻

相關文件

(1) principle of legality - everything must be done according to law (2) separation of powers - disputes as to legality of law (made by legislature) and government acts (by

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

/** Class invariant: A Person always has a date of birth, and if the Person has a date of death, then the date of death is equal to or later than the date of birth. To be

Biases in Pricing Continuously Monitored Options with Monte Carlo (continued).. • If all of the sampled prices are below the barrier, this sample path pays max(S(t n ) −

• If we want analysis with amortized costs to show that in the worst cast the average cost per operation is small, the total amortized cost of a sequence of operations must be

We try to explore category and association rules of customer questions by applying customer analysis and the combination of data mining and rough set theory.. We use customer

The first stage of the Delphi Method expert questionnaire to confirm the initial structure of the questionnaire, then Analytic Hierarchy processto calculate the overall

Secondly then propose a Fuzzy ISM method to taking account the Fuzzy linguistic consideration to fit in with real complicated situation, and then compare difference of the order of