We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug the code under pkg/prediction/dsp/estimators.go
func (m *maxValueEstimator) GetEstimation(signal *Signal, periodLength time.Duration) *Signal { nSamplesPerPeriod := int(periodLength.Seconds() * signal.SampleRate) estimation := make([]float64, 0, nSamplesPerPeriod) nSamples := len(signal.Samples) nPeriods := nSamples / nSamplesPerPeriod for i := nSamples - nSamplesPerPeriod; i < nSamples; i++ { maxValue := signal.Samples[i] for j := 1; j < nPeriods; j++ { if maxValue < signal.Samples[i-nSamplesPerPeriod*j] { maxValue = signal.Samples[i-nSamplesPerPeriod*j] } } estimation = append(estimation, maxValue*(1.0+m.marginFraction)) } return &Signal{ SampleRate: signal.SampleRate, Samples: estimation, } }
Is that right use for j := 1; j < nPeriods; j++ {.From the introduce in https://gocrane.io/zh-cn/docs/core-concept/timeseries-forecasting-by-dsp/ seems that why should use for j := 1; j <= nPeriods; j++ {.
for j := 1; j < nPeriods; j++ {
for j := 1; j <= nPeriods; j++ {
The text was updated successfully, but these errors were encountered:
i think i got some wrong
Sorry, something went wrong.
No branches or pull requests
Describe the bug
the code under pkg/prediction/dsp/estimators.go
Is that right use
for j := 1; j < nPeriods; j++ {
.From the introduce in https://gocrane.io/zh-cn/docs/core-concept/timeseries-forecasting-by-dsp/ seems that why should usefor j := 1; j <= nPeriods; j++ {
.The text was updated successfully, but these errors were encountered: