讲解:CSC384、c++、Java,PythonDatabase|SQL

Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 1Computer Science 384 April 3, 2020Take Home Exam: Bayes Nets and Knowledge RepresentationDue: April 17, 2020 by 10:00 PM(EDT)Silent Policy: A silent policy will take effect 24 hours before this assignment is due, i.e. no questions willbe answered, whether asked on the discussion board, via email or in person.Policies:1. The TAs and instructors will continue to hold office hours and host help sessions between April 3rdand the due date. However, during these sessions, you may not discuss problems on the take homeexam. Instead, you can discuss practice problems that have been posted to the website. Similarly,on Piazza, you may not discuss problems on the take home exam. You can instead discuss practiceproblems.2. You must work alone on this take home exam. You may not discuss problems on the take homeexam with anyone (including other students).3. You must write your answers clearly and legibly for full marks.4. No submissions will be accepted past the due date without approval.5. There will be no auto-fail policy associated with this exam.Total Marks: This exam represents 20% of the course grade.Handing in this AssignmentWhat to hand in electronically: Submit written answers in a file called answers.pdf as well asacknowledgment form.pdf using MarkUs. Your login to MarkUs is your teach.cs username and password.It is your responsibility to include all necessary files in your submission.Clarification Page: Important corrections (hopefully few or none) and clarifications to the assignmentwill be posted on the Exam Clarification page, linked from the CSC384 web page, also found at: http://www.teach.cs.toronto.edu/~csc384h/winter/tests.html. You are responsible for monitoringthe Exam Clarification page.Questions: Questions about the exam should be asked on Piazza:https://piazza.com/utoronto.ca/winter2020/csc384/home.You may also reach out to the TAs or one of the instructors. Please place ”Exam” and ”CSC384” in thesubject line of your email.Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 2Q1. Probability (worth 15/100 marks)1. (worth 2 marks) There is a type of skin cancer that affects 3 in every 100 people. A company hasinvented a test that can diagnose this cancer using an image. The test isn’t perfect, tho; it will give afalse positive (i.e. it will detect cancer when there is none) 5% of the time and a false negative (i.e.it will fail to detect a cancer that is present) 3% of the time.If a test is positive, what is the probability the patient does not have cancer? If a test is negative,what is the probability the patient does have cancer?2. (worth 3 marks) Doctors are not happy with the false positive rate of the test. The company respondsby creating a new test that has a false positive rate of 6% and false negative rate of 4%. Although thetest seems worse than the original, the company explains the test results are conditionally independentof one another given the condition of the user. They suggest using both tests in conjunction toimprove the false positive rate. Specifically, they suggest doctors diagnose cancer if and only if bothtests are positive. Does this logic make sense? Explain.3. (worth 5 marks) We briefly discussed what it might mean to create an ’unbiased’ Bayesian Classifier.Specifically, we said that if C is a classification, Y is a label representing ’ground truth’ andA is some ’protected attribute’ (e.g. gender or race) we might enforce Separation of classifications,making A independent of C given Y . Alternately we might enforce Sufficiency, making A is independentof Y given C. But we can’t do both at the same time! Show that this is true, i.e. thatenforcing both Separation and Sufficiency implies A is independent of (Y, C).4. (worth 5 marks) Given that X is independent of Y given Z and X is independent of W given (Y, Z).Show that X is independent of (Y, W) given Z.Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 3Q2. Variable Elimination (worth 13/100 marks)Birds frequently appear in the tree outside of your window in the morning and evening; these includefinches, cardinals and robins. Finches appear more frequently than robins, and robins appear more frequentlythan cardinals (the ratio is 7:4:1). The finches will sing a song when they appear 7 out of every 10times in the morning, but never in the evening. The cardinals rarely sing songs and only in the evenings(in the evening, they sing 1 of every 10 times they appear). Robins sing once every five times they appearregardless of the time of day. Every tenth cardinal and robin will stay in the tree longer than five minutes.Every fourth finch will stay in the tree longer than five minutes.1. (worth 2 marks) Draw a Bayesian network that captures the information in the story above correctlyand concisely. Make sure to annotate your network with conditional probability tables (CPTs).2. (worCSC384课程作业代做、c++程序设计作业调试、Java,Python语言作业代写 代写Database|代做数据库Sth 1 mark) How many parameters will be required to specify the network you have drawn?Explain.3. (worth 5 marks) A bird lands in the tree in the morning. What is the probability that it will stay inthe tree longer than five minutes?4. (worth 5 marks) What is the overall probability that any given bird in your tree will sing a song?Q3. Markov Models (worth 12/100 marks)In the mail room of a university office, a stream of blue and yellow mail carts pass a mail sorting robot. Bluecarts contain 7 domestic letters for every 3 international letters. Yellow carts contain 2 domestic letters forevery 3 international letters. Blue carts are followed by blue carts 70% of the time, but 30% of the time theyare followed by a yellow cart. Yellow carts are followed by yellow carts half of of the time, and the otherhalf of the time they are followed by a blue cart. The first cart, every morning, is yellow 9 of every 10 times.The robot pulls a single letter from each cart as the cart passes it by.1. (worth 2 mark) Draw a markov model to represent the joint distribution over cart colors and theorigins of letters selected by the robot. Include a conditional probability table (CPT) with eachvariable in your model.2. (worth 5 marks) What is the probability that the first three letters selected by the robot, in order,will be: domestic, international, domestic?3. (worth 5 marks) What is the probability that the fourth cart will be blue if the first three lettersselected, in order, are: international, international, domestic?Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 4Q4. D-Separation and Relevance (worth 10/100 marks)Given the Bayesian Network structure above ....1. (worth 1 mark) How many parameters are required to fully specify the network? Explain.2. (worth 3 marks) List three pairs of variables X, Y where X is independent of Y .3. (worth 3 marks) List three sets of variables X, Y, Z where X is independent of Z given Y .4. (worth 1 mark) Assume we are to calculate P(B|E, F). Which variables are relevant?5. (worth 2 marks) Assume we are to calculate P(B|G) using variable elimination. List the eliminationorder you might suggest when using the min-fill heuristic to select variables, and give the sizeof the factors that result from each elimination.Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 5Q5. First-order Structures and Models (worth 19/100 marks)Consider a first-order language Lmetal consisting of constant symbols o1, o2, o3, a binary predicate symbolheavier than, and unary predicate symbol expensive.Let D = {Steel, Aluminium, T itanium}.1. (worth 6 marks) How many Lmetal-structures with domain D exist? Justify your answer.2. (worth 3 marks) Let Φ1 be the set consisting of the following sentences:heavier than(o2, o1)heavier than(o1, o3)expensive(o1)expensive(o2)Consider a set B of Lmetal-structures for all structures M ∈ B:hAluminium, Steeli ∈ heavier thanMhSteel, T itaniumi ∈ heavier thanMhT itanium, Aluminiumi ∈ heavier thanMAluminium ∈ expensiveMSteel ∈ expensiveMAre all structures in B models of Φ1? Explain why or why not.3. (worth 4 marks) Suppose Φ2 is the set obtained by adding the following sentence to Φ1∀x∀y∀z(heavier than(x, y) ∧ heavier than(y, z)) → heavier than(x, z)Are all structures in B models of Φ2? Explain why or why not.4. (worth 6 marks) Consider the set Φ3 that contains only the following axiom∀x∀y∀z(heavier than(x, y) ∧ heavier than(y, z)) → heavier than(x, z)How many Lmetal-structures with domain D are models of Φ3? Justify your answer.Take Home Exam , University of Toronto, CSC384 - Intro to AI, Winter 2020 6Q6. Proof by Resolution (worth 31/100 marks)Consider the following knowledge base (note that p, p1, p2, p3 are constant symbols, part(x, y) means xis a part of y and precedes(x, y) means x precedes y):∃c1∃c2∃c3component(c1, p1) ∧ component(c2, p2) ∧ component(c3, p3)∧ assemble before(c1, c2, p) ∧ assemble before(c2, c3, p)(1)∀c1∀c2(component(c1, p1) ∧ component(c2, p2) ∧ assemble before(c1, c2, p))→ ∃c3 (component(c3, p3) ∧ assemble before(c1, c3, p) ∧ assemble before(c3, c2, p))(2)∀c1∀c2∀a1∀a2(component(c1, a1) ∧ component(c2, a2) ∧ assemble before(c1, c2, p))→ precedes(a1, a2)(3)∀c1∀c2∀c3∀a(assemble before(c1, c2, a) ∧ assemble before(c2, c3, a))→ assemble before(c1, c3, a)(4)∀c1∀c2∀a∀a1(assemble before(c1, c2, a) ∧ component(c1, a1)) → part(a1, a)(5)1. (worth 11 marks) Convert the sentences to clausal form.2. (worth 20 marks) Use resolution to answer the following queries.You must use the notation developed in class (see slide no 39 in KRR-Part 2) for presenting youranswers.(a) (worth 10 marks) What is a part of p? (finding one answer is sufficient)Note: part(x, y) denotes x is a part of y.(b) (worth 10 marks) What does precede p3? (finding one answer is sufficient)Note: precedes(x, y) denotes x precedes y.HAVE FUN and GOOD LUCK!转自:http://www.6daixie.com/contents/9/5064.html

你可能感兴趣的:(讲解:CSC384、c++、Java,PythonDatabase|SQL)