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

    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
    # 資料視覺化期中報告 [Toc] ## 注意事項 💩💩💩 * 做基本描述性統計(透過單一變數來和分布 ex.年紀) * 報告不能只有圖,要有文字說明 * **四張圖**(分群、相關、圓餅圖、長條圖) ## 變數 💩💩💩 - Age 年紀: - 區間 ex 11 ~ 20、21 ~ 30 - Occupation 職業: - 區間 - Monthly_Inhand_Salary 每個月薪資(USD): - 區間 ex 200 ~ 299 USD、300 ~ 399 USD - Interest_Rate 利率(%): - 相關 - Num_of_Loan 借貸次數: - 相關 - Type_of_Loan 借貸類型: - 區間 - Delay_from_due_date 延遲還款多久(DAYs): - 相關 - Num_of_Delayed_Payment 延遲還款平均次數: - 相關 - Outstanding_Debt 借貸剩多少要還(USD): - 區間 - Total_EMI_per_month 每個月最低要還多少錢(USD): - 區間 - Amount_invested_monthly 每個月投資金額(USD): - 區間 - Payment_Behaviour 消費行為: - 區間 - Monthly_Balance 每個月的餘額(USD): - 區間 ## 團隊分工 💩💩💩 || **汪冠儀** | **蘇庭玉** |**張晏菘**|**張曜翔**|**趙洸佑**| |--------| -------- | -------- | -------- | -------- | -------- | |**圓餅**|💩|💩|✔️|💩|💩| |**分群**|💩|✔️|💩|💩|💩| |**相關**|💩|💩|💩|✔️|💩| |**長條**|✔️|💩|💩|💩|💩| |**模型**|💩|💩|💩|💩|✔️| ## 資料故事背景與目標說明 故事背景: 假設我們在一家全球金融公司擔任數據科學家,這家公司長年以來致力於收集銀行的基本資料以及大量與信用相關的資訊,在此同時老闆希望建立出一套能夠列出借貸人信用評分等級的系統,以減少人工審核的程序。 目標: 透過資料所提供的借貸人信用相關資訊,建立一個能夠將信用評分進行分類的模型。 ## 資料說明與前處理過程 資料說明: 訓練資料有28個欄位,每個欄位都有100000筆顧客資料,每個顧客有1~8月的借貸資訊,包括:ID、名字、年齡、職業、收入、借貸次數、借貸項目、信用等級等...... 測試資料有27個欄位,每個欄位有50000筆顧客資料,資料內容與訓練資料相同 前處理過程: 查看資料之後,發現有缺失的資料、異常的數字、亂碼、底線等......,將它們處理後,把文字的部分轉為數值,最後只留下我們需要的欄位 ## 降維與分群法應用 使用年齡、每月收入、借貸次數、延遲幾天還款和延遲幾次還款做分群及降維 分別做了kmeans和dbascan的分群,kmeans和dbscan的差別在於dbscan分群時某些點密集度不夠高的話會判斷為noise並且將這些點排除掉 以下是用kmeans做分群: ![](https://i.imgur.com/bGrRBzp.png) 以下是用dbscan做分群: db_target = -1為noise ![](https://i.imgur.com/egyUhAI.png) 以下是用pca做降維,以職業當作label: ![](https://i.imgur.com/JnFKirO.png) 以下是kmeans搭配pca所做的分群,可以清楚看到明顯分成三群 ![](https://i.imgur.com/4u8DzXz.png) 以下是dbscan搭配pca所做的分群,也可以清楚看到明顯分成三群,只是dbcan群裡各自的關係比kmeans更密集 ![](https://i.imgur.com/m2ucUmj.png) ## 機器學習 KNN 💩💩💩 ![](https://i.imgur.com/gkeZJ3X.png) - f1-score : 精確率和召回率的調和平均數。 - ![](https://i.imgur.com/zm7lEC3.png) - support : 測試集樣本的總數量 ### 模型評估指標 💩💩💩 ![](https://i.imgur.com/no82t48.png) ### 混淆矩陣 💩💩💩 ![](https://i.imgur.com/d5utVfY.png) ![](https://i.imgur.com/teynf5b.png) ## 預測 ![](https://i.imgur.com/4e6ISts.png) ``` python # 測試 data,信用分數為 3 arr = np.array([[23,13,19114.12,1824.84,3,4,3,7,809.98,49.57,80.42,3,312.49]]) ``` ## 10項分析(圖表)(提出問題以圖表及文字分析) ![](https://i.imgur.com/csnqwLE.jpg) ![](https://i.imgur.com/naHx1Tr.jpg) ![](https://i.imgur.com/ATHepRe.jpg) ![](https://i.imgur.com/AcbKeKs.jpg) ![](https://i.imgur.com/qqKqepj.jpg) ![](https://i.imgur.com/nl3cb8N.jpg) ![](https://i.imgur.com/hiVZjll.jpg) ![](https://i.imgur.com/dG8DA14.png) ![](https://i.imgur.com/xKVrnbr.png) ![](https://i.imgur.com/Qazmooy.png) ![](https://i.imgur.com/XffP8DM.png) ![](https://i.imgur.com/JVcuxWT.png) 兩個變數 ![](https://i.imgur.com/iiPibwU.png) ![](https://i.imgur.com/QxwjdjF.png) ![](https://i.imgur.com/8WLXFgH.png) ![](https://i.imgur.com/iYRGvrd.png) ![](https://i.imgur.com/6DlClhA.png) 加入第三者 借貸次數和延遲還款多久 教師 ![](https://i.imgur.com/zgzbOaF.png) 科學家 ![](https://i.imgur.com/3bMMJkB.png) 借貸次數和延遲還款平均次數 教師 ![](https://i.imgur.com/qLWaBSg.png) 科學家 ![](https://i.imgur.com/1eGR106.png) 利率和延遲還款多久 教師 ![](https://i.imgur.com/ykRW5pS.png) 科學家 ![](https://i.imgur.com/Bd2Gq9D.png) 利率和延遲還款次數 教師 ![](https://i.imgur.com/l1MC14n.png) 科學家 ![](https://i.imgur.com/A7plPRW.png) 利率和借貸次數 教師 ![](https://i.imgur.com/D1Sw0w9.png) 科學家 ![](https://i.imgur.com/JWYxPPF.png)

    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