首页 模糊关系,推理,逼近2

模糊关系,推理,逼近2

举报
开通vip

模糊关系,推理,逼近2nullnull模糊关系与模糊推理null集合的直积: 具体算法:在集合A中取一个元素a,再在B中取一个 元素b,把它们搭配起来,成为序偶(a,b),所有 的序偶(a,b)组成的集合,即为 。Remark: 例如: ,  集合的直积反映他们之间存在所有可能关系的集合傳統明確關係傳統明確關係笛卡兒乘積 (Cartesian Product)的定義: 兩個明確集合U和V的笛卡兒乘積是兩個集合的元素間之所有可能配對,可以用符號U×V來表示: U×V = {(u, v)| ...

模糊关系,推理,逼近2
nullnull模糊关系与模糊推理null集合的直积: 具体算法:在集合A中取一个元素a,再在B中取一个 元素b,把它们搭配起来,成为序偶(a,b),所有 的序偶(a,b)组成的集合,即为 。Remark: 例如: ,  集合的直积反映他们之间存在所有可能关系的集合傳統明確關係傳統明確關係笛卡兒乘積 (Cartesian Product)的定義: 兩個明確集合U和V的笛卡兒乘積是兩個集合的元素間之所有可能配對,可以用符號U×V來表示: U×V = {(u, v)| uU, vV}. 若UV,則U×V和V×U的意義不一樣。 若有n個明確集合U1, U2, …, Un,則它們的笛卡兒乘積如下: U1×U2× …×Un = {(u1, u2, …, un )| uiUi, i = 1, 2, …, n}. 若上述n個集合,它們之間存在一種關係,我們以符號R(U1, U2, …, Un)來表示,它是上述公式的部份集合,即: R(U1, U2, …, Un)  U1×U2× …×Un 此時,若n = 2,我們可將此明確關係稱為二元關係 (Binary Relation)。即: R(U×V)  U×V 這些關係的值皆為二值,也就是非0即1。null舉例: 有兩組人,一組為男生 M = {m1, m2, m3},一組為女生 W = {w1, w2}。則其笛卡兒乘積M×W結果為何?若其中有兩對有婚姻關係,即 R(M, W) = {(m1, w2), (m3, w1)},則二元關係如何表示?二元關係矩陣如何表示? Ans: (1). M×W = {(m1, w1), (m1, w2), (m2, w1), (m2, w2), (m3, w1), (m3, w2)}. (2). R(M, W) = {0, 1, 0, 0, 1, 0}= {(m1, w2), (m3, w1)}.. (3).傳統明確關係的基本運算傳統明確關係的基本運算假設有兩個明確關係 O 和 S為兩個有限集合A = {a1, a2, …, am}和B = {b1, b2, …, bn}的二元關係。亦即: O  A×B, S  A×B (O和S是兩個相同的笛卡兒乘積之關係 ) O的所有成員為oij,而S的所有成員為sij,其中i = m,j = n,明確關係的基本運算如下: 聯集運算 (Union) – 取矩陣成員特徵值的最大值 OS = (oij)  (sij) = max (oij, sij) 交集運算 (Intersection) – 取矩陣成員特徵值的最小值 OS = (oij) (sij) = min (oij, sij) 補集運算 (Complement) – 用1減去矩陣成員的特徵值 1-oij null舉例: 若A = {a1, a2, a3 , a4}和 B = {b1, b2 , b3}分別為四位男士和三位女士的集合。假設有兩個二元關係分別如下: O = 夫妻關係 = {(a1, b2), (a2, b3), (a4, b1)} S = 同事關係 = {(a1, b2), (a1, b3), (a2, b2), (a3, b1), (a3, b3), (a4, b1), (a4, b2)} 其中O  A×B,S  A×B。則試求下列關係的運算結果為何? (1). “既是夫妻又是同事的關係” (2). “夫妻或同事的關係” (3). “沒有同事關係”nullProblem for classical relationsProblem for classical relationsA classical relation represents a crisp relationship among sets, that is, either there is such a relationship or not. For certain relationships, however, it is difficult to give a zero-one assessment.模糊關係模糊關係若n個集合之間所存在的關係不再是非0即1時,或者是說這些關係R(U1, U2, …, Un)不再那麼明確時,就變成了模糊關係。 定義: 一個模糊關係R (U1, U2, …, Un)是針對明確集合U1, U2, …, Un定義在笛卡兒乘積U1×U2× … ×Un的模糊集合,其中,0  R (U1, U2, …, Un)  1代表關係的歸屬度。Example 2Example 2Let U={Los Angeles, Taipei, Tokyo} and V={New York, Taipei}. Define a relational concept “very far” between these two sets of cities.Example 2Example 2Clearly, classical relations are not useful because the concept “very far” is not well-defined in the framework of classical sets and relations.模糊关系模糊关系1、模糊关系的定义关系是客观世界存在的普遍现象。如父子关系、大小关系、属于关系、二元关系、多元关系、多边关系等等(关系明确)——相似程度来表示,是一个模糊的关系(关系模糊,对普通的关系的拓展和发展,内容更丰富、更广泛)当然,也可以推广到n个集合的直积nullExample (equality relation)Example (equality relation)y is approximately equal to xnullnull例2-5 考察两个整数之间的“大得多”的关系。设论域U={1,5,7,9,20}”大得多“的关系R。用矩阵表示:R=?null例 设U={1,2,3};V={1,2,3,4};vunull例2-7考虑如下模糊条件语句如果C是慢的,则A是快的。其中,D、A分别属于两个不同的论域U、V。其隶属度函数分别为:A=快=0/0+0/20+0.3/40+0.7/60+1/80+1/100C=慢=1/0+0.7/20+0.3/40+0/60+0/80+0/100那么它们的直积为CA=min(CA)(u,v)=A: 0 0 0.3 0.7 1 1C: 1 0.7 0.3 0 0 0模糊關係的基本運算模糊關係的基本運算假設有兩個關係 O 和 S為兩個有限集合A = {a1, a2, …, am}和B = {b1, b2, …, bn}的模糊關係。亦即: O  A×B, S  A×B (O和S是兩個相同的笛卡兒乘積之模糊關係) O的所有成員為oij,而S的所有成員為sij,其中i = m,j = n,模糊關係的基本運算如下: 聯集運算(Union) –取最大值 : OS = (oij)  (sij) = max (oij, sij) 交集運算(Intersection) – 取最小值:O S = (oij) (sij) = min (oij, sij) 補集運算(Complement) – 用1減去歸屬度: 1-oij 代數積運算(Algebraic Product) –取代數積: O • S = (oij) • (sij) 代數和運算(Algebraic Sum) –取代數和: O + S = (oij) + (sij)-(oij) × (sij)nullnullFuzzy關係的截運算 nullnull2、模糊关系的合成前面讲的是单个推理,那么对于多重推理如何解决?如:if A then B, if b then C, 则A与C是什么关系?模糊关系也存在关系合成,主要通过模糊关系矩阵来合成null例2-8 某家中子女与父母的长相相似关系R为模糊关系,可表示为用模糊矩阵R来表示为该家中父母与祖父母的相似关系S也是模糊关系,可表示为null用模糊矩阵R来表示为那么家中孙子、孙女与祖父、祖母的相似程度如何?null模糊关系合成算子sup-min存在以下特性:nullo21是指模糊關係O中的 第二橫列、第一直行的 值,即0.6。模糊逻辑、模糊逻辑推理和合成模糊逻辑、模糊逻辑推理和合成17世纪,数学家和哲学家把数学的方法用到哲学中去,形成数理逻辑; 二值逻辑(非此即彼的逻辑) 模糊逻辑(如年轻这个概念是一个模糊的概念)一、二值逻辑一、二值逻辑常用的命题联结词:析取、合成、否认、蕴涵、等价二、模糊逻辑与基本运算二、模糊逻辑与基本运算 二直逻辑的特点是一个命题不是真命题就是假命题,但是在很多情况下要做出非真即假的判断很难,比如“他是一个高个子”。 模糊逻辑是研究模糊命题的逻辑,而模糊命题就是带有模糊概念或者带有模糊性的陈述句。模糊命题的真假不是绝对的,而是反映多大程度隶属于“真”或者“假”。模糊逻辑的基本运算:(1)、模糊逻辑补:用来对某个命题的否定, (2)、模糊逻辑合取: (3)、模糊逻辑析取: (4)、模糊逻辑蕴涵:如P是真,则Q也是真, (5)、模糊逻辑等价: (6)、模糊逻辑界积: (7)、模糊逻辑界和: (8)、模糊逻辑界差:null模糊逻辑的基本定律:三、模糊语言逻辑三、模糊语言逻辑模糊语言逻辑是由模糊语言构成的一种模拟人的思维的逻辑null定义2-16 语言值:在语言系统中,那些与数值直接联系的词(如长、短、多、少等等)或者由它们加上语言算子(如很、非常等等)而派生的词组(如非常多、很长等等)定义2-17 语言变量:语言变量是用一个五元素的集合(X,T(X),U,G,M)来表征的。null语气算子分三类:语气算子、模糊化算子和判定化算子1、语气算子 语气算子用来表达语言中的对某一个单词或者词组的确定性程度。分集中化算子或强化算子、松散化算子或淡化算子。举例2-10 page 32nullnull常用修饰词的隶属函数为:null温度的模糊表示null將數值資料模糊化Speednullnull四、模糊逻辑推理四、模糊逻辑推理若A则B,若B则C,结论:若A则C若A大,则B小,若A较大,则B应该多少?nullnull模糊逻辑推理法是以模糊判断为前提的,运用模糊语言 规则 编码规则下载淘宝规则下载天猫规则下载麻将竞赛规则pdf麻将竞赛规则pdf ,可推出一个新的模糊判断结论的方法。(1)、扎德法(2)、玛达尼法null例2-12 设论域X=Y={1,2,3,4.5} X、Y上的模糊子集“大”、“小”、“较小”分别定义为:“大”=0.4/3+0.7/4+1/5; “小”=1/1+0.7/2+0.3/3; “较小”=1/1+0.6/2+0.4/3+0.2/4; 已知规则若x小,则y大, 问题:当x=较小时,则y多大?根据扎德法以及玛达尼法得到null由扎德推理法得到同理可得:可得x较小时的推理结果:模糊合成法(最小最大法)2、模糊条件推理法2、模糊条件推理法语言规则是:如果x是A,则y是B,否则y是C. 其逻辑表达式为:根据逻辑表达式,其模糊关系R可以写成:根据模糊推理合成原则,得到:null3、多输入模糊推理3、多输入模糊推理规则一般形式: 前提1:如果A且B,那么C 前提2:现在是 结论:如果A且B,那么C的数学表达式是 ,其模糊关系矩阵若用玛尼达推理,则模糊关系矩阵的计算就变成:由此推理,结果为:null其隶属函数为:二输入玛尼达推理法过程nullnull例2-14 假设解:講題四 模糊邏輯控制理論 4-10講題四 模糊邏輯控制理論 4-10B 模糊規則形成和推理 自然語言規則表示法 形式化規則表示法 (一) 如果水溫偏高,那就加一些冷水 If A then B 類型(一) If A then B 類型模糊規則之推理法 大前提 : If x=A then y=B 小前提 : x=A’ 結論 y=B’ B’ = A’ R , R = A×B 例: Feng Chia Univ.Chyi-Tsong Chen講題四 模糊邏輯控制理論 4-11講題四 模糊邏輯控制理論 4-11解: R = A×B = = = i.e, Feng Chia Univ.Chyi-Tsong Chennull類型(二) If A then B else C 類型模糊規則推理法 大前提: If x=A then y=B else y=C 小前提: Now , x=A’ 結論: y=B’ 類型(三) If x1=A and x2=B then y=C 類型模糊規則推理法 ― 模糊控制常用之規則形成 規則: (大前提) If x1 is E1 and x2 is C1 then u=u1 If x1 is E2 and x2 is C2 then u=u2 … If x1 is Ei and x2 is Ci then u=ui 小前提: Now x1 is E’ and x2 is C’ 總結 : u=u’null NOTE : 1. 如果已知輸入E , C和輸出U , 就可求出其模糊關係 R 2. 已知模糊關係R,就可根據目前之輸入E’和C’ ,求出控制 量輸出U’ 例 : 已知輸入為 時,其輸出為 (1) 求出此條規則相對應之模糊關係R (2) 當輸入為 時,求輸出C’Feng Chia Univ.Chyi-Tsong Chennull解 : (1) R = ? R=(E×C)* ×U (E×C)* = = = = R= = = Feng Chia Univ.Chyi-Tsong Chennull (2) (E’×C’)*= = U’=(E’×C’)R = = i.e, NOTE : 1. 真正的輸出量,需透過解模糊化介面完成 2. 若有n條規則,則每條規則都可以得到一個相對 應之模糊關係Ri , i= 1,2,3,….n 對整個系統而言 總的模糊關係為R Chyi-Tsong ChenIllustrations of Fuzzy Propositions – Composition/Evaluation (from Klir&Yuan)Illustrations of Fuzzy Propositions – Composition/Evaluation (from Klir&Yuan) If x is A1 then y is B1 If x is A2 then y is B2 Now x is A*,y is B*=?Illustrations of Fuzzy Propositions – Composition/Evaluation (Earl Cox)Illustrations of Fuzzy Propositions – Composition/Evaluation (Earl Cox) If P is low and T is cool then u is PM Illustrations of Fuzzy Propositions – Composition/Evaluation (from Earl Cox)Illustrations of Fuzzy Propositions – Composition/Evaluation (from Earl Cox) If P is low and T is cool then u is PM If P is ok and T is cool then u is ZR細說模糊近似推論細說模糊近似推論nullnullnullnull模糊近似定理模糊近似定理1990年已經證明模糊系統可以模擬或近似任何系統,以模糊近似定理(Fuzzy Approximation Theorem—FAT) 模糊近似定理以一些曲形塊蓋在曲線上. 每件人類的知識 ( [若A則B] 形式的規則 ) 定義一片曲形塊. 模糊系統只是一大堆模糊 [若則] 的規則,所有的規則定義了蓋在曲線上的曲形塊. 更多知識表示更多規則,更多規則表示表示多曲形塊和蓋得更好. null分段线性化建立模糊系統(Cont.)建立模糊系統(Cont.)結合兩個三角形得到一個曲形塊規則是區形塊模糊近似模糊近似Model construction (mathematical)Model construction (mathematical)Mathematical models are functions. Deep knowledge on mathematics. If non-linear (eg. NN), laborious calculations and computing. Linear models can be too simplified. How can we find appropriate functions?Y=1-1./(1 + EXP(-2*(X-5)))Model construction (trad. rules )Model construction (trad. rules )If 0 Large rule bases. - Only one rule is fired for each input. - Coarse models.Model construction (SC/fuzzy)Model construction (SC/fuzzy)If x0, then y1 If x5, then y0.5 If x10, then y0- Approximate values - Rules only describe typical cases (no rule for each input). => Small rule bases. - A group of rules are partially fired simultaneously.Modeling a FunctionModeling a FunctionCurve Fitting by Using Fuzzy Rules (Patches) When There Are More Inputs We Try to Approximate A Surface (2 Inputs) or Hyper-Surface (3 or More Inputs) Modeling a FunctionModeling a FunctionMore Rules - More Smaller Patches and Better Approximation Origin of the patches and how do they work?Consider modeling two different functions by fuzzy rules Consider modeling two different functions by fuzzy rules These rules define three large rectangular patches that cover our functions.Consider modeling two different functions by fuzzy rules Less rules leads to the approximation accuracy decrease. An increase in a number of rules increases the precision at the cost of a computation time needed to process more rules. This is the most classical soft computing dilemma that trades off between the imprecision and uncertainty on one hand and low solution cost, tractability and robustness on the other.Consider modeling two different functions by fuzzy rules Modeling two different functions by fuzzy rules Modeling two different functions by fuzzy rules Two different functions (solid lines in both graphs) covered by three patches produced by IF-THEN rules and modeled by two possible approximators (dashed and dotted curves).Modeling two different functions by fuzzy rules Modeling two different functions by fuzzy rules COMMENTS: We do not try to ‘draw these functions in our mind’. We neither try ‘to see’ them as geometrical artifacts. In general, we do not process geometrical figures, curves, surfaces or hypersurfaces while performing some tasks or expressing our knowledge. Even more, our expertise or understanding of some functional dependencies is very often not a structured piece of knowledge at all. We typically perform very complex tasks without being able to express how are we executing them. 函數式模糊規則 (TSK模型)函數式模糊規則 (TSK模型)此種模糊規則有時又稱做 “Sugeno” 模糊規則”或“TSK模糊規則”。 此種線性式模糊規則的優點是其參數 可以很容易地從數值型資料中鑑別出來;其缺點是相較於語意式模糊規則,此種模糊規則較不具有邏輯上的意義,因此較不容易將(1)由人類專家所提供的語意式資訊以及(2)從實驗中得到的數值型資料,整合起來用以建立線性式模糊規則。 前提:x is x0 and y is y0 模糊規則一 :If x is A1 and y is B1 Then z is 模糊規則二 :If x is A2 and y is B2 Then z is 令 代表第 i 個模糊規則的啟動強度,並且 為第 i 個模糊規則經過推論後所得到的結果,最後利用“權重平均法”來去模糊化,整體最後的輸出 z* 為: Fuzzy If-Then RulesFuzzy If-Then Rules Sugeno style If speed is medium then resistance = 5*speedFuzzy Inference System (FIS)Fuzzy Inference System (FIS)If speed is low then resistance = 2 If speed is medium then resistance = 4*speed If speed is high then resistance = 8*speedRule 1: w1 = .3; r1 = 2 Rule 2: w2 = .8; r2 = 4*2 Rule 3: w3 = .1; r3 = 8*2Speed2.3.8.1lowmediumhighResistance = S(wi*ri) / Swi =(0.3*2+0.8*8+0.1*16)/(0.3+0.8+0.1) = 7.12MFsSpeed = 2範例8.2:函數式模糊規則 (1)範例8.2:函數式模糊規則 (1)  If x is small Then y = 2x If x is medium Then y = -x +3 If x is large Then y = x - 1 我們採用的是“權重平均法”來去模糊化。 圖8.6:若用不同的方式來定義模糊集合,則會導至整體的輸入/輸出的函數關係會有所不同。 null Two-input single output fuzzy model with 4 rules R1: if X is small & Y is small then z = -x +y +1 R2: if X is small & Y is large then z = -y +3 R3: if X is large & Y is small then z = -x +3 R4: if X is large & Y is large then z = x + y + 2 R1  (x  s) & (y  s)  w1 R2  (x  s) & (y  l)  w2 R3  (x  l) & (y  s)  w3 R4  (x  l) & (y  l)  w4 Aggregated consequent  F[(w1, z1); (w2, z2); (w3, z3); (w4, z4)] = weighted average Example 2nullnull8.4 Tsukamoto模糊規則 (1)8.4 Tsukamoto模糊規則 (1)Tsukamoto模糊規則可以視作語意式模糊規則的一種簡化,Tsukamoto把後鑑部之模糊規則限定成只能擁有單調性(遞增或遞減)的歸屬函數,如此一來,歸屬函數的反函數便一定存在。 前提:x is x0 and y is y0 模糊規則一 R1:If x is A1 and y is B1 Then z is C1 模糊規則二 R2:If x is A2 and y is B2 Then z is C2 令 代表第 i 個模糊規則的啟動強度,並且 zi 代表是當第 i 個模糊規則的啟動強度 i 為時所推論而得到的結果,然後利用“權重平均法”來去模糊化,整體最後的輸出 z* 為: null圖8.7:Tsukamoto模糊規則的推論過程。 Tsukamoto Fuzzy models - First-Order Sugeno FIS Note that humans do not (or only rarely) think in terms of nonlinear functions.Tsukamoto Fuzzy models - First-Order Sugeno FIS Note that humans do not (or only rarely) think in terms of nonlinear functions. Rule base If X is A1 and Y is B1 then Z = p1*x + q1*y + r1 If X is A2 and Y is B2 then Z = p2*x + q2*y + r2nullType 1(Tsukamoto): The overall output is the weight average of each rule’s crisp output induced by the rule’s firing strength (the product or minimum of the degrees of match with the premise part) and output membership functions used in the scheme must be monotonic functions [Tsukamoto, 1979]. Type 2:(mandani) The overall fuzzy output is derived by applying “max” operation to the qualified fuzzy outputs (each of which is equal to the minimum of fire strength an the output membership function of each rule). Various schemes have been proposed to choose the final crisp output based on the overall fuzzy output; some of them are centroid of area, bisector of area, mean of maximum, maximum criterion, etc [Lee, 1990]. Type 3(Takagi and Sugeno): Takagi and Sugeno’s fuzzy if-then rules are used [Takagi, 1983]. The output of each rule is a linear combination of the input variables plus a constant term, and the final output is the weighted average of each rule’s output.null範例8.2:函數式模糊規則 (2)範例8.2:函數式模糊規則 (2)如果我們在線性式的模糊規則中,使用(1)高斯函數作為歸屬函數、(2)最大乘積合成於模糊推論、以及(3)加權式平均法來去模糊化,則 Takagi 及 Sugeno 的線性式模糊規則的輸出就是: 其中 J 代表模糊規則數,以及代表第 j 條模糊規則經過推論後所得到的結果,亦即 其中 p 代表輸入變數的維度,以及明確輸入 ,而權重 代表輸入變數 對第 j 條模糊規則的前鑑部的啟動強度, 可用下式求得: 範例8.2:函數式模糊規則 (3)範例8.2:函數式模糊規則 (3) 其中 代表 對模糊集合 的歸屬度,結合上兩式,我們可以導出一個多變數的非線性近似器 (nonlinear approximator)。事實上,若是要以一組線性式模糊規則作為通用近似器 (universal approximator),在線性式模糊規則的後鑑部中只需要一個常數項 即可,只要保留此常數項,所導出的系統輸出為 其中 經過比較,我們發現上式將會等效於 Radial Basis Function Network (RBFN),而 RBFN 已經證明為一通用之近似器。 基底函數null解模糊化: 中心平均值小结小结模糊逻辑与经典逻辑; 模糊逻辑运算; 模糊关系 语言变量; 模糊逻辑推理; 模糊逼近; TSK模型 if x is A1 and y is B1 then z is C1 ¼ if x is An and y is Bn then z is Cn x is A’ and y is B’ ------------------------------------ z is C’
本文档为【模糊关系,推理,逼近2】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_514465
暂无简介~
格式:ppt
大小:3MB
软件:PowerPoint
页数:0
分类:
上传时间:2010-09-17
浏览量:54