comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Regression fit and random noise
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Regression fit and random noise [message #83685 is a reply to message #83683] Thu, 28 March 2013 16:40 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
This is actually a good point, and likely explains your asymptotic value of the coefficient. Check out the sample code I posted to see an example of how to add uniform noise distributed about 0

----> noiseFactor*(RANDOMU(seed, npts)-0.5)

Depending on the data, and what you're trying to do, you could instead add Gaussian-distributed noise as mentioned. You'll probably want to modify the width of the Gaussian noise to *really* test the model as well.

See the help for more:
http://www.exelisvis.com/docs/RANDOMU.html
http://www.exelisvis.com/docs/RANDOMN.html

On Thursday, March 28, 2013 6:26:30 PM UTC-5, Mats Löfdahl wrote:
>
>
> Maybe I misunderstand what you are trying to do but... Are you aware that randomu has a uniform distribution between 0 and 1? So you are adding on the average something like 0.5*noise_ratio to your original signal. So maybe you want to add noise_ratio*(randomu(...)-0.5) instead. Or, since randomn is normal distributed with zero mean, simply noise_ratio*randomn(...).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simplify if statements and for loops inside for loops
Next Topic: Re: Calculating difference between each element in array from previous

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:50:07 PDT 2025

Total time taken to generate the page: 1.68269 seconds