李柏昇
    • 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
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • 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
    • Engagement control
    • 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
Engagement control 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
Engagement control Commenting, Suggest edit, Emoji Reply
  • 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
    # 各機器學習方法發展與介紹 ## 時間序列 ### 時間序列的應用主要分為以下兩種: * **預測:** 基於過去的時間序列來**預測**未來的時間序列, 若中間序列有缺失,也能利用方法對缺失值進行補遺。 **如: 自回歸滑動平均(Autoregressive moving average, ARMA)** ![](https://i.imgur.com/lP0FVKi.png) * **分析:** 將整個時間序列基於季節性、趨勢、雜訊進行分離, 借此觀察時間序列有無趨勢或混波現象,也能夠用於濾除雜訊。 **如: 奇異譜分析(Singular Spectrum Analysis, SSA)** ![](https://i.imgur.com/cau2s1B.png) ![](https://i.imgur.com/5YcfBfZ.png) ## 分類方法 ### 分類方法主要分為以下五種: * **關聯性方法:** *計算樣本間的距離(如:歐式距離、曼哈頓距離等...),將距離較近的樣本分類為同類別。 **如:最近鄰居法(K-Nearest Neighbors, KNN)** ![](https://i.imgur.com/BXZcG6E.png) * **線性模型:** **樸素貝氏分類(Naive Bayes, NB)** 假設特徵間彼此不相關,並計算每個樣本的類別先驗機率,將最高機率的類別標記給樣本。 ![](https://i.imgur.com/EfrjE8Q.png) **支援向量機(Support Vector Machine, SVM)** 利用樣本間的距離,將樣本利用核函數投影至高維度,並建立超平面區分樣本,使超平面盡可能區分更多樣本。 ![](https://i.imgur.com/nQLBdf0.png) * **樹模型:** **ID3:** 基於信息熵計算信息增益,利用信息增益最多的特徵分裂樹節點。 **C4.5:** 改進ID3的版本,增加信息增益率改善ID3容易將分裂點給予特徵類別較多的特徵 **CART:** 能夠進行分類與迴歸的二元樹模型,基於基尼係數(Gini index)使計算更有效率,是許多集成模型的基本單位。 ![](https://i.imgur.com/uguifjN.png) * **集成模型:** 利用多個弱分類器(如:CART)組合而成進行分類,最後結果通常由所有弱分類器投票所得。 **如:梯度提升決策樹(Gradient Boosting Decision Tree,GBDT)** ![](https://i.imgur.com/93kZcof.png) * **神經網路模型:** 多個神經元組合成神經網路,利用反向傳播更新神經元權重,神經元具有一定程度的特徵選取能力。 **CNN:** 通常應用於影像辨識,利用卷積層或池化對圖片進行降維後,在最後接上全連接層進行影像分類。(CNN的概念更早就被提出,圖裡面懶得改) ![](https://i.imgur.com/y9NLLhr.png) **DNN:** 使用多層全連接層進行訓練,通常應用於數據資料分類。 ![](https://i.imgur.com/WiwWhGR.png) **LSTM:** 常應用於與時間有相關性的項目,對影片、音樂、時間序列分類與處理均有較佳的表現,與一般神經網路差別是LSTM的神經元具有記憶能力,因此相同的輸入也會有不同的輸出。 ![](https://i.imgur.com/hbwoGYb.png) ![](https://i.imgur.com/CYGagg8.png) ## 分群方法 ### 分群方法主要分為以下四種: (以下分群GIF均為二維,高維度的情況無法可視化也容易造成維度災難。) **階層式:** 先將每個樣本都當成一個群體,之後對周遭的群體開始合併,直到群的數量達到設定的數。(凝聚式) **如: AGNES** ![](https://i.imgur.com/PWDzocs.gif) **密度式:** 根據樣本間的密度合併資料,需要設定距離與樣本數,如果在距離內的樣本數大於或等於設定的樣本數,則將其分為一群,具有剔除離群點的功能,也能夠自動判斷有幾個群聚。 **如: DBSCAN** ![](https://i.imgur.com/ZqUUvO3.gif) **切割式:** 需要設定起始中心點的位置與中心點數量,計算樣本與中心點的距離,與該中心點距離最近的樣本則為該群,中心點更新方式則是使用隸屬值來移動中心點。 **如: K-means** (如果圖不會動就F5) ![](https://i.imgur.com/kJwxWvM.gif) **格子式:** 無須設定中心點即可判斷有幾個群聚的方法,二維的情況下對樣本周圍生成座標點,在判斷最近的樣本核心來更新座標點,直到所有座標點均收歛至各樣本群核心點時停止,最後與該座標點最近的樣本則為同一群。**如: STING** ![](https://i.imgur.com/aOLtCCc.gif) 分群方法屬於無監督式學習,也較少優劣之分,應用則需要都嘗試看看。 (下面這張圖是威翔做的) ![](https://i.imgur.com/EE8WeS6.png) ## 優化算法 ### 優化算法主要分為...有點多 懶得寫了 優化算法是拿來解決最佳化問題(如:背包問題,TSP問題)用的,在機器學習上通常用來尋找參數或特徵選取,藉由最後所產生的目標函數來改變輸入數值藉此最小化(或最大化)目標函數的方法。 **PSO:** 優化算法介紹都很麻煩 自己找(粒子群演算法) (下圖為尋找二維向量中的最低點) ![](https://i.imgur.com/HeD7FOG.gif) **GA:** 交叉、變異等方法來最佳化。(基因演算法) (下圖為TSP問題,尋找最短路徑) ![](https://i.imgur.com/whUN0qN.gif) 優化算法發展圖 ![](https://i.imgur.com/kZq3hqw.png) 有趣的是PSO到現在還很多人用 1991~2001那邊 之前用2016年的鯨群演算法(WOA),然後對兩個測試函數進行測試 分別為Sphere函數與Restrigin函數(測試時為30維),結果如下: (下圖表示兩種方法對函數的收歛速度) ![](https://i.imgur.com/OKiCf9A.png) 可以發現,WOA收歛速度比PSO快非常多。 ![](https://i.imgur.com/PpFMV9x.png) 在運行時間與收歛值上也是WOA更佳。 # 迴歸方法(有空在補)

    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