These are chat archives for uwhpsc-2016/uwhpsc-2016

29th
Apr 2016
Sean Patrick Santos
@quantheory
Apr 29 2016 01:11
@rachka I haven't thought about this much yet, but my recollection is that large random triangular matrices tend to be "ill-conditioned" (depending on exactly what you mean by "random"). Because of this, small changes in the input vector tend to result in large changes in the output. If you could let me know how you're generating your test matrices, it might help to explain what's going on?
Alexander G Rachkov
@rachka
Apr 29 2016 01:12
Maybe it would be easiest to push my test_homework2.py and src c files to my private repo?
to show you
Sean Patrick Santos
@quantheory
Apr 29 2016 01:13
OK, go ahead, and just point me to it.
Alexander G Rachkov
@rachka
Apr 29 2016 01:17
its under def test_solve_lower_triangular(self): and def test_solve_upper_triangular(self): on lines 130 and 147 of test_homework2.py. The commit message of test_homework2.py has you mentioned. The two tests using matrices that I generated manually worked fine.
right now with size 15 x 15 and 20 x 20 it works most of the time but any larger and it breaks down
Sean Patrick Santos
@quantheory
Apr 29 2016 01:28
Sorry for the delay. I believe that this is indeed a conditioning problem, at least in part. If you look at L.dot(x)-b, even for the numpy implementation (which you calculate as xtrue), it starts to get well above machine precision for even moderately large matrices (like 30x30). Since the error in your "true" solution is too large, things are not going to look good regardless.
Alexander G Rachkov
@rachka
Apr 29 2016 01:29
No worries thanks for taking a look at all
and certainly the matrices tested against our functions will be well conditioned
Sean Patrick Santos
@quantheory
Apr 29 2016 01:31
Yep, that's the plan.
Alexander G Rachkov
@rachka
Apr 29 2016 01:31
getting really small values on the diagonal
is also a way to introduce large error as I understand it
and if you have 0 on the diagonal the forward or backward substitution would break down
Sean Patrick Santos
@quantheory
Apr 29 2016 01:33
Yep, that's a sign of a problem, but even if you fix the diagonal you can have some trouble. I did find the paper I was thinking of, if you're interested (though it uses a somewhat different method of randomly generating entries, it gives a hint about there being a problem in this case too): http://www.math.lsa.umich.edu/~divakar/papers/ViswanathTrefethen1998.pdf
Alexander G Rachkov
@rachka
Apr 29 2016 01:35
Thanks for the reference and for helping clarify my issue
Sean Patrick Santos
@quantheory
Apr 29 2016 02:06
Office hours ending: Going once, going twice...
Sold!
Chris Kang
@shinwookang
Apr 29 2016 17:42
This message was deleted
nicksmithc102
@nicksmithc102
Apr 29 2016 18:03
Anyone here?
mvelegar
@mvelegar
Apr 29 2016 18:28
@nicksmithc102 I've been online since 11:00 am, strangely just saw this message now
nicksmithc102
@nicksmithc102
Apr 29 2016 18:59
Oh, strange. Well hours are about over now.
mvelegar
@mvelegar
Apr 29 2016 20:02
Since I missed seeing this message when you sent it, you can go ahead and ask me any questions you have!