sea120424
    • 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
    # Fintech Midterm Online Board (2023 Fall) Q: 範例問題 A1: 範例答案 A2: 範例答案 ... > 範例評論 ------ Q: 有關於lift chart的部分 因為對於lift chart看到好像還是不是很明瞭,所以打了這篇 假設我們有個random-guess的分類器,和一個"穩定"90%精確的模型 資料集有N=750,P=250,用分成10個bin的方式畫圖。 A1: bin1(抓10%的資料): random的部分會由 75個N和25個P組成,90%精確會是10個N和90個P組成。 bin2(抓20%的資料):同上。 bin3(抓30%的資料):這裡開始出現變化,random在這個點還是抓100個,組成是75個N和25個P,但是90%精確的模型,因為在這個bin中,所有的P都被抓完了,這個bin就收集所有剩下的P,剩下的由N填補。也就是70個P和30個N。 bin4(抓40%的資料):這邊ramdon還是一樣,但是因為P前面30%的資料全部都收集了,後面全部都強制是N。 bin5-10,和4都一樣了。 這樣有每一個bin累積的N和P(FP,TP),沒有被抓到的N和P(TN,FN),累積recall和precision就可以畫出來了。 > 如果我理解有誤的話麻煩請同學糾正。 >> 看起來是對的 >>> 我的理解是: 每個 bin 的資料數, 應是按照總資料數平均分配的, 依照你的案例應是每次都抓 100 筆, 每次抓取的人數分配(P:N), 在人數比例滿足 precision 的分配時, 都由模型的 precision 決定, 不足時 precision 就會下降(因為 N 變多了) 所以, 到 bin3, 90% 精確的模型應該是 70(=250-90-90)筆 P + 30 筆 N, 計算出的 precision 為 70%, 不再是 90% 了, 但這時的 recall 是 100%(=((90+90)/250{前2次} + 70/250{第3次})* 100) 題外話: 我們在計算時都從上帝視角看問題, 感覺 precision 下降是奇怪的, 但是如果從機器的角度看應是合理的, 因為它總是拿它手上的資料來算結果 乍看是模型精確度變差(跟假設不符), 但過程中 recall 是一直上升, 直到所有的 P 都被抓完而導致 "看起來" 變差 Q:想問一下關於One-pass ranking的方式進行search,為什麼需要2d-1次計算啊?全部算一次然後排序不是也才d次嗎? > 全部算一次 d ,前二好 1 次,前三好 1 次 ... 前 d 好一次 = 2d - 1 >> 前二好 1 次是為了確定用兩個的performance有比只用一個的好嗎? >>> one-pass 的計算過程會算出最好的 feature 然後把前二好的 feature 結合算一次結果, 然後把前三好的 feature 結合算一次結果 ... 以此類推 Q: 想問一下10/18小考第21題是怎麼算的。 題目是: 按單期二元定價模型,若期初股價為1元,一季內上漲與下跌幅度皆為10%,履約價亦為1元,無風險利率為0,一季後到期的歐式賣權的理論價格應為? > 可以用 10/18 投影片(Intro. to Financial Engineering) P39 的 P0 公式計算, 其中因為 r=0, 所以 exp(r* dt) = 1, 因為 x=1 元到第 2 期會分叉成, 跌 xd=0.9(=1-10%)=> d=0.9 跟漲 xu=1.1(=1+10%) => u=1.1 兩個分支, 履約價 K = 1, 根據 (xd-K)^+ 的定義, xd=0.9 < K=1, 所以第二項為 0, 只看第一項的話就剩 (1-d)/(u-d)*(1.1-1)=(1-0.9)/(1.1-0.9)*0.1=0.05 Q: 請問Quiz 1 第三題怎麼算,答案是否有誤? > 每天的報酬率分別是 [1 / 5, 1 / 6, - 1 / 7, 2 / 6] > 可以算出每天的平均報酬率是 0.139285714 > 然後可以按照標準差公式算出每天的標準差是 0.201407556 > 所以算出每天的 sharpe ratio 為 (平均報酬 - 每天無風險) / 每天的標準差 > = (0.139285714 - 0.01 / 252) / 0.201407556 = 0.691364486 > 一年估計有 252 天,所以把每天的 sharpe ratio 乘上根號 252 就是 10.975 也就是每年的 sharpe ratio Q: 想請問 Quiz 7 的第六題,(2 / 5 + 2022) mod 7 為什麼答案是 5 而不是 6 呢? > 5 對於 7 的 mod inverse 是 3(因為 5 * 3 mod 7 = 1) > 所以 (2 / 5 + 2022) mod 7 會變成 (2 * 3 + 2022) mod 7 也就是 2028 mod 7 = 5 Q: Which is a generator of the cyclic group G = (Z17*, × mod 17)? 請問這題找generator時只能暴力解每個選項慢慢試嗎? > generator的order會等於群的成員個數,因此 > If g is a generator of group G, then $g^a \not\equiv 1 (\mod\ |G|)$ for $a\ |\ |G|$ and $a \ne |G|$. > 以這題為例,g的2、4、8次方都不能是1,也就是說只要驗證這幾個次方就好了。 > 舉例來說,檢查2是不是generator時,$2^2 \equiv 4 \not\equiv 1$,$2^4 \equiv 16 \not\equiv 1$,如果要算$2^8$可能會比較麻煩,這時候可以考慮$2^4 \equiv -1$,所以$2^8 \equiv -1 \times -1 \equiv 1$,所以2不是G的generator。 >> 記得老師有提到 Lagrange’s Theorem, 當存在 generator 時表示 G 可以被等分切割, 本例中 $\mid G \mid = 17-1=16$, 可因式分解成 2,4,8,16, 因為 Eluer 小定理的關係, 所以只要檢查 $a^{2,4,8} \not\equiv 1$ 即可, 可以觀察到 $15 \equiv -2$(mod 17), $13 \equiv -4$(mod 17), 剛好 2,4,8 都是偶數, 所以只要算一半, 其中比較特殊的是 14, 所以明天搞不好先算一下哪個比較特殊, 然後再驗算一次應該可以了 Q: 請問 Performance indices 投影片中,是如何計算出 Chinese and English 的 55.7% 的MER? > 中文以字的層級拆開,英文以詞的層級拆開,groundtruth處理完可以得到「我 有 點 喜 歡 iPhone」,共6個字。 > 正確:我 有 點 喜 歡 iPhone > 預測:我 優 點 喜 歡 哀 鳳 > 優 → 有 > 哀 → iPhone > 鳳 → X > 共有3個錯誤。 > 因此MER$=\frac{3}{6}=0.5$,應該是50%才對。 >> 這不是算錯誤喔, 是要看 D(刪除) + I(插入) + S(替換), 幾個字/詞, 才能讓 ASR matched groundtruth, 以這個例子(MER: CH-字, EN-詞)來說, >> D:哀, S: 優->有, 鳳->iPhone, 3 = 1(D) + 2(S), 分母 6=5(CH)+1(EN) Q: 請問Quiz 3第4題(b)怎麼算? >我的理解如下,有錯煩請糾正: >因為$\rho_{12}=-1$,所以他會有點像是以y軸做鏡面,找一條入射線與反射線分別通過 >Asset1(0.15,0.2)以及Asset2(0.25,0.3),這時候你可以直接把(0.15,0.2)這個點對y軸做鏡射 >得到(-0.15,0.2),然後這點和Asset2連成的直線的斜率$m = \frac{0.3-0.2}{0.25-(-0.15)}= 0.25$就會是答案 Q:請問Quiz5的21題如何計算? > 請參考 "Q: 想問一下10/18小考第21題是怎麼算的。" Q:請問Quiz10,問題6C,same-gender height-dependent linear interpolation怎麼計算? 不好意思沒聽到老師上課一開始講的方法 >題目的意思是, 參考同性別的做 height 為 x, weight 為 y 的線性插值, 因為 index=5 的性別是女, 所以要參考 index=2,6,7 來估算 X1, 其中 因為 5 的身高介於 6 跟 7 中間, 所以獲得方程式: (164-148)/(168-148) = (X1-35)/(55-35) => X1 = 51

    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