series_periods_validate()series_periods_validate()

• periods ：一个动态数组，包含要验证的时间段（在输入中提供）。periods : A dynamic array that contains the periods to validate (supplied in the input).
• scores ：一个动态数组，包含一个界于 0 到 1 之间的分数。scores : A dynamic array that contains a score between 0 and 1. 该分数显示时间段在 periods 数组中其各自位置上的重要性。The score shows the significance of a period in its respective position in the periods array.

语法Syntax

`series_periods_validate(`x`,` period1 [ `,` period2 `,` .`series_periods_validate(`x`,` period1 [ `,` period2 `,` . .. .. ] `)`] `)`

参数Arguments

• x：动态数组标量表达式，它是一个数值数组，通常是 make-seriesmake_list 运算符生成的结果输出。x : Dynamic array scalar expression that is an array of numeric values, typically the resulting output of make-series or make_list operators.
• period1、period2 等：指定要验证的时间段的 `real` 数字，以箱大小为单位 。period1 , period2 , and so on: `real` numbers specifying the periods to validate, in units of the bin size. 例如，如果将序列按 1 小时的箱分箱，则一个每周时间段为 168 个箱。For example, if the series is in 1h bins, a weekly period is 168 bins.

• 对于每个 period 参数，其最小值是 4，最大值是输入序列长度的一半。The minimal value for each of the period arguments is 4 and the maximal is half of the length of the input series. 对于在这些界限之外的 period 参数，输出分数将会是 0。For a period argument outside these bounds, the output score will be 0 .

• 输入时序必须有规律（也就是必须在常数箱中聚合），并且如果是使用 make-series 创建的，则输入时序总是有规律。The input time series must be regular, that is, aggregated in constant bins, and is always the case if it has been created using make-series. 否则，输出就没有意义。Otherwise, the output is meaningless.

• 该函数最多可接受 16 个要验证的时间段。The function accepts up to 16 periods to validate.

示例Example

``````print y=dynamic([80,139,87,110,68,54,50,51,53,133,86,141,97,156,94,149,95,140,77,61,50,54,47,133,72,152,94,148,105,162,101,160,87,63,53,55,54,151,103,189,108,183,113,175,113,178,90,71,62,62,65,165,109,181,115,182,121,178,114,170])
| project x=range(1, array_length(y), 1), y
| render linechart
``````

``````print y=dynamic([80,139,87,110,68,54,50,51,53,133,86,141,97,156,94,149,95,140,77,61,50,54,47,133,72,152,94,148,105,162,101,160,87,63,53,55,54,151,103,189,108,183,113,175,113,178,90,71,62,62,65,165,109,181,115,182,121,178,114,170])
| project x=range(1, array_length(y), 1), y
| project series_periods_validate(y, 14.0, 10.0)
``````
series_periods_validate_y_periodsseries_periods_validate_y_periods series_periods_validate_y_scoresseries_periods_validate_y_scores
[14.0, 10.0][14.0, 10.0] [0.84,0.0][0.84,0.0]