Re: [问题] How to solve Ax=b that A is not inve …

楼主: brooky (未够班)   2006-04-16 17:32:13
※ 引述《yabt (痴心绝对)》之铭言:
: ※ 引述《brooky (未够班)》之铭言:
: : Thanks for your reply.
: : I use "d_minus" to save "1/d" where d is the component get from SVD.
: : I need "1/d" because I want to use it for calculating "x^-1"
: : x ^-1 = v %*% w^-1 %*% t(u)
: Yeah, I know what you are doing.
: Sorry for using the symbols incorrectly in the example code I gave.
: What I mean is, while assigning the inverse of "d_minus" to itself,
: your code might bring some behaviors that are not what you expect.
: The following code may explain what I want to say:
: d <- SVD$d
: d_minus <- numeric()
: d_minus[d > 1e-07] <- 1 / d[d > 1e-07]
: d_minus[d <= 1e-07] <- 0
: Hope this would bring some help. :)
I know what you mean.
If there is a number greater than 1e+07,
it would become less than 1e-07 first and become 0 later on.
You are right.
Many thanks :)

Links booklink

Contact Us: admin [ a t ] ucptt.com