1 / 41

Chapter 7

Chapter 7. 人工智慧技術應用. Case-based Reasoning ( 案例式推論 ). 案例式推論解決問題的流程 : 確認問題的狀態 由過去案例中找尋相似的案例 由相似的案例獲取經驗以解決目前的問題 將目前的問題及解決的方法加入案例中. 案例式推論解題的關鍵因素. 案例特徵 ( 參數 ) 之訂定 案例特徵 ( 參數 ) 權重之訂定 案例特徵 ( 參數 ) 比對演算法之訂定. 案例知識庫. 案例式推論運作流程. 新案例. 重複案例. 案例建制. 結果. 需求. 案例擷取. 調整參數. 查詢模式. 適合的 案例. 案例調整.

cortez
Download Presentation

Chapter 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 人工智慧技術應用

  2. Case-based Reasoning(案例式推論) • 案例式推論解決問題的流程: • 確認問題的狀態 • 由過去案例中找尋相似的案例 • 由相似的案例獲取經驗以解決目前的問題 • 將目前的問題及解決的方法加入案例中 S.S. Tseng & G.J. Hwang

  3. 案例式推論解題的關鍵因素 • 案例特徵(參數)之訂定 • 案例特徵(參數)權重之訂定 • 案例特徵(參數)比對演算法之訂定 S.S. Tseng & G.J. Hwang

  4. 案例知識庫 案例式推論運作流程 新案例 重複案例 案例建制 結果 需求 案例擷取 調整參數 查詢模式 適合的 案例 案例調整 查詢 使用者 S.S. Tseng & G.J. Hwang

  5. 案例式推論實例:自動化郵件回覆客戶服務系統案例式推論實例:自動化郵件回覆客戶服務系統 • 以郵件進行客戶服務己成趨勢 • 現有的郵件客服有下列缺點 • 郵件回覆為人工進行 • 需要浪費人力回答重覆問題 • 無法保證即時回覆 • 目標: • 將傳統郵件回覆自動化 • 縮短客戶等待時間 • 提高客戶的滿意度 • 節省客服中心的人力應用 S.S. Tseng & G.J. Hwang

  6. 自動化郵件客服系統功能 • 自動辨識郵件目的及問題 • 搜尋最適合客戶的解決方案 • 即時產生回覆郵件 • 調查客戶滿意度 • 從雙方面調整資料庫 S.S. Tseng & G.J. Hwang

  7. 詞庫 問題分析機制 客服人員介面 Q&A儲存機制 Q&A 資料庫 Mail Server 客戶 資料庫 自動化郵件客服系統架構 網 際 網 路 使用者 解答機制 自我學習 機制 客服人員 S.S. Tseng & G.J. Hwang

  8. 客服系統權重演算法 • 權重調整: • 一名詞在所有集合中出現的頻率愈多,代表此詞為一冗詞 • 一名詞在所屬集合中出現的頻率愈多,其他集合中出現的頻率愈少,即有可能就是關鍵詞 S.S. Tseng & G.J. Hwang

  9. 客服系統權重演算法(cont.) Wij=(pij –nij)/N wij關鍵字i對在文章j的權重 N 取樣總篇數 pij關鍵字i在文章j出現的次數 nij 關鍵字i在文章j之外出現的次數 S.S. Tseng & G.J. Hwang

  10. 客服系統關鍵詞比對演算法 • FAQ關鍵詞比對: • 比對客戶詢問問題與資料庫中的資料相似程度 • 給予一個問題與資料庫中各筆資料介於0至1的分數,並找出分數最高的資料 S.S. Tseng & G.J. Hwang

  11. Neural Networks (類神經網路) • 1943McCulloch 與 Pitts首度提出正式的類神經計算單元。   • 1949Donald Hebb提出第一個學習法則---Hebbian learning rule。 • 1954Minsky 首度建造類神經電腦並測試。  • 1958Frank Rosenblatt 發明感知機 (Perceptron)﹐可調整連接值。 • 1960Bernard Widrow 與 Marcian Hoff 提出 Widrow-Hoff 學習法則  • 1965Nils Nilsson 綜合當代研究並提出學習機所受的限制。   • 1972Sun-Ichi Amari 提出有關臨界值的數學理論。 • 1982Kohonen 研究非監督模式網路﹐建立陣列式神經元。   • 1982Stephen Grossberg 與 Gail Carpenter研究調適性迴響網路。   • 1986James McClelland 與 David Rumelhart加入平行分散式計算技巧。 S.S. Tseng & G.J. Hwang

  12. 類神經網路的優缺點 • Advantages • prediction accuracy is generally high • robust, works when training examples contain errors • output may be discrete, real-valued, or a vector of several discrete or real-valued attributes • fast evaluation of the learned target function • Criticism • long training time • difficult to understand the learned function (weights) • not easy to incorporate domain knowledge S.S. Tseng & G.J. Hwang

  13. - mk x0 w0 x1 w1 f å output y xn wn Input vector x weight vector w weighted sum Activation function A Neuron • The n-dimensional input vector x is mapped into variable y by means of the scalar product and a nonlinear function mapping S.S. Tseng & G.J. Hwang

  14. Training a Neural Network • To obtain a set of weights that makes almost all the tuples in the training data classified correctly • Steps • Initialize weights with random values • Feed the input tuples into the network one by one • For each unit • Compute the net input to the unit as a linear combination of all the inputs to the unit • Compute the output value using the activation function • Compute the error • Update the weights and the bias S.S. Tseng & G.J. Hwang

  15. Back-Propagation Neural Network (倒傳遞類神經網路) S.S. Tseng & G.J. Hwang

  16. 範例-圖形辨識 A A 001011101 010010101 >0 >0 B <0 S.S. Tseng & G.J. Hwang

  17. 倒傳遞類神經網路演算法 Step 1: 以最小化能量函數的結果為目標,計算訓練資料輸入向量與目標輸出向量之間的平均平方差(Mean square error)。 Step 2: 以下列公式調整修正權重值: 其中 且  為學習率(Learning rate)。 Step 3: 以類似的方式調整修正門檻值。 Step 4: 重複Step 1到Step 3,計算所有的訓練資料輸入向量。 Step 5: 利用測試資料測試以上訓練的網路,假如收斂,則停止;否則跳到Step 1。 S.S. Tseng & G.J. Hwang

  18. Genetic Algorithm(基因演算法) • 源自於John Holland在1975 年出版的著作Adaptation in Nature and Artificial Systems • 仿效自然界生物進化過程 • 透過基因的選擇(selection)交換(crossover)及突變(mutation)產生更好的下一代 • 選擇(selection)過程 • 較高合適值(fitness value)就有較大機會獲得保留 • 較低合適值的解答,可能會遭到淘汰 • 較不易陷入local optimal S.S. Tseng & G.J. Hwang

  19. Genetic Algorithm(基因演算法) • Population (族體): • Encoding (編碼): • Crossover (交配): • Mutation (突變): • Selection (適者生存): • Fitness Function (適合度公式): S.S. Tseng & G.J. Hwang

  20. Crossover randomly selects one-cut-point and exchanges the right parts of two parents to generate offspring. 基因演算法交配運算 Mutation alters one or more genes with a probability equal to the mutation rate. 基因演算法突變運算 基因演算法流程圖 S.S. Tseng & G.J. Hwang

  21. 多目標最佳化配題機制 • 從大量試題中,選取符合出題方向和條件的試題,進行配置,組成最佳鑑別度試卷 • 指定測驗時間範圍的試題配置問題模型(Dedicated Range of Assessment Time Problem-DRAT) • 符合期望測驗時間最高界限和最低界限的多目標配題機制。 • 固定題數的試題配置問題模型(Fixed Number of Test Items Problem – FNTI) • 符合固定試卷試題數量的多目標配題機制。 S.S. Tseng & G.J. Hwang

  22. 指定測驗時間範圍的試題配置問題 (DRAT) • DRAT目標函式: Maximize Z = • DRAT限制式: Xi = 0 or 1, i = 1, 2, …, n S.S. Tseng & G.J. Hwang

  23. DRAT的試題配置基因演算法 (1/5) • 概念程度下限先決基因演算法(Concept Lower-bound First Genetic approach – CLFG) • CLFG的進行步驟 1.建立母體(Encoding) • X 為染色體,包含有 n 個基因 • X = [x1 , x2 , …, xn]X = [0, 0, 1, …, 0] • 第i個試題被選取時,xi為1;否則,為0; S.S. Tseng & G.J. Hwang

  24. DRAT的試題配置基因演算法 (2/5) 2.適配等級(Fitness ranking) • R = dc ipt • dc = •  = w dtl ipt_l • w = ( indi xi) / average(u, l) • dtl = • 適配函數 v(Sk) = • = w dtu ipt_u • dtu = S.S. Tseng & G.J. Hwang

  25. DRAT的試題配置基因演算法 (3/5) 3.物競天擇(Selection) • 計算各染色體的適配值v(Sk),k = 1,2, … , pop_size + offspring_size • 加總所有染色體Sk的適配值和選取機率 Pk = v(Sk) / V • 計算各染色體Sk的累積選取機率 S.S. Tseng & G.J. Hwang

  26. DRAT的試題配置基因演算法 (4/5) Cut point 4.交配(Crossover) A[1110011001] A’[1110011011] B[0100100011] B’[0100100001] Procedure: crossover Begin k = 0 while (k ≤ c / 2) do flag = 0 while flag = 0 do Generate random numbers R1 and R2 from discrete interval [1,K]. If R1 ≠ R2 then flag=1 end while crossover function(R1,R2) end while End S.S. Tseng & G.J. Hwang

  27. DRAT的試題配置基因演算法 (5/5) 5.突變(Mutation) A[1110011001] A’[1110011011] P = ( 1 / n ) Procedure: mutation Begin for(i=1, i ≤ nk, i++){ Generate random number yi from discrete interval [0, 1]. Mutation function(P, yi) } End 重覆2~5步驟,直到連續10代解無進步或已產生了1500代 S.S. Tseng & G.J. Hwang

  28. 固定題數的試題配置問題 (FNTI) • FNTI目標函式: Maximize Z = • FNTI限制式: x1 ≥ 1 xi+1 > xi , 1 ≤ i ≤ q_num – 1 xq_num≤ n S.S. Tseng & G.J. Hwang

  29. FNTI的試題配置基因演算法(1/5) • 試題數目先決基因演算法(Feasible Item First Genetic approach – FIFG) • FIFG的進行步驟 1.建立母體 • X 為染色體,包含有 q_num 個基因 • X = [x1 , x2 , …, xq_num] X = [25, 118, …., 803] • 基因值代表著一題試題的編號 • xi ≠ xj,且 i ≠ j和 1 ≤ i, j ≤ q_num S.S. Tseng & G.J. Hwang

  30. FNTI的試題配置基因演算法(2/5) 2.適配等級(Fitness ranking) • R = dc ipt • dc = • 適配函數 v(Sk) = S.S. Tseng & G.J. Hwang

  31. FNTI的試題配置基因演算法(3/5) 3.物競天擇(Selection) • 計算各染色體的適配值v(Sk),k = 1,2, … , pop_size + offspring_size • 加總所有染色體Sk的適配值和選取機率 Pk = v(Sk) / V • 計算各染色體Sk的累積選取機率 S.S. Tseng & G.J. Hwang

  32. FNTI的試題配置基因演算法(4/5) Cut point 4.交配(Crossover) A[12,15, 96,112,193,243]A’[12,15,96,185,256,356] B[3,56,108,185,256,356]B’[3,56,108,112,193,243] • 有兩相同基因值時,隨機更換其中一值,直到沒有相同基因值為止 • 試卷中不可有二題相同的試題 S.S. Tseng & G.J. Hwang

  33. FNTI的試題配置基因演算法(5/5) 5.突變(Mutation) A[3,8,56,66,256,515] A’[3,8,56,66,346,515] P = ( 1 / n ) Procedure: mutation Begin for (m = 1, m ≤ q_numk, m++){ Generate random number rm from discrete interval [0, 1] Generate random number RC from discrete interval [1, n] mutation function(P, rm, RC) } End 重覆2~5步驟,直到連續10代解無進步或已產生了1500代 S.S. Tseng & G.J. Hwang

  34. 試題參數調整演算法 • 鑑別度 • 難度 S.S. Tseng & G.J. Hwang

  35. 實驗題庫樣本資料 • 每一個情況進行二十次實驗處理後,採用平均求解時間和平均鑑別度建立 實驗樣本 S.S. Tseng & G.J. Hwang

  36. CLFG實驗結果及分析 (1/3) l = 30 S.S. Tseng & G.J. Hwang

  37. CLFG實驗結果及分析 (2/3) l = 60 S.S. Tseng & G.J. Hwang

  38. CLFG實驗結果及分析 (3/3) l = 120 S.S. Tseng & G.J. Hwang

  39. CLFG與最佳解的實驗數據圖表 (1/2) l = 30 S.S. Tseng & G.J. Hwang

  40. CLFG與最佳解的實驗數據圖表 (2/2) l = 60 S.S. Tseng & G.J. Hwang

  41. CLFG在不同測驗時間下限的試題配置 S.S. Tseng & G.J. Hwang

More Related