<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Serial Differencing Aggregation(串行差異聚合) 串行差分是將在一個時間序列中的值減去其本身滯后一段時間或周期的值。例如,數據點 f(x) = f(xt) - f(xt-n),其中n是所使用的周期。 周期1相當于沒有時間歸一化的導數:它表是從一個點到下一個點的變化。單個周期對于消除不變的線性趨勢很有用。 單個周期也可用于將數據轉換為固定的序列。在這個例子中,道瓊斯指數繪制了超過250天左右。原始數據不是靜止的,這會使得很難使用這些數據。 通過計算第一個差值,我們去除趨勢數據(例如刪除常數,線性趨勢)。我們可以看到數據成為一個固定的序列(例如,第一個差異是隨機分布在零值附近,似乎沒有任何模式/行為)。這個轉換揭示了數據集是隨機游走的;該值是先前的值加減隨機隨機。這種洞察允許選擇進一步的分析工具。 圖15\. 道瓊斯數據繪畫和通過第一個差值來穩定數據。 ![](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/images/pipeline_serialdiff/dow.png) 可以使用更大的時間段來消除季節性/循環性。在這個例子中,以正弦波+恒定線性趨勢+隨機噪聲綜合生成了一個引理群。正弦波有30天的時間。 第一個差異消除了恒定的趨勢,只剩下一個正弦波。然后將第30個差值應用于第一個差異以消除循環行為,留下適合于其他分析的固定序列。 圖16.繪制了第一和第30個差異的靜止數據 ![](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/images/pipeline_serialdiff/lemmings.png) # Syntax(句法) **serial_diff**?聚合看起來像這樣: | `{` `"serial_diff"``: {` `"buckets_path"``:?``"the_sum"``,` `"lag"``:?``"7"` `}` `}` | Table 13\. serial_diff 參數 | 參數名稱 | 描述 | 是否必填 | 默認值 | | --- | --- | --- | --- | | buckets_path | 感興趣的度量的路徑(更多細節可以看[buckets_path](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-aggregations-pipeline.html#buckets-path-syntax)?語法) | 必填 | ? | | lag | 從當前的值減去歷史?**bucket**。比如,lag=7表示每次從當前的?**bucket?**的值減去其前面第7個?**bucket?**的值。必須是非零正整數。 | 可選 | 1 | | gap_policy | 確定遇到數據間隙時的策略 | 可選 | insert_zero | | format | 格式化聚合輸出的值 | 可選 | null | **serial_diff**?聚合必須嵌入到?**histogram**?或者?**date_histogram**?聚合中: | `curl -XPOST?``'localhost:9200/_search?pretty'`?`-H?``'Content-Type: application/json'`?`-d'` `{` `"size"``:?``0``,` `"aggs"``: {` `"my_date_histo"``: {?????????????``1`???? `"date_histogram"``: {` `"field"``:?``"timestamp"``,` `"interval"``:?``"day"` `},` `"aggs"``: {` `"the_sum"``: {` `"sum"``: {` `"field"``:?``"lemmings"`?????`2` `}` `},` `"thirtieth_difference"``: {` `"serial_diff"``: {???????????????``3` `"buckets_path"``:?``"the_sum"``,` `"lag"`?`:?``30` `}` `}` `}` `}` `}` `}` `'` | | 1 | ?一個命名為“**date_histogram**” 的?**date_histogram**?, 由 timestamp 字段和 一天間隔組成。 | | 2 | **sum**?度量是用來計算字段的和。可以填很多值(sum, min, max, etc) | | 3 | 最后,我們指定一個以?**the_sum**?作為輸入的?**serial_diff?**聚合。 | 串行差分通過在字段上指定?**histogram?**或者?**date_histogram**。你可以選擇選擇性的添加常規的度量,例如sum。最后 ?**serial_diff?**被嵌入到?**histogram中**。然后?**buckets_path?**參數用于指向histogram中的一個同級的度量。(有關buckets_path的語法,請參見[buckets_path](https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-aggregations-pipeline.html#buckets-path-syntax)?這節)。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看