联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2018-11-28 10:39

Name:_______________________

CSE 3521 Artificial Intelligence AU’18

Homework Assignment #9 (23 points)

Due: (A) Tuesday, Nov. 27, (BCD) Wednesday, Nov. 28

This assignment requires coding in Javascript. Use the template provided in

HW9_template.zip to get started. See param_est.js for the functions you need to

complete.

Use the data points provided in the template for all of the following problems.

Linear Least Squares

1. Complete the function calc_linLSQ_line(): Use linear least squares to

estimate the parameters (a and b) for the following model:

Also, calculate the sum of squared error and include in your report a plot using the

parameter values you found. (4 pts)

2. Similar to problem 1, complete the function calc_linLSQ_poly(): Use linear

least squares to estimate the parameters for various polynomials, such as:

Compare the plots and errors to your results from problem 1. Which of these 4

models (including problem 1) do you think best fits the data? Why? (7 pts)

Non-linear Least Squares

3. Derive the function for the Jacobian matrix for the following non-linear model:

In addition to including this derivation in your report, implement this in the

calc_jacobian() function. (2 pts)

Hint:4. Complete the function calc_nonlinLSQ_gaussnewton(): Use Gauss-Newton

non-linear least squares to estimate the parameters for the function from (3).

Use the following for your initial guess:

a=0.5, b=2, c=0.5, d=0.5

Stop after 10 iterations. (Note, these are the default values in the template.)

As with problems 1-2, find the sum of squared error and create a plot. (Calculate

the sum of squared error after each iteration.) Do you think this model fits the data

better than previous ones? Why or why not? (5 pts)

5. Complete the function calc_nonlinLSQ_gradientdescent(): Use Gradient

Descent non-linear least squares to estimate the parameters for the function from

(3).

Use the same initial guess as (4). Use a learning rate of 0.001 and stop after 5000

iterations.

As with problem 4, create a plot and find the sum of squared error after each

iteration. How does this algorithm compare to (4)

Try different values for learning rate. Can you achieve a better convergence rate

(lower error or less iterations for same error)? What are your observations on how

the algorithm behaves with different values? (5 pts)

Create (and submit in class) a report including answers to the asked questions and a

printout of your code. Also, create a ZIP archive of your code files and submit it in the

Homework 9 dropbox on Carmen.

Note: This assignment may be completed as a group of up to two people. Each group

should submit a single report (with both names on it) and only one group member should

submit the combined code to Carmen.

Tips:

If you need to print out debug statements, you may use the console.log() function to

print out to the browser’s debug console. To access this log, use Ctrl-Shift-J in Chrome or

Shift-F5 (Console tab) in Firefox.

Alternately, you can use the helper_log_write() function (in param_est_helper.js)

to output to the log region on the web page.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp