




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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)的標準差是什么?將此結果與第5.3.4節末尾的例子中標準差相比會得出什么結論? 由題意知errors(h)=r/n=300/1000=0.3,由于r是二項分布,它的方差為np(1-p),然而p未知,用r/p代替p得出r的估計方差為1000*0.3*(1
15、-0.3)=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. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 睡眠質量提升與養生保健技巧考核試卷
- 燈具國際貿易風險與應對策略考核試卷
- 鋅錳電池的電極材料在長期儲存中的性能保持考核試卷
- 銀發族養生保健特殊關注考核試卷
- 貓狗常見疾病防治指南
- 冬季小學生疾病預防指南
- 食源性疾病主動監測體系構建與應用
- Orchinol-生命科學試劑-MCE
- 超神數學-高考數學總復習拔高篇(二輪)專題19平面向量中的取值范圍問題(含答案或解析)
- 2025年流媒體平臺競爭格局下的內容創新實踐與案例分析
- 2025年道教人員考試試題及答案
- 獸藥GMP培訓課件
- 2022-2023學年浙江省溫州市永嘉縣人教PEP版四年級下冊期末測試英語試卷
- 《現代色譜分析HPL》課件
- 2024年設備監理師考試題庫及答案(歷年真題)
- 三病母嬰傳播及阻斷
- 初中常見副詞英語單選題100道及答案解析
- 安徽農業大學《中級財務會計》2022-2023學年第一學期期末試卷
- HXD1C型機車轉向架培訓教材(20091008)資料
- 工業自動化設備維護保養操作手冊
- 針灸師招聘面試題與參考回答2025年
評論
0/150
提交評論