Steps for estimating alpha in 1/f^alpha noise using OLS
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Nachiket Katakkar
2017년 6월 1일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!