diku-dk / bfast

GPU Implementation for BFAST
GNU General Public License v3.0
37 stars 17 forks source link

Add trend number to parameter calculation #45

Open fnands opened 2 years ago

fnands commented 2 years ago

Hi,

Unless I'm mistaken sigma is the residual standard deviation, so the denominator should be the d.o.f. i.e. sample_size - number_params which in this case will be 2 * k + 1 if there is no trend or 2 * k + 2 if there is a trend.

It seems it was hardcoded to the case where there is a trend, so this should fix it.

I am unsure about the futhark implementation: it seems to into account the fact that there are fewer parameters when not calculating a trend, but frankly it's greek to me so I am unsure if it's actually being used.