**AI exam**

**AI exam**

人工智能考试代考 Problem 1 — Multiple Choice, True False, Short Answers (30 Points Total)For each problem that provides an explanation, clearly justify your choice

**Problem 1 — Multiple Choice, True False, Short Answers (30 Points Total) **

**Problem 1 — Multiple Choice, True False, Short Answers (30 Points Total)**

For each problem that provides an explanation, clearly justify your choice(s). There many be more than one correct answer, depending on how it is justified.

**1.(3 Points) **

**1.(3 Points)**

True/False: For a given Markov decision process, in order to extract the optimal policy *π** ^{∗}*, it is sufficient to know the transition function

*(*

*T*

*s, a, s**) and optimal value function*

*’*

*V**.*

^{∗}If false, explain why this is false. If true, explain how to extract the policy.

**2.(5 Points) **

**2.(5 Points)**

What are the benefits of approximating a Q-function as a linearcombination of features?

Circle all the following that apply:

(a) Lower memory requirements for large state-action spaces.

(b) Generalization to unseen states and actions.

(c) Convergence to the optimal Q-function is guaranteed.

Briefly explain each of your selections * and *why each choice you did not select does not apply.

**3.(4 Points) **

**3.(4 Points)**

Suppose you are using * Q*-learning to perform reinforcement learning and the current iteration has the following

*-values:*

*Q*

Suppose we observe a transition (0* , r, *+1

*1) (i.e., we begin in state 0, perform action*

*,**, obtain +1 reward, and end up in state 1), and further assume a discount factor of*

*r**= 1 and learning rate*

*γ**= 0*

*α**01. Describe what happens to each of the*

*.**-values during*

*Q**-learning by marking whether each value will*

*Q**,*

*increase**, or*

*decrease**after the*

*stay the same**-value update for this observed transition:*

*Q*(0*Q*) will*, r*/**(increase)**/**(decrease)****(stay the same)**(0*Q*) will*, l*/**(increase)**/**(decrease)****(stay the same)**(1*Q*) will*, r*/**(increase)**/**(decrease)****(stay the same)**(1*Q*) will*, l*/**(increase)**/**(decrease)****(stay the same)**

Briefly explain your selections * without calculating anything*.

**4.(5 Points) **

**4.(5 Points)**

Clearly mark the statement(s) of conditional independence that are implied by the following Bayesian network (no explanation required):

**5.(5 Points) **

**5.(5 Points)**

A Naive Bayes classifier achieves perfect accuracy on the training data, but performs poorly (i.e., has low accuracy) whe evaluated on a dataset that was not used for training. Which of the following actions might you take in this situation?

(a) No action – the model is performing perfectly.

(b) Adjust the decision threshold of the model.

(c) Add more features to the model.

(d) Remove features from the model.

Briefly explain each action that you did or did not take. There are many valid choices here: clearly explain your reasoning.

**6.(8 Points) **

**6.(8 Points)**

Consider the following joint probability distribution and Bayesian network:

Give *θ*_{1} and *θ*_{2} so that the joint probability distribution matches the independence assumptions implied by the Bayesian network, or show that no such choice of parameters exists.

* Hint: *First, write down any equations that you know that can relate

*θ*_{1}and

*θ*_{2}.

** **

**Problem 2 — Reinforcement Learning (25 Points Total) 人工智能考试代考**

**Problem 2 — Reinforcement Learning (25 Points Total) 人工智能考试代考**

Consider the following MDP, where each edge is labeled with its action (transition probabilities and rewards are unlabeled and will be learned from data):

**1.(3 Points) **

**1.(3 Points)**

Suppose you observe the following transitions, where * s *is the initial state,

*is the observedaction,*

*a*

*s**is the state that was transitioned into, and*

*’**is the reward (assume here that rewards are not stochastic):*

*r*

Give the learned reward and probability for each (*s, a, s**’ ** , r*) tuple by filling in the following table:

**2.(12 Points) **

**2.(12 Points)**

Using the parameters learned in the previous step, perform 3 steps of value iteration to fill in the following table with a discount factor of * γ *= 0

*9:*

*.*

**3.(7 Points) **

**3.(7 Points)**

What is the optimal policy *π** ^{∗ }*according to the 3 steps of value iteration you just performed?

Show any calculations that you performed in order to determine it.

**4.(3 Points) **

**4.(3 Points)**

Suppose you can gather 5 more data points to learn more information about this MDP. The way you gather a new data point is to pick a particular state and action to perform (for instance, “perform action * y *in state

*”). Which 5 more data points would you choose, and why? (There are many valid choices here – provide justification for any choice that you make.)*

*A*** **

**Problem 3 — Bayesian Network Modeling (20 Points Total) 人工智能考试代考**

**Problem 3 — Bayesian Network Modeling (20 Points Total) 人工智能考试代考**

Consider the following situation:

You are a baker trying to make the perfect bread-making recipe. Every day you bake a fresh loaf of bread. The quality of the bread each day depends on the humidity, the temperature, and the yeast quality. The bread quality can be * great *or

