[english][all] (½Ðª`·N¡G¤¤¤åª©¥»¨Ã¥¼ÀH^¤åª©¥»¦P¨B§ó·s¡I)
¥»¸`»¡©ú¦b¤ÀÃþ¾¹ªº³]p¹Lµ{¤¤¡A¦p¦ó¹w¦ô¨ä¿ëÃѲv©Î¿ù»~²v¡C
¡u¤º³¡´ú¸Õ¿ù»~²v¡v¡]inside test error¡^¤SºÙ¬°¡u«·s±a¤J¿ù»~²v¡v¡]resubstitution error¡^©Î¡uªí±¿ù»~²v¡v¡]apparent error rate¡^¡A«üªº¬O¨Ï¥Î¥þ³¡ªº¸ê®Æ¶i¦æ°V½m¥H³]p¤ÀÃþ¾¹¡A¤§«á¦A¥H¦P¤@²Õ¸ê®Æ¶i¦æ´ú¸Õ¡C¦¹¤è¦¡ÁöµM¥R¤À¹B¥Î¨C¤@µ§¸ê®Æ¨Ó¶i¦æ¤ÀÃþ¾¹³]p¡A¦ý¦]¬°´ú¸Õ¸ê®Æ©M°V½m¸ê®Æ¬O¦P¤@¥÷¡A©Ò±o¨ìªº¿ëÃѲv·|°¾°ª¡]¿ù»~²v°¾§C¡^¡A³oºØ¡u²yûݵô§P¡v¤§ªº¿ù»~²v¡A¨Ã¤£¨ã«ÈÆ[©Ê¡C
Á|¨Ò¨Ó»¡¡A¦pªG§Ų́ϥΠ1-NNR ¬°¤ÀÃþ¾¹¡A¦A¨Ï¥Î¤º³¡¿ù»~²v¦ô´úªk¡A©Ò±o¨ìªº¿ëÃѲv´N¬O 100%¡]¿ù»~²v¬° 0%¡^¡A«Ü©úÅã¦a¡A³o¬O¹L©ó¼ÖÆ[ªºµ²ªG¡A¦]¦¹¤º³¡¿ù»~²v¦ô´úªkªºµ²ªG¥u¯à©h¥BÅ¥¤§¡A°Ñ¦Ò©Ê¤ñ¸û§C¡A§ÚÌ¥u¯à±N¤§µø¬°¹ê»Ú¿ù»~²vªº¤UÈ¡]©Î¬O¹ê»Ú¿ëÃѲvªº¤WÈ¡^¡C¤@¯ë¦Ó¨¥¡A§Ų́ϥΤº³¡¿ù»~²v¨Ó¶i¦æªì¨BÀË´ú¡A¦pªG¤@Ó¤ÀÃþ¾¹ªº¤º³¡¿ù»~²v¤w¸g«Ü°ª¡A¥Nªí¦³¤U¦C¨âºØ¥i¯à¡G
- ¤ÀÃþ¾¹³]p¤èªk¦³¿ù»~¡C
- ³]p¸ê®Æ¦³¿ù»~¡A¯S¼x¦V¶q¨Ã¨S¦³¤ÀÃþªºÅ²§O¯à¤O¡C
·íµM¡A³o¥u¬O¤@Ó°ò¥»ªºÀË´ú¡A¤º³¡¿ù»~²v¹L°ª¡Aªí¥Ü¥i¯à¦³¤Wz¨âºØ¿ù»~¡A¦ý¬O¤º³¡¿ù»~²vY«Ü§C¡A¨Ã«D¥Nªí¤ÀÃþ¾¹©Î¸ê®Æ¥¿½T¡A¦¹®ÉÁÙ¥²¶·¾a¡u¥~³¡´ú¸Õ¿ù»~²v¡v¡]outside test error¡^¨Ó¶i¦æ¶i¤@¨BªºÀË©w¡A¦p¤U©Òz¡C
¬°¤FÁקK¡u²yûݵô§P¡v¤§¶û¡A³Ì²³æªº¤è¦¡«K¬O¦b¶i¦æ¿ù»~²v¹w¦ô¤§®É¡A±N¸ê®Æ¤Á¦¨³]p¸ê®Æ design set¡^©M´ú¸Õ¸ê®Æ test set¡A§ÚÌ¥i¥H¨Ï¥Î DS ¨Ó¶i¦æ¤ÀÃþ¾¹ªº³]p¡AµM«á¨Ï¥Î TS ¨Ó¶i¦æ¿ëÃѲvªº´ú¸Õ¡A¦¹ºØ¿ëÃѲvºÙ¬°¡u¥~³¡´ú¸Õ¿ù»~²v¡v¡]outside test error¡^©Î¡u¾B½ª¦¡¿ù»~²v¡v¡]holdout error¡^¡C¦¹ºØ¤èªkªº¯S©Ê¦p¤U¡G
- ¥Ñ©ó³]p¸ê®Æ©M´ú¸Õ¸ê®Æ§¹¥þ¤£¬Û¦P¡A¦]¦¹©Ò±o¨ìªº¿ëÃѲv¸û¬°«ÈÆ[¡C
- ¦b²{¹êªº¨Ò¤l¤¤¡A¸ê®Æ¶q¬O¦³ªº¡A¥~³¡´ú¸Õ¿ù»~²v«o¥²¶·¤Á¥X¤@³¡¤Àªº¸ê®Æ¶i¦æ¿ù»~´ú¸Õ¡A¦]¦Ó±N¾ÉP³]p¥Xªº¤ÀÃþ¾¹¿ù»~²v¸û°ª¡C
- ¤@¯ë¦Ó¨¥¡A°V½m¸ê®Æªº¸ê®Æ¶q¶V¤j¡A¤ÀÃþ¾¹ªººë½T«×¶V°ª¡C¦]¦¹§ÚÌ¥i¥Î¥~³¡¿ù»~²v¨Ó¦ô´ú¤ÀÃþ¾¹³]pªº°Ñ¼Æ¡AµM«á¨Ï¥Î¬Û¦Pªº°Ñ¼Æ¥H¤Î¥þ³¡ªº¼Ë¥»¸ê®Æ¡A¨Ó³]p¤@Ó§¹¾ãªº¤ÀÃþ¾¹¡C
§ÚÌ¥i¥H±N¥~³¡´ú¸Õ¿ù»~²v°µ¶i¤@¨Bªº©µ¦ù¡A¥ý±N©Ò¦³¸ê®Æµ¥¤Á¦¨¨â¥÷ A »P B¡A¦b²Ä¤@¦¸¹w¦ô®É¥H A ¬°°V½m¸ê®Æ¡BB ¬°´ú¸Õ¸ê®Æ¡A¦ý¦b²Ä¤G¦¸¹w¦ô®É¡A§ï¥H¥H B ¬°°V½m¸ê®Æ¡BA ¬°´ú¸Õ¸ê®Æ¡F³Ì«á¦A¨D³o¨â¦¸¹w¦ôªº¥§¡¿ù»~²v¡AºÙ¬°¡uÂù¦V¦¡¥~³¡¿ù»~²v¡v¡]two-way outside test error¡^©Î two-fold cross validation¡C ¨Ï¥Î«ezªº two-fold cross validation ®É¡A¥Ñ©ó¨Ï¥Îªº³]p¸ê®Æ¶q¤j¬ù¥u¦³¼Ë¥»¸ê®Æªº¤@¥b¡A¦]¦¹±o¨ìªº¿ëÃѲv·|°¾§C¡C¬°¤F§ó¦³®Ä¦a¹w¦ô¿ëÃѲv¡A§ÚÌ¥i¥H±N¸ê®Æ¤Á¦¨ m Ó¤l¶°¦X S1, S2, ..., Sm¡A¨CÓ¶°¦X©Ò¥]§tªº¸ê®ÆӼƤj¬ù¬Ûµ¥¡A¨Ãº¡¨¬¤U¦C±ø¥ó¡G
- S = S1¡åS2¡å...¡åSm
- |S1| = |S2| = ... = |Sm|
- Si¡äSj = £p (empty set) whenever i¡Új.
- The class distribution of each Sj, i=1 to m, should be as close as possible to that of the original dataset S.
µM«á¥H¤U¦C¤è¦¡¨Ó¦ô´ú¿ëÃѲv¡G
¤Wzªº¤èªkºÙ¬° m-fold cross validation¡A©Ò±o¨ìªº¿ù»~²vºÙ¬°½ü°j¿ù»~²v¡C
- ¥H Si ¬°´ú¸Õ¸ê®Æ¡A¥H³Ñ¾lªº¸ê®Æ S-Si ³]p¤ÀÃþ¾¹¡A¦A¥H Si ¹ï³oÓ¤ÀÃþ¾¹¶i¦æ´ú¸Õ¡A±o¨ì¥~³¡´ú¸Õ¿ëÃѲv¡C
- «½Æ¤Wzªº¨BÆJ¡Aª½¨ì±o¨ì¨CÓ¤l¶°¦X Si ªº¿ëÃѵ²ªG¡A¨Ãpºâ¾ãÅé¿ëÃѲv¡C
Since this type of performance evaluation using cross-validation is used often, we have created a function to serve this purpose, as shown in the next example where 10-fold cross-validation is applied to IRIS dataset:
·í m ¶V¨Ó¶V¤j®É¡A©Ò»Ýnªºpºâ¶q¤]·|¶V¨Ó¶V¤j¡A¦]¦¹§ÚÌ¥i¥Hµø¹ê»Ú±¡ªp¡]¼Ë¥»¸ê®Æ¶q¤j¤p¡B¤ÀÃþ¾¹³]pªºpºâ®É¶¡¡^¨Ó¨M©w m ªºÈ¡A»¡©ú¦p¤U¡G
- m ªº³Ì¤pȬO 2¡A¦¹®É½ü°j¿ù»~²v§Yµ¥©ó«e¤@¸`©Ò¤¶²ÐªºÂù¦V¥~³¡¿ù»~²v¡C
- m ªº³Ì¤jȵ¥©ó¼Ë¥»¸ê®ÆªºÓ¼Æ¡A¦¹®É½ü°j¿ù»~²v´NÅܦ¨¤U±©Òn¤¶²Ðªº¡u¤@¦¸¬D¤@Ó¿ù»~²v¡v¡C
¡u"¤@¦¸¬D¤@Ó"¿ù»~²v¡v¡]leave-one-out error rate¡^¬O¼Ë¦¡¿ë»{¤¤³Ì±`³Q¥Î¨ìªº¿ù»~²v¹w¦ô¤èªk¡A¦]¬°¨CÓ´ú¸Õ¸ê®Æ³£¨S¦³°Ñ»P¤ÀÃþ¾¹ªº³]p¡A¦]¦¹¤]¬O¤@ºØ¸û¬°¤½¥¡B«ÈÆ[ªº¿ù»~²v¹w¦ô¤è¦¡¡C¾ãÓ¿ù»~²v¹w¦ôºtºâ¹Lµ{¤SºÙÅI¤M¦¡¬yµ{¡]jackknife procedure¡^¡A¨ä¥Dn¨BÆJ¦p¤U©Òz¡G
- ¥ý±q¸ê®Æ¶°¤¤¨ú¥X¤@µ§¸ê®Æ xi¡A¥H³Ñ¾lªº¸ê®Æ³]p¤ÀÃþ¾¹¡A¦A¥H xi ¹ï³oÓ¤ÀÃþ¾¹¶i¦æ´ú¸Õ¡C
- «½Æ¤Wzªº¨BÆJ¡Aª½¨ì±o¨ì¨C¤@µ§¸ê®Æªº¿ëÃѵ²ªG¡A¨Ãpºâ¾ãÅé LOO ¿ù»~²v©Î LOO ¿ëÃѲv¡C
¥Ñ¤Wz¤èªk¥i¥H¬Ý¥X¡ALOO ¿ëÃѲvªº¯S©Ê¦p¤U¡G
- ¥Ñ©ó¨C¤@µ§¸ê®Æ³£³Q¥Î©ó·í¦¨¤@¦¸´ú¸Õ¸ê®Æ¡A¦]¦¹¹ï©ó¾ãÅé¸ê®Æªº¨Ï¥Î²v¥i»¡¬O¹F¨ì³Ì·¥P¡C
- Y¦³ n µ§¸ê®Æ¡A«h¦b¦¹¹Lµ{¤¤¡A¥²¶·³]p n Ó¤ÀÃþ¾¹¡A¦pªG n «Ü¤j©Î¬O¤ÀÃþ¾¹ªº³]p»Ýn¤j¶qpºâ¡]¨Ò¦p GMM ©Î¬OÃþ¯«¸gºô¸ôµ¥¡^¡A¦¹ºØ¿ù»~²v¦ô´ú¤è¦¡´N·|¯Ó¶O¤j¶qpºâ®É¶¡¡AÃm¤é¼o®É¡C
¤]¥Ñ©ópºâ¶q¤Ó¤j¡A¦]¦¹§Ú̳q±`¥u¨Ï¥Î²³æªº¤ÀÃþ¾¹¡A¨Ò¦p KNNC¡A¨Ó¦ô´ú LOO ¿ù»~²v¡A¨Ã¶i¦Ó±ÀÂ_¼Ë¥»¸ê®Æªº¯S¼x¬O§_¯à°÷¨¬°÷ªºÅ²§O¯à¤O¡C¦b¤U±³oÓ½d¨Ò¤¤¡A§Ų́ϥΤ@²Õ¶Ã¼Æ¨Ó²£¤@²Õ¥]§t¥|ÓÃþ§Oªº¼Ë¥»¸ê®Æ¡AµM«á§Q¥Î knncLoo «ü¥O¨Ópºâ 1-NNR ©Ò²£¥Íªº LOO¡A¨Ã±N¿ëÃÑ¿ù»~ªº¸ê®ÆÂI¥´¤W¡ux¡v¸¹¡A¥H«KÀˬd¡A¦p¤U¡G
ŪªÌ¥i¥H§ïÅܤWzªº k È¡A´N¥i¥H±o¨ì KNNC ¦b¤£¦Pªº k Ȫº¿ëÃѵ²ªG¡C
Data Clustering and Pattern Recognition (¸ê®Æ¤À¸s»P¼Ë¦¡¿ë»{)