Unit 2 - 32 Question incorrect grading

I don't understand why my answer is being graded incorrectly when my output matches exactly what's in the video. The only thing I'm doing different is instead of P = (I - K * H) * P I have P = P - K * H * P which is equivalent to the first. Here's my output:


x=
[0.99900099900099881]
[0.0]

P=
[1000.9990009990012, 1000.0]
[1000.0, 1000.0]

x=
[2.9980029930179528]
[0.99900199501296594]

P=
[4.9900249351697994, 2.9930179531228305]
[2.9930179531228305, 1.9950129660888933]

x=
[3.9996664447958645]
[0.99999983355528732]

P=
[2.3318904241194893, 0.99916760999211562]
[0.99916760999211562, 0.49950058263975161]

asked 02 Mar '12, 22:51

david%20karapetyan's gravatar image

david karape...
2491320
accept rate: 75%

edited 02 Mar '12, 22:53


2 Answers:

It is a bit scary that that doesn't pass given the difference it produces is quite small... I'm guessing the grading scripts are looking for exact outputs as opposed to parsing the data or looking at the returned values.

Maybe a note for graders in the future (especially on homework): instead of making a filter function that prints the value, instead have us make one that returns the intermediate values and then compare the values to the expected within some epsilon. I see no good reason why this shouldn't pass.

link

answered 02 Mar '12, 23:28

Anthony%20Wertz's gravatar image

Anthony Wertz
1.3k81930

The answers match "only" till the 18th digit after the dot ...

link

answered 02 Mar '12, 23:24

jimgb-2's gravatar image

jimgb-2
7.3k3077148

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5,185
×515
×369
×319
×192

Asked: 02 Mar '12, 22:51

Seen: 163 times

Last updated: 02 Mar '12, 23:28