*. Each day you open a fresh independent packet of yeast, which can be*

*poor*

*good yeast**that is great for bread or*

*that does not work.*

*dead yeast*Each day can be * high humidity *or

*. It is more likely to be humid today if yesterday was humid. The temperature can be*

*low humidity**– the temperature can affect the humidity, and the temperature also depends on the temperature of the previous day.*

*low, medium, or high***1.(12 Points) **

**1.(12 Points)**

Draw a Bayesian network for modeling this situation over the course of three days (you are not given precise probabilities, so you should not provide theconditional probability tables for now). You can assume on the first day that no events depend on any previous days.

**2.(3 Points) 人工智能考试代考**

**2.(3 Points) 人工智能考试代考**

Give a brief explanation of how each random variable your Bayesian network corresponds with the relevant component of the problem. What is the domain of each random variable?

**3.(5 Points) **

**3.(5 Points)**

Suppose you bake 3 bad loaves of bread in a row. You want to figure out the * most likely *underlying

*that led to such bad luck. Describe the query one would perform on the Bayesian network to answer this question (i.e., give the exact mathematical formula in terms of the semantics of the Bayesian network). What is that query’s name (most-probable explanation, maximum a-posteriori, or marginal maximum a-posteriori)?*

*weather conditions*** **

**Problem 4 — Classifying with Missing Data (35 Points Total) 人工智能考试代考**

**Problem 4 — Classifying with Missing Data (35 Points Total) 人工智能考试代考**

In this problem we will walk through the steps of training and evaluating a Naive Bayes classifier where some of the data points are * missing*! It is very common in a practical dataset in machine learning for some data points to missing particular attributes or features – for instance, in a medical diagnosis setting, patients may decline to tell you personal information if it is embarrassing.

Consider the following Naive Bayes classifier Bayesian network with three features (*f*_{1}*, f*_{2}*, f*_{3}) and label * y*, and assume that all features and labels are binary:

We will now consider a few ways of dealing with missing data, and evaluate our classifier when trained with these different mitigations.

**1.(4 Points) **

**1.(4 Points)**

The first and simplest way is to * ignore all the rows with missing attributes *by removing them from the dataset. Give the learned conditional probability tables for the Naive Bayes classifier trained with this dataset.

**2.(10 Points) **

**2.(10 Points)**

Using a decision-threshold of 0* .*8 for predicting a positive label (i.e., predict + if Pr(

*= +*

*y*

*|*

*f*_{1}

*, f*_{2}

*, f*_{3})

*0*

*>**8), give the classification for the point*

*.*

*f*_{1}= 1

*, f*_{2}= 0

*, f*_{3}= 1.

**3.(3 Points) **

**3.(3 Points)**

What are some downsides to ignoring rows with missing data? Give at least 2 distinct reasons.

**4.(3 Points) 人工智能考试代考**

**4.(3 Points) 人工智能考试代考**

One way of dealing with missing data is called * imputation *– a fancy way of saying “make something up”. One way of making up values is to

*– for instance, if Pr(*

*choose the most likely instantiation for each missing value according to its marginal probability*

*f*_{1}= 1)

*1*

*>**2 according to the empirical distribution given by the dataset, then replace all instances of “?” for*

*/*

*f*_{1}in the dataset with the value 1 (ties can be broken arbitrarily, but you should replace all “?” with

*). This strategy is called*

*the same value**. Fill in the dataset below that is computed by marginal imputation (Note that you are using the marginal probabilities according to the dataset here, so you are not required to do inference on the Bayesian network):*

*marginal imputation*

Show any calculations that you performed to fill in this table.

**5.(3 Points) **

**5.(3 Points)**

Give the CPTs for the trained Naive Bayes classifier after applying marginal imputation to the dataset.

**6.(6 Points) **

**6.(6 Points)**

Another way of dealing with missing data is to make use of the Bayesian network structure itself. First, we can learn the maximum likelihood model according to the dataset where we ignore rows with missing data (as in sub-problem 1). Then, * using this model*, we can compute the most likely value for each missing attribute! We will call this

*. Use this strategy to impute the missing “?” for the first row in the dataset (i.e., compute arg max*

*Bayesian network imputation*

_{v}

_{∈{}_{0}

_{,}_{1}

*Pr(*

_{}}

*f*_{3}=

*v*

*|*

*f*_{1}= 0

*, f*_{2}= 1

*= +) for the Bayesian network you trained in the first part of this problem).*

*, y***7.(3 Points**)

**7.(3 Points**

What advantages does Bayesian network imputation have over marginal imputation? Comment on why they might they learn different parameters.

**8.(3 Points**)

**8.(3 Points**

In what ways is Bayesian network imputation still flawed (i.e., why is missing data still a problem)?

更多代写：计算机架构代写 台灣代考網 英国Accountant网课代修 1000字-2000字的essay怎么写 英文文献引用格式 留学生简历代写