|
@@ -463,7 +463,7 @@ stl = STL(
|
|
|
)
|
|
|
result = stl.fit()
|
|
|
|
|
|
-smoothed = lowess(df['值'], df.index, frac=fraction)
|
|
|
+smoothed = lowess(df['值'], np.arange(len(df)), frac=fraction)
|
|
|
|
|
|
trend_lowess = smoothed[:, 1]
|
|
|
|
|
@@ -512,10 +512,12 @@ print(output)
|
|
|
cmd := exec.Command(`python3`, "-c", pythonCode)
|
|
|
output, err := cmd.CombinedOutput()
|
|
|
if err != nil {
|
|
|
+ utils.FileLog.Info("execStlPythonCode error:%s, input: path:%s, toPath:%s, period:%d, seasonal:%d, trendDeg:%d, seasonalDeg:%d, lowPassDeg:%d, fraction:%g, robust:%s", err.Error(), path, toPath, period, seasonal, trend, trendDeg, seasonalDeg, lowPassDeg, fraction, robust)
|
|
|
return
|
|
|
}
|
|
|
defer cmd.Process.Kill()
|
|
|
if err = json.Unmarshal(output, &stlResult); err != nil {
|
|
|
+ utils.FileLog.Info("execStlPythonCode Unmarshal error:%s, input: path:%s, toPath:%s, period:%d, seasonal:%d, trendDeg:%d, seasonalDeg:%d, lowPassDeg:%d, fraction:%g, robust:%s, output:%s", err.Error(), path, toPath, period, seasonal, trend, trendDeg, seasonalDeg, lowPassDeg, fraction, robust, string(output))
|
|
|
return
|
|
|
}
|
|
|
return
|