แผนผังการตัดสินใจ: ตรวจสอบความเข้าใจ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หน้านี้จะให้คุณตอบชุดแบบฝึกหัดแบบหลายตัวเลือกเกี่ยวกับเนื้อหาที่กล่าวถึงในหน่วย "การฝึก Decision Tree"
คำถามที่ 1
การแทนที่ฟีเจอร์ตัวเลขด้วยค่าลบ (เช่น เปลี่ยนค่า +8 เป็น -8) ด้วยตัวแบ่งตัวเลขที่แน่นอนจะส่งผลต่อผลลัพธ์อย่างไร
ระบบจะเรียนรู้เงื่อนไขเดียวกัน แต่จะสลับเฉพาะเงื่อนไขย่อยเชิงบวก/เชิงลบเท่านั้น
เยี่ยมมาก
ระบบจะเรียนรู้เงื่อนไขต่างๆ แต่โครงสร้างโดยรวมของแผนภูมิการตัดสินใจจะยังคงเหมือนเดิม
หากฟีเจอร์มีการเปลี่ยนแปลง เงื่อนไขก็จะเปลี่ยนแปลงด้วย
โครงสร้างของแผนผังการตัดสินใจจะแตกต่างออกไปโดยสิ้นเชิง
โครงสร้างของแผนผังการตัดสินใจจะเหมือนกันเกือบทั้งหมด แต่เงื่อนไขจะเปลี่ยนแปลง
คำถามที่ 2
คำตอบ 2 ข้อใดอธิบายผลของการทดสอบค่าเกณฑ์ผู้สมัครใน X เพียงครึ่งเดียว (สุ่มเลือก) ได้ดีที่สุด
ข้อมูลที่ได้รับจะสูงกว่าหรือเท่ากับ
ข้อมูลที่ได้รับจะต่ำกว่าหรือเท่ากับ
ทำได้ดีมาก
แผนผังการตัดสินใจสุดท้ายจะมีความแม่นยำในการทดสอบแย่ลง
แผนผังการตัดสินใจสุดท้ายจะไม่มีความแม่นยำในการฝึกอบรมที่ดีกว่าเดิม
ทำได้ดีมาก
คำถามที่ 3
จะเกิดอะไรขึ้นหากเส้นโค้ง "การได้ข้อมูล" เทียบกับ "เกณฑ์" มีจุดสูงสุดในพื้นที่หลายจุด
เป็นไปไม่ได้ที่จะมีจุดสูงสุดในพื้นที่หลายจุด
อาจมีจุดสูงสุดในพื้นที่หลายจุด
อัลกอริทึมจะเลือกจุดสูงสุดในพื้นที่ที่มีค่าเกณฑ์ต่ำที่สุด
อัลกอริทึมจะเลือกค่าสูงสุดทั่วโลก
ทำได้ดีมาก
คำถามที่ 4
คํานวณการได้ข้อมูลจากการแยกกลุ่มต่อไปนี้
โหนด | จํานวนตัวอย่างเชิงบวก | จํานวนตัวอย่างเชิงลบ
|
โหนดหลัก | 10 | 6 |
บุตรคนแรก | 8 | 2 |
บุตรคนที่ 2 | 2 | 4 |
คลิกไอคอนเพื่อดูคำตอบ
# Positive label distribution
p_parent = 10 / (10+6) # = 0.625
p_child_1 = 8 / (8+2) # = 0.8
p_child_2 = 2 / (2+4) # = 0.3333333
# Entropy
h_parent = -p_parent * log(p_parent) - (1-p_parent) * log(1-p_parent) # = 0.6615632
h_child_1 = ... # = 0.5004024
h_child_2 = ... # = 0.6365142
# Ratio of example in the child 1
s = (8+2)/(10+6)
f_final = s * h_child_1 + (1-s) * h_child_2 # = 0.5514443
information_gain = h_parent - f_final # = 0.1101189
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-02-25 UTC
[null,null,["อัปเดตล่าสุด 2025-02-25 UTC"],[[["\u003cp\u003eThis webpage presents a series of multiple-choice exercises focused on evaluating your understanding of decision tree training concepts.\u003c/p\u003e\n"],["\u003cp\u003eThe exercises cover topics such as the impact of feature manipulation on decision tree structure, the effects of altering threshold selection strategies, and the implications of multiple local maxima in information gain curves.\u003c/p\u003e\n"],["\u003cp\u003eOne question requires calculating information gain using entropy and provided data, demonstrating the practical application of decision tree principles.\u003c/p\u003e\n"]]],[],null,["# Decision trees: Check your understanding\n\n\u003cbr /\u003e\n\nThis page challenges you to answer a series of multiple choice exercises\nabout the material discussed in the \"Training Decision Trees\" unit.\n\nQuestion 1\n----------\n\nWhat are the effects of replacing the numerical features with their negative values (for example, changing the value +8 to -8) with the exact numerical splitter? \nThe same conditions will be learned; only the positive/negative children will be switched. \nFantastic. \nDifferent conditions will be learned, but the overall structure of the decision tree will remain the same. \nIf the features change, then the conditions will change. \nThe structure of the decision tree will be completely different. \nThe structure of the decision tree will actually be pretty much the same. The conditions will change, though.\n\nQuestion 2\n----------\n\nWhat two answers best describe the effect of testing only half (randomly selected) of the candidate threshold values in X? \nThe information gain would be higher or equal. \nThe information gain would be lower or equal. \nWell done. \nThe final decision tree would have worse testing accuracy. \nThe final decision tree would have no better training accuracy. \nWell done.\n\nQuestion 3\n----------\n\nWhat would happen if the \"information gain\" versus \"threshold\" curve had multiple local maxima? \nIt is impossible to have multiple local maxima. \nMultiple local maxima are possible. \nThe algorithm would select the local maxima with the smallest threshold value. \nThe algorithm would select the global maximum. \nWell done.\n\nQuestion 4\n----------\n\nCompute the information gain of the following split:\n\n| Node | # of positive examples | # of negative examples |\n|--------------|------------------------|------------------------|\n| parent node | 10 | 6 |\n| first child | 8 | 2 |\n| second child | 2 | 4 |\n\n#### Click the icon to see the answer.\n\n```scdoc\n# Positive label distribution\np_parent = 10 / (10+6) # = 0.625\np_child_1 = 8 / (8+2) # = 0.8\np_child_2 = 2 / (2+4) # = 0.3333333\n\n# Entropy\nh_parent = -p_parent * log(p_parent) - (1-p_parent) * log(1-p_parent) # = 0.6615632\nh_child_1 = ... # = 0.5004024\nh_child_2 = ... # = 0.6365142\n\n# Ratio of example in the child 1\ns = (8+2)/(10+6)\nf_final = s * h_child_1 + (1-s) * h_child_2 # = 0.5514443\n\ninformation_gain = h_parent - f_final # = 0.1101189\n```\n\n*** ** * ** ***"]]