当前位置 |首页 > CS代写 > C++/C代写 >
分享这个代写网站给同学或者朋友吧!


CS272:  Prob. Models for AI Fall 2018

Problem  Set 4

Due Sunday February 4, 2018 at 11:55pm

Problem 1. [3 pts] Exercise 9.3 from the book.

 Problem 2. [8 pts]

Using the factor code you wrote for the third problem set, write code to perform variable elimination as in algorithm 9.1

Use this algorithm along to calculate the marginals over variable J and over the pair I-J, in the Bayesian network given below. This network is the same as the running example in the book, except that I (intelligence) has been replaced with T (test-taking ability) and I is now a parent of T, and H (happiness) has been removed.

image.png

image.png

 

Your algorithm should have running time O˜(nc) where nis the number of eliminated factors and cis the number of elements in the largest factor produced. Note that the key operation is step 1 of Sum-Product-Eliminate-Var. Doing it in O(n) time is not hard. Doing it in O(lg n) requires an index of some form. You may submit an algorithm that takes O˜(n2c), but you will receive a maximum of 6 points.

Your code must be written in C++ and must implement the varelim method of the bn class given by  bn.h and  bn.cpp (supplied on iLearn with this assignment). The file vetest.cpp tests your code’s ability to find the marginal over J and the marginal over I & J in the network above.

Your assignment should run with the supplied factor.h and factor.cpp, which are solutions to the previous programming assignment. There is no need to change bn.h, so you should not submit a new version. Please do NOT submit any additional files.

To make grading easier, each question is its own “assignment” on gradescope. Submit your answers to problem 1 for assignment 4.1 and your code for problem 2 for assignment 4.2. For problem 4.2, submit onlybn.cpp.

代写CS&Finance|建模|代码|系统|报告|考试

编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习

金融类统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理

服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导

天才写手,代写CS,代写finance,代写statistics,考试助攻

E-mail:850190831@qq.com   微信:BadGeniuscs  工作时间:无休息工作日-早上8点到凌晨3点


如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

qr.png


代写