Tsung-Jung Tsai (TJ_Tsai)
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    快速探索 === ###### tags: `ML / 時間序列` ###### tags: `ML`, `時間序列` <br> [TOC] <br> ## 簡介 ### 時間序列預測帶來的價值 - [多元時間序列預測的時間模式注意](https://kknews.cc/code/y334n4j.html) > 預測多變量時間序列數據,例如電力消耗預測,太陽能發電和複音鋼琴件,具有許多有價值的應用。 - 颱風路徑預測 -> 預防自然災害,減少損傷 <br> ### 時間序列預測 是一個挑戰 > [Time series forecasting is still a challenging task.](https://github.com/ITMO-NSS-team/fedot-examples/blob/main/notebooks/latest/3_intro_ts_forecasting.ipynb) - ### 颱風路徑預測 - 大氣環流 - 太平洋高壓強弱 - 低壓環流變化 - [海洋 (颱風能量來源)](https://www.lis.ntu.edu.tw/~pnhsieh/courses/il/typhoon.pdf) - 洋流 - [海水熱含量](https://www.facebook.com/twtybbs/posts/2518463304834328) ![](https://i.imgur.com/UNUeNBh.png) - 海水熱含量低:暖水層淺薄或海溫偏低,颱風一攪海溫就低於26度,能量供應中斷。 - 陸地地形 - ### 潮汐發電量預測 - 太陽 / 地球 / 月球相對位置 - [大潮/小潮](https://www.cwb.gov.tw/V8/C/K/Encyclopedia/sea/tidal_list.html) <br> <hr> <br> ## 術語 ### 單變量/多變量, 多變項/多變量? - ### [醫學統計經常混淆的名詞~晨晰統計林星帆顧問整理](https://dasanlin888.pixnet.net/blog/post/34469753) > ![](https://i.imgur.com/98Ydg6L.png) - dependent variable 相依變項 - independent variable 自變項 - outcome variable 結果變項 > dependent variable 相依變項的另一種稱呼 - Covariate 共變量 - 自變項只有一個: - simple regression 簡單迴歸 (應用統計) - univariate regression 單變量迴歸 (醫學期刊、機器學習) - 自變項有兩個以上(含): - multiple regression 多元迴歸 (應用統計) - multivariable regression 多變項迴歸 (醫學期刊) - multivariate regression 多變量迴歸 (醫學期刊、機器學習) - ### [多變項還是多變量?雙變項還是單變量?晨晰統計林星帆顧問整理](https://dasanlin888.pixnet.net/blog/post/468348827) > 本篇文章旨在討論在醫學領域很常被誤用的統計名詞,有些名詞甚至錯誤(或說不精確)名詞的使用頻率還高過正確名詞。 > > 不同尺度的解釋變項與結果變項的組合之下,所使用的統計方法都不同 > ![](https://i.imgur.com/cHZFSDR.png) > > 多變量分析是筆者認為在醫學領域論文最常被誤用的名詞。相較於單變量分析是指該統計分析只有一個結果變項,嚴謹定義之下的多變量分析是指『同時有 2 個或 2 個以上的結果變項』。 ![](https://i.imgur.com/9vJ76Z9.png) - ### [A Multivariate Time Series Guide to Forecasting and Modeling (with Python codes)](https://www.analyticsvidhya.com/blog/2018/09/multivariate-time-series-guide-forecasting-modeling-python-codes/) <br> ### Time-Series Forecasting 時間序列預測 - [Multi-Step Multivariate Time-Series Forecasting using LSTM](https://pangkh98.medium.com/multi-step-multivariate-time-series-forecasting-using-lstm-92c6d22cd9c2) 根據過去的自變量X預測未來的應變量y ### Multivariate Forecasting 多元預測 (多變量預測) - [Multi-Step Multivariate Time-Series Forecasting using LSTM](https://pangkh98.medium.com/multi-step-multivariate-time-series-forecasting-using-lstm-92c6d22cd9c2) - 根據一個自變量X預測應變量y,為單元預測 - 根據多個自變量X預測應變量y,為多元預測 ### Multi-step Forecasting 多步預測 - [Multi-Step Multivariate Time-Series Forecasting using LSTM](https://pangkh98.medium.com/multi-step-multivariate-time-series-forecasting-using-lstm-92c6d22cd9c2) - 每次預測下一個時間步長,為單步預測 - 每次預測數個時間步長,為多步預測 ### [自回歸預測法](https://wiki.mbalib.com/zh-tw/%E8%87%AA%E5%9B%9E%E5%BD%92%E9%A2%84%E6%B5%8B%E6%B3%95) > 自回歸預測法是指利用預測目標的歷史時間數列在不同時期取值之間存在的依存關係(即自身相關),建立起回歸方程進行預測。具體說,就是用一個變數的時間數列作為因變數數列,用同一變數向過去推移若幹期的時間數列作自變數數列,分析一個因變數數列和另一個或多個自變數數列之間的相關關係,建立回歸方程進行預測。 - 自回歸預測法的優點是所需資料不多,可用自變數數列來進行預測。但是這種方法受到一定的限制,即必須具有自相關。 - 跟一般迴歸的差異 ![](https://i.imgur.com/eoyEavk.png) https://udn.com/news/story/120940/5747789 ![](https://i.imgur.com/cKwZ4Zv.png) <br> <hr> <br> ## 資料 > 前往:[[HackMD] 時間序列資料集](/7h4bK5EqRvSANplJSoq2Mg) > 前往:[[HackMD] 標記工具](/IqF7MscCQeOAfSPirRMrZw) <br> <hr> <br> ## 解決工具 ### 神經網路 - ### LSTM - **[Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras](https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/)** > #International Airline Passengers #國際航空旅客 ![](https://i.imgur.com/1LatF2C.png) ![](https://i.imgur.com/IX2EHSJ.png) - **[Multi-Step Multivariate Time-Series Forecasting using LSTM](https://pangkh98.medium.com/multi-step-multivariate-time-series-forecasting-using-lstm-92c6d22cd9c2)** #tensorflow.keras - **王柏鈞 專欄** - [時間序列的AI介紹](https://bc165870081.medium.com/%E6%99%82%E9%96%93%E5%BA%8F%E5%88%97%E7%9A%84ai%E4%BB%8B%E7%B4%B9-ff250cfc2ff9) (王柏鈞) - 介紹: 時間序列是什麼 - 時間序列長什麼樣子 - 有週期性 - 不必然有週期性 - [【技術筆記─ 時序資料的機器學習建模 Day3】](https://bc165870081.medium.com/x-day3-f7cc14371a0) - 單變量時間序列模型 - 使用Vanilla LSTM, Stacked LSTM, Bidirectional LSTM, CNN+LSTM - ### [Multi-Step Multivariate Time-Series Forecasting using LSTM](https://pangkh98.medium.com/multi-step-multivariate-time-series-forecasting-using-lstm-92c6d22cd9c2) - ### [artificial-neural-networks.ipynb](https://github.com/gakhov/pycon-ua-2018/blob/master/artificial-neural-networks.ipynb) - ### [tensorflow] Convolutional and Recurrent Neural Networks (CNNs and RNNs) - [Time series forecasting](https://www.tensorflow.org/tutorials/structured_data/time_series) - ### MLP - [How to Develop Multilayer Perceptron Models for Time Series Forecasting](https://machinelearningmastery.com/how-to-develop-multilayer-perceptron-models-for-time-series-forecasting/) <br> ### 單一啟發式演算法 - ### ExponentialSmoothing > Exponential-Smoothing 是由兩個參數組成,分別是 > - alpha (平滑因子,類似權重) > - 初始預測值 > > 計算方式: > $預測值_{t+1} = alpha \times 實際值_{t+0} + (1 - alpha) \times 預測值_{t+0}$ > > 範例: > ![](https://i.imgur.com/MHSFadD.png) - ### [【时间序列 - 02】ExponentialSmoothing - 指数平滑算法](https://blog.csdn.net/Houchaoqun_XMU/article/details/81462739) - ### [指數平滑預測(exponential smoothing forecast)](http://blog.udn.com/anserelearning/132015279) ![](https://i.imgur.com/Fcd8th0.png) - ### [Exponential Smoothing for Time Series Forecasting](https://statisticsbyjim.com/time-series/exponential-smoothing-time-series-forecasting/) - ### [Hands-On Guide to Time Series Analysis using Simple Exponential Smoothing in Python](https://analyticsindiamag.com/hands-on-guide-to-time-series-analysis-using-simple-exponential-smoothing-in-python/) - ### [Forecasting with a Time Series Model using Python: Part Two](https://www.bounteous.com/insights/2020/09/15/forecasting-time-series-model-using-python-part-two/) - ### SSA method - [SSA (метод)](https://ru.wikipedia.org/wiki/SSA_(%D0%BC%D0%B5%D1%82%D0%BE%D0%B4)) > from [AutoML for time series: advanced approaches with FEDOT framework](https://towardsdatascience.com/automl-for-time-series-advanced-approaches-with-fedot-framework-4f9d8ea3382c) - ### ARIMA - [Time Series forecasting using Auto ARIMA in python](https://towardsdatascience.com/time-series-forecasting-using-auto-arima-in-python-bb83e49210cd) - [使用Python和R中的Auto ARIMA構建高性能時間序列模型](https://www.twblogs.net/a/5cbf2439bd9eee3aed784eb0) <br> ### 演算法單一工具 - AutoRegression > 前往:[[HackMD] 模型演算法 / AutoRegression](/4pcoLxH7T3-2dETjrR8lhQ) - statsmodels > 前往:[[HackMD] 工具 / statsmodels](/1No11YLRSv2y1dy7ipO16w) <br> ### 演算法整合工具 - FEDOT > 前往:[[HackMD] 工具 / FEDOT](/m7pKYeUAQfW6g6wPbEzYUA) <br> ### 公有雲平台 - Azure > 前往:[[HackMD] 平台 / Azure](/SJanQhc_Rp2sCuXPNNF6sw) <br> ### 更多 - ### [An overview of time series forecasting models](https://towardsdatascience.com/an-overview-of-time-series-forecasting-models-a2fa7a358fcb) - **Time series forecasting models** 1. Naïve, SNaïve 2. Seasonal decomposition (+ any model) 3. Exponential smoothing 4. ARIMA, SARIMA 5. GARCH 6. Dynamic linear models 7. TBATS 8. Prophet 9. NNETAR 10. [LSTM](https://github.com/davide-burba/forecasting_models/blob/master/python_models.ipynb) - 範例程式碼 :+1: :100: https://github.com/davide-burba/forecasting_models/blob/master/python_models.ipynb - ### [Forecasting complex seasonal timeseries](https://www.kaggle.com/c/forecasting-complex-seasonal-timeseries/overview) - [Intro do timeseries forecasting with python](https://machinelearningmastery.com/introduction-to-time-series-forecasting-with-python/) - [An Introduction to Time Series Forecasting with Python](https://www.researchgate.net/publication/324889271_An_Introduction_to_Time_Series_Forecasting_with_Python) (PDF) - ### [7 methods to perform Time Series forecasting (with Python codes)](https://www.analyticsvidhya.com/blog/2018/02/time-series-forecasting-methods/) - Method 1 – Start with a Naive Approach - Method 2 – Simple average - Method 3 – Moving average - Method 4 – Single Exponential smoothing - Method 5 – Holt’s linear trend method - Method 6 – Holt’s Winter seasonal method - Method 7 – ARIMA <br> <hr> <br> ## 衡量指標 ### R^2^ - [[Hackmd] 迴歸 Regression / R2](https://hackmd.io/SAfD0J0YQr68ojV5yDdtoQ#R2) ![](https://i.imgur.com/YVKKM2N.png) - ### R^2^:殘差值的評估 - 殘差趨近於 0, R^2^ 則趨近於 1 - baseline: 拿平均值當作基本標準 - R^2^ 小於 0, 表示模型爛掉,比平均值預測還差 - TheCoecient of Determination(R^2^) ![](https://i.imgur.com/cpbw2qA.png) ### The MeanForecastError (MFE) ![](https://i.imgur.com/RmljMb1.png) ### The MeanSquaredError (MSE) ![](https://i.imgur.com/NQRzpBA.png) ### The Normalized MeanSquaredError (NMSE) ![](https://i.imgur.com/iAAecmq.png) ### Theil'sU ![](https://i.imgur.com/JdTwaFZ.png) A good forecast has the U close to zero <br> <hr> <br> ## 探索資料 - [Time Series Analysis - 時間序列模型基本概念:AR, MA, ARMA, ARIMA 模型](https://mropengate.blogspot.com/2015/11/time-series-analysis-ar-ma-arma-arima.html) - [時間序列的AI介紹](https://bc165870081.medium.com/ff250cfc2ff9) - Stride 步伐 - window-size 視窗大小 - [原文連結](https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/) - Model-1: Zero-Rule model - Model-2: LSTM Model (長短期記憶模型) - [7 libraries that help in time-series problems](https://towardsdatascience.com/7-libraries-that-help-in-time-series-problems-d59473e48ddd) - [5 Unexplored Python Libraries for Time Series Analysis](https://towardsdatascience.com/5-unexplored-python-libraries-for-time-series-analysis-e9375962fbb2) - [時間序列資料庫Timescale推出新雲端服務,簡化使用且提供高可擴展性](https://www.ithome.com.tw/news/147147) - [Day 24:銷售量預測(2) -- 『時間序列分析』技巧篇](https://ithelp.ithome.com.tw/articles/10195635?sc=pt) <br> <hr> <br> ## 參考資料 - [[Azure] 使用 Python 設定 AutoML 來訓練時間序列預測模型](https://docs.microsoft.com/zh-tw/azure/machine-learning/how-to-auto-train-forecast) - [[Kaggle][資料分析&機器學習] 第4.2講 : Kaggle競賽-共享單車需求預測(前17%排名)](https://medium.com/jameslearningnote/505ed7100825) - [TimeSeries Analysis 📈A Complete Guide 📚](https://www.kaggle.com/andreshg/timeseries-analysis-a-complete-guide) - [[LSTM] Time Series Prediction with LSTM Recurrent Neural Networks in Python with Keras](https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/) - [[LSTM][MLP] 中低溫餘熱及壓差發電系統技術開發與應用計畫](https://km.twenergy.org.tw/KnowledgeFree/knowledge_more?id=8344)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully