




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、1.1 機器學習:人臉識別、手寫識別、信用卡審批。 不是機器學習:計算工資,執行查詢的數據庫,使用WORD。2.1 Since all occurrence of “” for an attribute of the hypothesis results in a hypothesis which does not accept any instance, all these hypotheses are equal to that one where attribute is “”. So the number of hypothesis is 4*3*3*3*3*3 +1 = 973.Wi
2、th the addition attribute Watercurrent, the number of instances = 3*2*2*2*2*2*3 = 288, the number of hypothesis = 4*3*3*3*3*3*4 +1 = 3889.Generally, the number of hypothesis = 4*3*3*3*3*3*(k+1)+1.2.3 Ans.S0= (,) v (,)G0 = (?, ?, ?, ?, ?, ?) v (?, ?, ?, ?, ?, ?)Example 1: <Sunny, Warm, Normal, Str
3、ong, Warm, Same, Yes>S1=(Sunny, Warm, Normal, Strong, Warm, Same) v (,)G1 = (?, ?, ?, ?, ?, ?) v (?, ?, ?, ?, ?, ?)Example 2: <Sunny, Warm, High, Strong, Warm, Same, Yes>S2= (Sunny, Warm, Normal, Strong, Warm, Same) v (Sunny, Warm, High, Strong, Warm, Same),(Sunny, Warm, ?, Strong, Warm, Sa
4、me) v (,)G2 = (?, ?, ?, ?, ?, ?) v (?, ?, ?, ?, ?, ?)Example 3: <Rainy, Cold, High, Strong, Warm, Change, No>S3=(Sunny, Warm, Normal, Strong, Warm, Same) v (Sunny, Warm, High, Strong, Warm, Same),(Sunny, Warm, ?, Strong, Warm, Same) v (,)G3 = (Sunny, ?, ?, ?, ?, ?) v (?, Warm, ?, ?, ?, ?),(Sun
5、ny, ?, ?, ?, ?, ?) v (?, ?, ?, ?, ?, Same),(?, Warm, ?, ?, ?, ?) v (?, ?, ?, ?, ?, Same)Example 4: <Sunny, Warm, High, Strong, Cool, Change, Yes>S4= (Sunny, Warm, ?, Strong, ?, ?) v (Sunny, Warm, High, Strong, Warm, Same),(Sunny, Warm, Normal, Strong, Warm, Same) v (Sunny, Warm, High, Strong,
6、?, ?),(Sunny, Warm, ?, Strong, ?, ?) v (,),(Sunny, Warm, ?, Strong, Warm, Same) v (Sunny, Warm, High, Strong, Cool, Change)G4 =(Sunny, ?, ?, ?, ?, ?) v (?, Warm, ?, ?, ?, ?),(Sunny, ?, ?, ?, ?, ?) v (?, ?, ?, ?, ?, Same),(?, Warm, ?, ?, ?, ?) v (?, ?, ?, ?, ?, Same)2.4 Ans. (a) S= (4,6,3,5) (b) G=(3
7、,8,2,7) (c) e.g., (7,6), (5,4) (d) 4 points: (3,2,+), (5,9,+),(2,1,-),(6,10,-)2.6 Proof: Every member of VSH,D satisfies the right-hand side of expression.Let h be an arbitrary member of VSH,D, then h is consistent with all training examples in D.Assuming h does not satisfy the right-hand side of th
8、e expression, it means ¬(sS)(gG)(g h s) = ¬(sS)(gG) (g h) (h s). Hence, there does not exist g from G so that g is more general or equal to h or there does not exist s from S so that h is more general or equal to s. If the former holds, it leads to an inconsistence according to the definit
9、ion of G. If the later holds, itleads to an inconsistence according to the definition of S. Therefore, h satisfies the right-hand side ofthe expression. (Notes: since we assume the expression is not fulfilled, this can be only be if Sor G is empty, which can only be in the case of any inc
10、onsistent training examples, such as noiseor the concept target is not member of H.)貝葉斯:6.1 由題意可得,兩次對病人做化驗測試都為正時,cancer和Øcancer的后驗概率分別可表示為:P(canner|+,+),P(Øcancer|+,+)。最后一個等號是因為假定兩個測試是相互獨立的,即:P(+,+|cancer)=P(+|cancer)P(+|cancer)同理可得:P(+|cancer) P(+|cancer) P(cancer)=0.98*0.98*0.008=0.00768
11、32P(+|Øcancer) P(+|Øcancer) P(Øcancer)=0.03*0.03*0.992=0.0008928P(+,+) = P(+,+|cancer) P(cancer) + P(+,+|Øcancer)P(Øcancer)=0.0076832+0.0008928=0.008576所以:P(canner|+,+)0.0076832/0.008576=0.895896P(Øcancer|+,+)=0.1041046.2 由貝葉斯公式可知:因為事件cancer與Øcancer互斥,且P(cancer)+P(
12、Øcancer)=1,有全概率公式可得: P(+) = P(+|cancer) P(cancer) + P(+|Øcancer)P(Øcancer)故所以中的歸一化方法正確。6.3 (a) P(h): 如果假設h1比h2更一般時,賦予P(h1)>=P(h2) (b) P(h): 如果假設h1比h2更一般時,賦予P(h1)<=P(h2) P(D|h)的分布同上(c) P(h) : 對任意假設hi和hj,P(hi)=P(hj)= P(D|h)的分布同上6.4 當h()=時=1, 否則 =0 故 P(D) (a)用k表示合取式中布爾屬性的個數,用l 表示樣例
13、中與假設不一致 的樣例個數,則要被最小化的量的表達式為: + (b) 訓練樣例集D有8個屬性A1,A1,A8,共8個屬性,需要3位來表示,目標值為d,共有4個訓練樣例,需要2位來表示。A1A2A3A4A5A6A7A8dX1011100000X2101100000X3110100000X4111100001在這組訓練數據中,最短的一個一致假設為A1A2A3,則由上式可得,他的描述長度為9位;存在一個不一致假設A1,需3位表示,只有一個屬性,有2個不一致,需4位,則此時的描述長度為7位,小于一致假設是的9位,此時MDL選擇一個不一致的假設。 (c) P(h): 如果假設hi中的布爾屬性合取式中的屬
14、性個數小于hj的個數,則P(hi)>P(hj) P(D|h)= 6.5 在樸素貝葉斯分類中,在給定目標值V時,屬性之間相互獨立,其貝葉斯網如下所示,箭頭方向為從上到下。因為屬性wind與其它屬性獨立,沒有與其相關聯的屬性。機器學習1在測試一假設h時,發現在一包含n=1000個隨機抽取樣例的樣本s上,它出現r=300個錯誤。Errors(h)的標準差是什么?將此結果與第節末尾的例子中標準差相比會得出什么結論? 由題意知errors(h)=r/n=300/1000=0.3,由于r是二項分布,它的方差為np(1-p),然而p未知,用r/p代替p得出r的估計方差為1000*0.3*(1-0.3)
15、=210,相應的標準差為sqrt(210)=14.5,這表示errors(h)=r/n中的標準差為14.5/1000=0.0145,由此得出以下結論:一般來說,若在n個隨機選取的樣本中有r個錯誤,errors(h)的標準差為sqrt(p(1-p)/n),它約等于用r/n= errors(h)來代替p. 2、如果沒有更多的信息對真實錯誤率的評估也就是樣本錯誤率, 則真實錯誤率的標準差為:17/100=0.17 由95%的置信區間公式: 帶入數字得95%的置信區間為:0.17 +(1.96 X 0.04).3.如果假設h在n=65的獨立抽取樣本上出現r=10個錯誤,真實的錯誤率的90%的置信區間(
16、雙側的)是多少?95%單側置信區間(即一個上界U,使得有95%置信區間errorD(h)U)是多少?90%單側區間是多少?解:樣本數為:n = 65,假設h在n個樣本上所犯的錯誤為r = 10,所以樣本錯誤率為errorS(h) = = = 。于是:errorD(h)的N%的置信區間為: 當N = 90時,查表5-1得:zN = 1.64,可得真實錯誤率的90%的置信區間為: = 0.16±0.07395%的單側置信區間為errorD(h)U,其中90%的單側置信區間為:errorD(h) U,其中(zN為置信度為80%的置信度時的值1.28)。4.要測試一假設h,其errorD(h)已知在0.2到0.6的范圍內,要保證95%雙側置信區間的寬度小于0.1,最小應搜集的樣例數是多少?解:若使95%雙側置信區間的寬度小于0.1,則: (其中zN = 1.96),上式中因此最少應搜集的樣例數為3015.5 對隨即變量 ,為待估參數,服從N(0,1) 分布,均值為d,方差為其中:erorD(h1)-errorD(h2)單側置信區間下限:d-zNs,+)同理可求單側置信區間上限:(-,d+ zN
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 中國醫科大學《化工儀表自動化》2023-2024學年第二學期期末試卷
- 湖北師范大學《機械零件測繪與計算機繪圖綜合實訓》2023-2024學年第二學期期末試卷
- 長春師范高等專科學校《藏醫藥史》2023-2024學年第二學期期末試卷
- 蘭州現代職業學院《軟件工程經濟學》2023-2024學年第二學期期末試卷
- 云南水利水電職業學院《材料導論》2023-2024學年第二學期期末試卷
- 蘭州資源環境職業技術大學《環境人體工程學》2023-2024學年第二學期期末試卷
- 湖南冶金職業技術學院《地下建筑結構》2023-2024學年第二學期期末試卷
- 臨時演出合同范例
- 公寓售賣南寧合同范例
- 2025二手汽車買賣合同2
- 杭州市高層次人才分類認定申請表-
- 高考語文答題思維導圖
- 天然氣管道工程段線路安裝工程魚塘(水塘)穿越施工方案
- 教練技術三階段講義
- 證券公司營業部網絡結構拓撲圖
- 2001船舶修理價格本中文
- 某污水處理廠自控系統調試方案(常用)
- 藍色背景-PPT模板
- 設備檢維修作業票填寫模板
- 危大工程動態管控表
- 商場重大危險源評估標準
評論
0/150
提交評論