FANFNA
    • 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

      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.
      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
    • 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 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

    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.
    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
    # Hw3 ## Missing data ### Replace missing value 因為這一筆資料及當中沒有missing value 所以我們補missing 數值的時候並不會有任何變化 ## Sampling :::success Resample(重新取樣)在監督式學習中的應用: 在監督式學習中,我們通常有帶有標籤的訓練數據,用於訓練機器學習模型。有時,數據集可能不平衡,即某些類別的示例數量明顯少於其他類別。這可能導致模型對多數類別的預測效果較好,但對少數類別的效果較差。 在這種情況下,"Resample" 可以用來調整訓練數據的分佈,以使每個類別的示例數量均衡。這可以通過過抽樣多數類別的示例或重複抽樣少數類別的示例來實現。 ::: ### Supervised Resample :::info 這邊我可以參照文件說明的方式 需要nominal 才可以使用這個分配不然請使用 unsupervised 分類 而我們可以看出來這邊具有三個種類的 屬於nominal 特性 1. Iris-setosa 50 50.0 2. Iris-versicolor 50 50.0 3. Iris-virginica 50 50.0 ::: 所以我們就是用supervised #### before ![](https://hackmd.io/_uploads/Hkmo53cg6.png) #### after :::info 我這邊調整一個參數 bias 1.0 所以資料的sample,分佈會向外靠攏一個標準差重新sample,所以看起來會有變重玉山變成小胖山 左右一個標準差都取樣為1.0 ::: ![](https://hackmd.io/_uploads/Syj_9hceT.png) :::info 只取右邊就是0.5會看到資料嚴重右傾斜 0.5 ::: ![](https://hackmd.io/_uploads/rkfZ02cg6.png) ### Unsupervised Resample :::warning 但是我們依舊可以使用unspuervise 的方法 但是我們可以發現效果並不明顯std 還是在 4.3 代表 unsupervised 對這個資料效果並不明顯,因為原本的分佈或密度就很均勻所以才會有這樣的結果。 ::: ![](https://hackmd.io/_uploads/Hkj4laqxa.png) ## Dimension reduction(PCA) ### Principal Components :::success 我們俗稱的PCA 這邊要使用PCA 知道pca 對資料有何影響 這邊我們把大維度的切個程為兩個DIM ![](https://hackmd.io/_uploads/H10nVioeT.png) ::: ![](https://hackmd.io/_uploads/ByGKrojgT.png) 因為這是在計算資料之間的共變細數,所以我們可以發現大致上分成兩個類別,就是共變數特別高的,以及 共變數為負數的兩群,但是多數還是為負數,所以我們做PCA 要找出其中的花蕊長度,跟花瓣長度關係是小的。 ## Attribute selection ## Discretization :::info Data discretization refers to a method of converting a huge number of data values into smaller ones' 把資料從連續的階段轉換為離散的階段 ::: ### Supervise Attribute Discretize :::info 依據,屬性來分類,可以用樹狀圖來思考,我們可以做幾個比例來觀察結果。 ::: 我這邊來做10%來切分之後會大致上區分成3類別 :::success ![](https://hackmd.io/_uploads/HkteZnieT.png) ::: ### Unsupervised Attribute Discretize :::info 單純依據數值來分配 ::: :::success 把資料依據間距拉出來來做切分,我們可以看出我們是依據B10來作為切分 ![](https://hackmd.io/_uploads/ry1t13sea.png) ::: ## Binarize ### Supervise Attribute Nominal to binary 因為這iris 資料沒有Nominal資料 所以我們沒有辦法轉成binary using the one-attribute-per-value approach ### Unsupervised Attribute Nominal to binary 因為這iris 資料沒有Nominal資料 所以我們沒有辦法轉成binary ### Unsupervised Attribute Numerical to binary :::info 我們這邊會發現一些很有趣得結果 ::: :::success 只有有數值與沒有數值兩類 ::: ![](https://hackmd.io/_uploads/SyY24hse6.png) ## Standardize ### Unsupervised Attribute Standardize(都有操作過) 因為iris 數值都是連續不需要Standardize 結果還是一樣,不會有變化 ## Normalize ### Unsupervised Instance Normalize(都有操作過了) 更不需要標準化,標準化之後並不會有什麼變化 ## Type Transform ### Unsupervised Attribute String to Nominal 因為IRIS 也沒有String 的資料所以我們一樣看不出變化就算操作之後 以下是我的 TeamViewer ID 號碼與連線密碼。 請使用它們與我開始遠端技術支援工作階段。 TeamViewer ID: 1 942 601 966 您的密碼: wcnen6jk

    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

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    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