programming assignment #3 - problem #1

4 views
Skip to first unread message

Albert

unread,
Oct 19, 2006, 10:08:02 PM10/19/06
to Math128a-Berkeley
hi soroosh
as for that problem, what does it mean by accuracy and efficiency?
is accuracy the same as absolute error? efficiency as the time it takes
evaluate each method given the same error tolerance?
thank you --Albert

Soroosh Yazdani

unread,
Oct 20, 2006, 12:46:24 PM10/20/06
to Math128a...@googlegroups.com
That is correct. Accuracy means how small is the error, and efficiency
means how fast the code worked. Of course, these two are related to each
other (usually, when you work more, you can decrease the error), so you
should evaluate your methods based on the relationship between these
two.
i.e. if you do twice as much work, how much smaller is the error going to
get.

Soroosh

Albert

unread,
Oct 20, 2006, 4:39:43 PM10/20/06
to Math128a-Berkeley
so what is it exactly asking?
1) the relationship between error and matlab runtime? (well it is
probably hard to find a more quantitative relationship)
2) compared their error using the same N + compare their runtime in
matlab using same same tolerance level

which one?
and what is a convenient way/command to check runtime for efficiency
other than the profiler?

thanks

On Oct 20, 9:46 am, Soroosh Yazdani <syazd...@Math.Berkeley.EDU>
wrote:

Soroosh Yazdani

unread,
Oct 22, 2006, 7:06:03 PM10/22/06
to Math128a...@googlegroups.com
If you are approximating int(f(x)dx), then you can count how many
times you calculate f(x), as a measure of efficiency. Don't use the matlab
runtime, or any big profiling tools. For this class, we are not
interested in that level of efficiency. You can implement
this in your algorithm. Check how many evaluations you need to do,
and plot it against how accurate the integral is. You can measure the
accuracy to be the difference between the estimate of the integral you
get, and the best estimate you have, or better yet, the log of this
difference.

After plotting the data, you can give a qualitative analysis of the
plots.

Does this makes sense?

Soroosh

Reply all
Reply to author
Forward
0 new messages