Steps for estimating alpha in 1/f^alpha noise using OLS
Show older comments
I have a signal (the vector "pink"), which I know is pink noise, 1/f^alfa, where alpha = 1. But let's assume alpha is unknown, and I need to estimate alpha. In other words, Let's assume I just have the signal.
I use the following procedure to get into a position to estimate alpha using OLS:
F = abs(fft(pink)); x = log(1:(length(pink)/2)); y = log(F(1:(length(pink)/2)));
Now I run OLS regression:
[r,m,b] = regression(x,y)
where I get
r = -0.5948, m = -0.4915, b = 6.8223.
I would have thought my estimate of alpha was m, but m is not equal to 1. So, what am I doing wrong? Is there an additional step I am forgetting, or is my procedure plain wrong?
3 Comments
John D'Errico
on 28 May 2017
I don't know of any function called regression, nor have I ever heard of one. A search of the site does not show any tool by that name, in case there is one in some toolbox. I also do not see anything of that form in the file exchange. My searches might have missed something though. I did look at each of the 5 files named regression.m that I found on the file exchange. None of them seemed to fit that template.
So if you got some code by that name, then ask the author. If it is in some toolbox that I did not find, then tell where it came from. If you wrote it, then how can we know what it does and what the return arguments mean?
Ulrik William Nash
on 28 May 2017
Edited: John D'Errico
on 28 May 2017
Ulrik William Nash
on 28 May 2017
Answers (1)
Nachiket Katakkar
on 1 Jun 2017
The regression function is part of the Neural Network Toolbox:
The coefficient "m" is the slope of the curve between the inputs "x" and "y". The example on the documentation page shows a value of m equal to 1, however, this would not necessarily be the case for any regression problem.
Consider this example with random data:
>> pink = rand(1,100);
F = abs(fft(pink));
x = log(1:(length(pink)/2));
y = log(F(1:(length(pink)/2)));
[r,m,b] = regression(x,y)
r =
-0.3448
m =
-0.3469
b =
1.7326
You can visualize the relationship between "x" and 'y" using:
>> plotregression(x,y)
Also notice, that in your case the value of "b", the offset of regression is also quite high. The regression function seems to be working as expected, so I would recommend confirming that the algorithm you are using is correct.
Categories
Find more on Linear Predictive Coding in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!