From b883c3f353134d8b8d5ef63ca062d4a3e9c032be Mon Sep 17 00:00:00 2001 From: jungin7612 Date: Sun, 27 Jul 2025 01:54:57 +0900 Subject: [PATCH 1/8] fix yml --- Gemfile.lock | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++ _config.yml | 50 +++++++------- 2 files changed, 208 insertions(+), 25 deletions(-) create mode 100644 Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000000..202306eae6 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,183 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (8.0.2) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + base64 (0.3.0) + benchmark (0.4.1) + bigdecimal (3.2.2) + colorator (1.1.0) + concurrent-ruby (1.3.5) + connection_pool (2.5.3) + csv (3.3.5) + drb (2.2.3) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.17.2-aarch64-linux-gnu) + ffi (1.17.2-aarch64-linux-musl) + ffi (1.17.2-arm-linux-gnu) + ffi (1.17.2-arm-linux-musl) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86_64-darwin) + ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.2-x86_64-linux-musl) + forwardable-extended (2.6.0) + gemoji (4.1.0) + google-protobuf (4.31.1) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-aarch64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-aarch64-linux-musl) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-x86_64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.31.1-x86_64-linux-musl) + bigdecimal + rake (>= 13) + html-pipeline (2.14.3) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.8.0) + i18n (1.14.7) + concurrent-ruby (~> 1.0) + jekyll (4.4.1) + addressable (~> 2.4) + base64 (~> 0.2) + colorator (~> 1.0) + csv (~> 3.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + json (~> 2.6) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (~> 0.3, >= 0.3.6) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-feed (0.17.0) + jekyll (>= 3.7, < 5.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-sass-converter (3.1.0) + sass-embedded (~> 1.75) + jekyll-watch (2.2.1) + listen (~> 3.0) + jemoji (0.13.0) + gemoji (>= 3, < 5) + html-pipeline (~> 2.2) + jekyll (>= 3.0, < 5.0) + json (2.13.1) + kramdown (2.5.1) + rexml (>= 3.3.9) + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + logger (1.7.0) + mercenary (0.4.0) + minitest (5.25.5) + nokogiri (1.18.9-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-musl) + racc (~> 1.4) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (6.0.2) + racc (1.8.1) + rake (13.3.0) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) + rexml (3.4.1) + rouge (4.6.0) + safe_yaml (1.0.5) + sass-embedded (1.89.2-aarch64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-aarch64-linux-musl) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-arm-linux-gnueabihf) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-arm-linux-musleabihf) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-arm64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-x86_64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-x86_64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.89.2-x86_64-linux-musl) + google-protobuf (~> 4.31) + securerandom (0.4.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.6.0) + uri (1.0.3) + webrick (1.9.1) + +PLATFORMS + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-gnueabihf + arm-linux-musl + arm-linux-musleabihf + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl + +DEPENDENCIES + jekyll + jekyll-feed + jekyll-readme-index + jemoji + webrick + +BUNDLED WITH + 2.6.2 diff --git a/_config.yml b/_config.yml index f4c1c9c7a2..a0afb0e02b 100644 --- a/_config.yml +++ b/_config.yml @@ -1,47 +1,47 @@ # Configurations -title: Jekyll Gitbook -longtitle: Jekyll Gitbook -author: HE Tao -email: sighingnow@gmail.com +title: Deeplearning_basic_math +longtitle: Deeplearning_basic_math +author: Jeongin Kim +email: jungin7612@gmail.com description: > Build Jekyll site with the GitBook style. -version: 1.0 -gitbook_version: 3.2.3 +version: 1.0 +gitbook_version: 3.2.3 -url: 'https://sighingnow.github.io' -baseurl: '/jekyll-gitbook' -rss: RSS +url: "https://jungin7612.github.io" +baseurl: "/Deeplearning_basic_math" +rss: RSS # bootstrap: use the remote theme for the site itself remote_theme: sighingnow/jekyll-gitbook toc: enabled: true - h_min: 1 - h_max: 3 + h_min: 1 + h_max: 3 # customize the link favicon in header, will be {{site.baseurl}}/{{site.favicon_path}} -favicon_path: /assets/gitbook/images/favicon.ico +favicon_path: /assets/gitbook/images/favicon.ico # markdown render engine. -markdown: kramdown +markdown: kramdown kramdown: - auto_ids: true - input: GFM - math_engine: mathjax - smart_quotes: lsquo,rsquo,ldquo,rdquo - toc_levels: 1..6 - syntax_highlighter: rouge + auto_ids: true + input: GFM + math_engine: mathjax + smart_quotes: lsquo,rsquo,ldquo,rdquo + toc_levels: 1..6 + syntax_highlighter: rouge syntax_highlighter_opts: - guess_lang: true + guess_lang: true syntax_highlighter_style: colorful -markdown_ext: markdown,mkdown,mkdn,mkd,md +markdown_ext: markdown,mkdown,mkdn,mkd,md # Permalinks -permalink: /:categories/:year-:month-:day-:title:output_ext +permalink: /:categories/:year-:month-:day-:title:output_ext # Disqus comments # disqushandler: sighingnow @@ -64,9 +64,9 @@ ordered_collections: page_width: 800px -destination: ./_site -incremental: false -regenerate: true +destination: ./_site +incremental: false +regenerate: true plugins: - jekyll-feed From da4383d83c0839554e1675bcf3c73ab596a26ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=A0=95=EC=9D=B8?= <62785051+jungin7612@users.noreply.github.com> Date: Sun, 27 Jul 2025 02:02:29 +0900 Subject: [PATCH 2/8] Create jekyll.yml --- .github/workflows/jekyll.yml | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/jekyll.yml diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml new file mode 100644 index 0000000000..501686bcc9 --- /dev/null +++ b/.github/workflows/jekyll.yml @@ -0,0 +1,65 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Ruby + # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 + uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From ce08a5a987391d97e9d74cdb7f8eec5d855c472f Mon Sep 17 00:00:00 2001 From: jungin7612 Date: Sun, 27 Jul 2025 02:05:36 +0900 Subject: [PATCH 3/8] fix yml --- .github/workflows/jekyll.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 501686bcc9..f0b865c682 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -37,7 +37,7 @@ jobs: # https://github.com/ruby/setup-ruby/releases/tag/v1.207.0 uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 with: - ruby-version: '3.1' # Not needed with a .ruby-version file + ruby-version: "3.2.2" # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems - name: Setup Pages From 1e06c86a22f9b24bdb600774c47505d1eb03af65 Mon Sep 17 00:00:00 2001 From: jungin7612 Date: Sun, 27 Jul 2025 03:04:30 +0900 Subject: [PATCH 4/8] Update README and restructure posts for deep learning math course. Changed title and content to reflect new focus, added sections on topics covered, and reorganized post titles and categories for clarity. Removed outdated posts related to previous themes. --- README.md | 241 ++------------------- _posts/2019-04-27-why.md | 4 +- _posts/2019-04-28-howto.md | 10 +- _posts/2019-04-29-license.md | 68 +++++- _posts/2021-08-10-toc.md | 118 +++++----- _posts/2022-05-24-page_cover.md | 2 +- _posts/2022-06-26-wide_tables.md | 36 --- _posts/2022-06-30-tips_warnings_dangers.md | 67 ------ _posts/2023-08-31-mermaid.md | 73 ------- _posts/2023-10-14-math-latex.md | 47 ---- _posts/2023-12-12-footnotes.md | 125 ----------- 11 files changed, 144 insertions(+), 647 deletions(-) delete mode 100644 _posts/2022-06-26-wide_tables.md delete mode 100644 _posts/2022-06-30-tips_warnings_dangers.md delete mode 100644 _posts/2023-08-31-mermaid.md delete mode 100644 _posts/2023-10-14-math-latex.md delete mode 100644 _posts/2023-12-12-footnotes.md diff --git a/README.md b/README.md index fbe2938a01..273443dddd 100644 --- a/README.md +++ b/README.md @@ -1,235 +1,36 @@ --- layout: home -title: Jekyll Gitbook Theme +title: Deeplearning basic math permalink: / --- -Make Jelly site have a GitBook look! +# 연세대학교 학생들을 위한 딥러닝 기초 수학 -## Demo +## 저자 서문 -Live demo on Github Pages: [https://sighingnow.github.io/jekyll-gitbook](https://sighingnow.github.io/jekyll-gitbook) +딥러닝 기초 수학 과목을 선행하면서 내용을 정리하려고 만들었습니다. 연세대 학생 모두에게 큰 도움이 되길 바라며 저작권 문제가 있을 시 글 배포를 중지하겠습니다. -[![Jekyll Themes](https://img.shields.io/badge/featured%20on-JekyllThemes-red.svg)](https://jekyll-themes.com/jekyll-gitbook/) +이 문서의 전반적인 내용은 노알버트 교수님의 딥러닝 기초 수학 [CAS3230]을 바탕으로 하고 있습니다. -## Why Jekyll with GitBook +## 다루는 내용들 -GitBook is an amazing frontend style to present and organize contents (such as book chapters -and blogs) on Web. The typical to deploy GitBook at [Github Pages][1] -is building HTML files locally and then push to Github repository, usually to the `gh-pages` -branch. It's quite annoying to repeat such workload and make it hard for people do version -control via git for when there are generated HTML files to be staged in and out. +| idx | Title | Book | Lecture | Slide | +| :-: | :----------------: | :-----------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------: | +| 0 | Introduction | [Page](https://convex-optimization-for-all.github.io/contents/chapter01/) | [CMU Lecture](https://www.youtube.com/watch?v=XFKBNJ14UmY&ab_channel=RyanT) | [CMU Note](http://www.stat.cmu.edu/~ryantibs/convexopt-F16/lectures/intro.pdf) | +| 1 | Probability Review | [Page](https://convex-optimization-for-all.github.io/contents/chapter02/) | [Stanford Lecture](https://www.youtube.com/watch?v=P3W_wFZ2kUo&list=PL3940DD956CDF0622&index=3&ab_channel=Stanford) | [Stanford Note](https://web.stanford.edu/class/ee364a/lectures/sets.pdf) | +| 2 | Information Theory | [Page](https://convex-optimization-for-all.github.io/contents/chapter03/) | [Stanford Lecture](https://www.youtube.com/watch?v=kcOodzDGV4c&list=PL3940DD956CDF0622&index=4&ab_channel=Stanford) | [Stanford Note](https://see.stanford.edu/materials/lsocoee364a/03ConvexFunctions.pdf) | +| 3 | Estimattion | [Page](https://convex-optimization-for-all.github.io/contents/chapter04/) | [CMU Lecture](https://www.youtube.com/watch?v=Gij3dlqLUN8&list=PLjbUi5mgii6AVdvImLB9-Hako68p9MpIC&index=5&ab_channel=RyanT) | [CMU Note](http://www.stat.cmu.edu/~ryantibs/convexopt-F16/lectures/convex-opt.pdf) | +| 4 | Optimization | [Page](https://convex-optimization-for-all.github.io/contents/chapter04/) | [CMU Lecture](https://www.youtube.com/watch?v=Gij3dlqLUN8&list=PLjbUi5mgii6AVdvImLB9-Hako68p9MpIC&index=5&ab_channel=RyanT) | [CMU Note](http://www.stat.cmu.edu/~ryantibs/convexopt-F16/lectures/convex-opt.pdf) | -This theme takes style definition out of generated GitBook site and provided the template -for Jekyll to rendering markdown documents to HTML, thus the whole site can be deployed -to [Github Pages][1] without generating and uploading HTML bundle every time when there are -changes to the original repo. +## 참고한 자료들 -## How to Get Started +- [Convex Optimization - Boyd and Vandenberghe](https://web.stanford.edu/~boyd/cvxbook/) +- [Stanford Convex Optimization Lecture 2014](https://www.youtube.com/playlist?list=PL3940DD956CDF0622) +- [CMU Convex Optimization Lecture 2016](http://www.stat.cmu.edu/~ryantibs/convexopt-F16/) +- [CMU Convex Optimization Lecture 2019](http://www.stat.cmu.edu/~ryantibs/convexopt/) -This theme can be used just as other [Jekyll themes][1] and support [remote theme][12], -see [the official guide][13] as well. +## 테마 -You can introduce this jekyll theme into your own site by either +- [gitbook](https://github.com/sighingnow/jekyll-gitbook) by [sighingnow](https://github.com/mdo) -- [Fork][3] this repository and add your markdown posts to the `_posts` folder. -- Use as a remote theme in your [`_config.yml`][14](just like what we do for this - site itself), - -```yaml -remote_theme: sighingnow/jekyll-gitbook -``` - -### Deploy Locally with Jekyll Serve - -This theme can be ran locally using Ruby and Gemfiles. - -[Testing your GitHub Pages site locally with Jekyll](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll) - GitHub - -## Full-text search - -The search functionality in jekyll-gitbook theme is powered by the [gitbook-plugin-search-pro][5] plugin and is enabled by default. - -[https://sighingnow.github.io/jekyll-gitbook/?q=generated](https://sighingnow.github.io/jekyll-gitbook/?q=generated) - -## Code highlight - -The code highlight style is configurable the following entry in `_config.yaml`: - -```yaml -syntax_highlighter_style: colorful -``` - -The default code highlight style is `colorful`, the full supported styles can be found from [the rouge repository][6]. Customized -style can be added to [./assets/gitbook/rouge/](./assets/gitbook/rouge/). - -## How to generate TOC - -The jekyll-gitbook theme leverages [jekyll-toc][4] to generate the *Contents* for the page. -The TOC feature is not enabled by default. To use the TOC feature, modify the TOC -configuration in `_config.yml`: - -```yaml -toc: - enabled: true - h_min: 1 - h_max: 3 -``` - -## Google Analytics, etc. - -The jekyll-gitboook theme supports embedding the [Google Analytics][7], [CNZZ][8] and [Application Insights][9] website analytical tools with the following -minimal configuration in `_config.yaml`: - -```yaml -tracker: - google_analytics: "" -``` - -Similarly, CNZZ can be added with the following configuration in `_config.yaml` - -```yaml -tracker: - cnzz: "" -``` - -Application Insights can be added with the following configuration in `_config.yaml` - -```yaml -tracker: - application_insights: "" -``` - -## Disqus comments - -[Disqus](https://disqus.com/) comments can be enabled by adding the following configuration in `_config.yaml`: - -```yaml -disqushandler: "" -``` - -## Jekyll collections - -Jekyll's [collections][15] is supported to organize the pages in a more fine-grained manner, e.g., - -```yaml -collections: - pages: - output: true - sort_by: date - permalink: /:collection/:year-:month-:day-:title:output_ext - others: - output: true - sort_by: date - permalink: /:collection/:year-:month-:day-:title:output_ext -``` - -An optional `ordered_collections` key can be added to `_config.yaml` to control the order of collections in the sidebar: - -```yaml -ordered_collections: - - posts - - pages - - others -``` - -If not specified, the order of collections would be decided by Jekyll. Note that the key `posts` is a special collection -that indicates the `_posts` pages of Jekyll. - -## Extra StyleSheet or Javascript elements - -You can add extra CSS or JavaScript references using configuration collections: - -- extra_css: for additional style sheets. If the url does not start by http, the path must be relative to the root of the site, without a starting `/`. -- extra_header_js: for additional scripts to be included in the `` tag, after the `extra_css` has been added. If the url does not start by http, the path must be relative to the root of the site, without a starting `/`. -- extra_footer_js: for additional scripts to be included at the end of the HTML document, just before the site tracking script. If the url does not start by http, the path must be relative to the root of the site, without a starting `/`. - -## Customizing font settings - -The fonts can be customized by modifying the `.book.font-family-0` and `.book.font-family-1` entry in [`./assets/gitbook/custom.css`][10], - -```css -.book.font-family-0 { - font-family: Georgia, serif; -} -.book.font-family-1 { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} -``` - -## Tips, Warnings and Dangers blocks - -The jekyll-gitbook theme supports customized kramdown attributes (`{: .block-tip }`, `{: .block-warning }`, -`{: .block-danger }`) like that displayed in [the discord.js website][11]. The marker can be used like - -```markdown -> ##### TIP -> -> This guide is last tested with @napi-rs/canvas^0.1.20, so make sure you have -> this or a similar version after installation. -{: .block-tip } -``` - -Rendered page can be previewed from - -[https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-06-30-tips_warnings_dangers.html](https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-06-30-tips_warnings_dangers.html) - -## Cover image inside pages - -The jekyll-gitbook theme supports adding a cover image to a specific page by adding -a `cover` field to the page metadata: - -```diff - --- - title: Page with cover image - author: Tao He - date: 2022-05-24 - category: Jekyll - layout: post -+ cover: /assets/jekyll-gitbook/dinosaur.gif - --- -``` - -The effect can be previewed from - -[https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-05-24-page_cover.html](https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-05-24-page_cover.html) - -## Diagrams with mermaid.js - -This jekyll-theme supports [mermaid.js](https://mermaid.js.org/) to render diagrams -in markdown. - -To enable the mermaid support, you need to set `mermaid: true` in the front matter -of your post. - -```markdown ---- -mermaid: true ---- -``` - -The example can be previewed from - -[https://sighingnow.github.io/jekyll-gitbook/jekyll/2023-08-31-mermaid.html](https://sighingnow.github.io/jekyll-gitbook/jekyll/2023-08-31-mermaid.html) - -## License - -This work is open sourced under the Apache License, Version 2.0. - -Copyright 2019 Tao He. - -[1]: https://pages.github.com -[2]: https://pages.github.com/themes -[3]: https://github.com/sighingnow/jekyll-gitbook/fork -[4]: https://github.com/allejo/jekyll-toc -[5]: https://github.com/gitbook-plugins/gitbook-plugin-search-pro -[6]: https://github.com/rouge-ruby/rouge/tree/master/lib/rouge/themes -[7]: https://analytics.google.com/analytics/web/ -[8]: https://www.cnzz.com/ -[9]: https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview -[10]: https://github.com/sighingnow/jekyll-gitbook/blob/master/gitbook/custom.css -[11]: https://discordjs.guide/popular-topics/canvas.html#setting-up-napi-rs-canvas -[12]: https://rubygems.org/gems/jekyll-remote-theme -[13]: https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme-to-your-github-pages-site-using-jekyll -[14]: https://github.com/sighingnow/jekyll-gitbook/blob/master/_config.yml -[15]: https://jekyllrb.com/docs/collections/ +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/_posts/2019-04-27-why.md b/_posts/2019-04-27-why.md index 81af6b7b61..56571459d0 100644 --- a/_posts/2019-04-27-why.md +++ b/_posts/2019-04-27-why.md @@ -1,5 +1,5 @@ --- -title: Why Jekyll with GitBook +title: 00. Introduction author: Tao He date: 2019-04-27 category: Jekyll @@ -17,4 +17,4 @@ for Jekyll to rendering markdown documents to HTML, thus the whole site can be d to [Github Pages][1] without generating and uploading HTML bundle every time when there are changes to the original repository. -[1]: https://pages.github.com \ No newline at end of file +[1]: https://pages.github.com diff --git a/_posts/2019-04-28-howto.md b/_posts/2019-04-28-howto.md index d1e9750fb1..3ceed511c8 100644 --- a/_posts/2019-04-28-howto.md +++ b/_posts/2019-04-28-howto.md @@ -1,5 +1,5 @@ --- -title: How to Get Started +title: 01. Probability Review author: Tao He date: 2019-04-28 category: Jekyll @@ -19,16 +19,16 @@ You can introduce this jekyll theme into your own site by either ```yaml # Configurations -title: Jekyll Gitbook -longtitle: Jekyll Gitbook +title: Jekyll Gitbook +longtitle: Jekyll Gitbook -remote_theme: sighingnow/jekyll-gitbook +remote_theme: sighingnow/jekyll-gitbook ``` > ##### TIP > > No need to push generated HTML bundle. -{: .block-tip } +> {: .block-tip } [1]: https://pages.github.com [2]: https://github.com/sighingnow/jekyll-gitbook/fork diff --git a/_posts/2019-04-29-license.md b/_posts/2019-04-29-license.md index 793e52a6ee..e7a49349f1 100644 --- a/_posts/2019-04-29-license.md +++ b/_posts/2019-04-29-license.md @@ -1,12 +1,72 @@ --- -title: License +title: 02. Information Theory author: Tao He date: 2019-04-29 category: Jekyll layout: post --- -This work is open sourced under the Apache License, Version 2.0, using the -same license as the original [GitBook](https://github.com/GitbookIO/gitbook) repository. +## 2.1 Entropy -Copyright 2019 Tao He. +long contents ..... + +1. a +2. b +3. c +4. d + +## 2.2 Properties of Entropy + +long contents ..... + +- 1 +- 2 +- 3 +- 4 + +## 2.3 Cross Entropy Loss + +long contents ..... + +1. e +2. f +3. g +4. h + +## 2.4 Jointly Distributed Random Variables + +### 2.4.1 Joint Entropy + +### 2.4.2 Conditional Entropy + +### 2.4.3 Mutual Information + +### 2.4.4 Properties of Mutual Information + +### 2.4.5 Conditional Mutual Information + +## 2.5 Random Process + +### 2.5.1 What is Markovian? + +### 2.5.2 1st Order Markov Process + +### 2.5.3 kth Order Markov Process + +### 2.5.4 Stationary Distribution + +### 2.5.5 Stationary Markov Process + +## 2.6 Continuous Random Variables + +### 2.6.1 Probability Density Function + +### 2.6.2 Gaussian + +### 2.6.3 Differential Entropy + +### 2.6.4 Properties of Differential Entropy + +### 2.6.5 Joint Differential Entropy + +### 2.6.6 Maximum Differential Entropy diff --git a/_posts/2021-08-10-toc.md b/_posts/2021-08-10-toc.md index 6ad1f81967..2291b17e1d 100644 --- a/_posts/2021-08-10-toc.md +++ b/_posts/2021-08-10-toc.md @@ -1,22 +1,21 @@ --- -title: How to Generate TOC +title: 03. Estimattion author: Tao He date: 2021-08-10 category: Jekyll layout: post --- -The jekyll-gitbook theme leverages [jekyll-toc][1] to generate the *Contents* for the page. +The jekyll-gitbook theme leverages [jekyll-toc][1] to generate the _Contents_ for the page. The TOC feature is not enabled by default. To use the TOC feature, modify the TOC configuration in `_config.yml`: ```yaml toc: - enabled: true + enabled: true ``` -Why this repo -------------- +## Why this repo long contents ..... @@ -31,18 +30,16 @@ long contents ..... ### Sub title 3 -Why this repo -------------- +## Why this repo long contents ..... -+ 1 -+ 2 -+ 3 -+ 4 +- 1 +- 2 +- 3 +- 4 -Why this repo -------------- +## Why this repo long contents ..... @@ -51,16 +48,14 @@ long contents ..... 3. g 4. h -Why this repo -------------- +## Why this repo -+ 5 -+ 6 -+ 7 -+ 8 +- 5 +- 6 +- 7 +- 8 -Why this repo -------------- +## Why this repo long contents ..... @@ -69,18 +64,16 @@ long contents ..... 3. c 4. d -Why this repo -------------- +## Why this repo long contents ..... -+ 1 -+ 2 -+ 3 -+ 4 +- 1 +- 2 +- 3 +- 4 -Why this repo -------------- +## Why this repo long contents ..... @@ -89,16 +82,14 @@ long contents ..... 3. g 4. h -Why this repo -------------- +## Why this repo -+ 5 -+ 6 -+ 7 -+ 8 +- 5 +- 6 +- 7 +- 8 -Why this repo -------------- +## Why this repo long contents ..... @@ -107,18 +98,16 @@ long contents ..... 3. c 4. d -Why this repo -------------- +## Why this repo long contents ..... -+ 1 -+ 2 -+ 3 -+ 4 +- 1 +- 2 +- 3 +- 4 -Why this repo -------------- +## Why this repo long contents ..... @@ -127,16 +116,14 @@ long contents ..... 3. g 4. h -Why this repo -------------- +## Why this repo -+ 5 -+ 6 -+ 7 -+ 8 +- 5 +- 6 +- 7 +- 8 -Why this repo -------------- +## Why this repo long contents ..... @@ -145,18 +132,16 @@ long contents ..... 3. c 4. d -Why this repo -------------- +## Why this repo long contents ..... -+ 1 -+ 2 -+ 3 -+ 4 +- 1 +- 2 +- 3 +- 4 -Why this repo -------------- +## Why this repo long contents ..... @@ -165,12 +150,11 @@ long contents ..... 3. g 4. h -Why this repo -------------- +## Why this repo -+ 5 -+ 6 -+ 7 -+ 8 +- 5 +- 6 +- 7 +- 8 [1]: https://github.com/allejo/jekyll-toc diff --git a/_posts/2022-05-24-page_cover.md b/_posts/2022-05-24-page_cover.md index 44a57e2fbe..661916e2df 100644 --- a/_posts/2022-05-24-page_cover.md +++ b/_posts/2022-05-24-page_cover.md @@ -1,5 +1,5 @@ --- -title: Page with cover image +title: 04. Optimization author: Tao He date: 2022-05-24 category: Jekyll diff --git a/_posts/2022-06-26-wide_tables.md b/_posts/2022-06-26-wide_tables.md deleted file mode 100644 index 9693b161ea..0000000000 --- a/_posts/2022-06-26-wide_tables.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Wide tables -author: Tao He -date: 2022-06-26 -category: Jekyll -layout: post ---- - -A wide tables needs to be wrapped into a `div` with class `table-wrapper` -to make sure it displayed as expected on mobile devices. For example, - -```markdown -
- -|title1|title2|title3|title4|title5|title6|title7|title8| -|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| - -
-``` - -Will be rendered as - -
- -|title1|title2|title3|title4|title5|title6|title7|title8| -|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| -|1|2|3|4|5|6|7|8| - -
diff --git a/_posts/2022-06-30-tips_warnings_dangers.md b/_posts/2022-06-30-tips_warnings_dangers.md deleted file mode 100644 index 0dfb55d1f6..0000000000 --- a/_posts/2022-06-30-tips_warnings_dangers.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: Tips, Warnings, and Dangers -author: Tao He -date: 2022-06-30 -category: Jekyll -layout: post ---- - -This jekyll-theme supports tips, warnings, and dangers blocks and the style is referred -from [the discord.js website][1]. - -You could have the following [markdown attributes (supported by kramdown)][2]: - -### Tips - -Using a `{: .block-tip}` attribute: - -```markdown -> ##### TIP -> -> This guide is last tested with @napi-rs/canvas^0.1.20, so make sure you have -> this or a similar version after installation. -{: .block-tip } -``` - -> ##### TIP -> -> This guide is last tested with @napi-rs/canvas^0.1.20, so make sure you have -> this or a similar version after installation. -{: .block-tip } - -### Warnings - -Using a `{: .block-warning}` attribute: - -```markdown -> ##### WARNING -> -> Be sure that you're familiar with things like async/await and object destructuring -> before continuing, as we'll be making use of features like these. -{: .block-warning } -``` - -> ##### WARNING -> -> Be sure that you're familiar with things like async/await and object destructuring -> before continuing, as we'll be making use of features like these. -{: .block-warning } - -### Dangers - -Using a `{: .block-danger}` attribute: - -```markdown -> ##### DANGER -> -> You cannot delete an ephemeral message. -{: .block-danger } -``` - -> ##### DANGER -> -> You cannot delete an ephemeral message. -{: .block-danger } - -[1]: https://discordjs.guide/popular-topics/canvas.html#setting-up-napi-rs-canvas -[2]: https://kramdown.gettalong.org/quickref.html#block-attributes diff --git a/_posts/2023-08-31-mermaid.md b/_posts/2023-08-31-mermaid.md deleted file mode 100644 index 5aec3057a3..0000000000 --- a/_posts/2023-08-31-mermaid.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Diagrams with mermaid.js -author: Tao He -date: 2023-08-31 -category: Jekyll -layout: post -mermaid: true ---- - -This jekyll-theme supports [mermaid.js](https://mermaid.js.org/) to render diagrams -in markdown. - -To enable the mermaid support, you need to set `mermaid: true` in the front matter -of your post. - -```markdown ---- -title: Diagrams with mermaid.js -date: 2023-08-31 -layout: post -mermaid: true ---- -``` - -Then you can use mermaid syntax in your markdown: - -``` -graph TD; - A-->B; - A-->C; - B-->D; - C-->D; -``` - -```mermaid -graph TD; - A-->B; - A-->C; - B-->D; - C-->D; -``` - -Or, even some complex examples: - -``` -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->>John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail! - John-->>Alice: Great! - John->>Bob: How about you? - Bob-->>John: Jolly good! -``` - -```mermaid -sequenceDiagram - participant Alice - participant Bob - Alice->>John: Hello John, how are you? - loop Healthcheck - John->>John: Fight against hypochondria - end - Note right of John: Rational thoughts
prevail! - John-->>Alice: Great! - John->>Bob: How about you? - Bob-->>John: Jolly good! -``` - -Refer to the [mermaid.js website](https://mermaid.js.org/intro/) for more examples. diff --git a/_posts/2023-10-14-math-latex.md b/_posts/2023-10-14-math-latex.md deleted file mode 100644 index 36a9cd353c..0000000000 --- a/_posts/2023-10-14-math-latex.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: MathJax and LaTeX -author: Tao He -date: 2023-10-14 -category: Jekyll -layout: post -mermaid: true ---- - -This jekyll-theme supports [MathJax](https://www.mathjax.org/) to render $\LaTeX$ -and mathematics expressions. - -> ##### TIP -> -> Currently, Kramdown uses double dollar sign delimiters for inline and display math: -> [https://kramdown.gettalong.org/syntax.html#math-blocks](https://kramdown.gettalong.org/syntax.html#math-blocks). -{: .block-tip } - -e.g., - -```markdown -The well known Pythagorean theorem $x^2 + y^2 = z^2$ was -proved to be invalid for other exponents. -Meaning the next equation has no integer solutions: - -$$ x^n + y^n = z^n $$ -``` - -The well known Pythagorean theorem $x^2 + y^2 = z^2$ was -proved to be invalid for other exponents. -Meaning the next equation has no integer solutions: - -$$ x^n + y^n = z^n $$ - -Another example with more complex markups: - -```markdown -When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are - -$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ -``` - -When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are - -$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ - -Refer to the [MathJax website](https://docs.mathjax.org/en/latest/index.html) for more examples. diff --git a/_posts/2023-12-12-footnotes.md b/_posts/2023-12-12-footnotes.md deleted file mode 100644 index eae423aff8..0000000000 --- a/_posts/2023-12-12-footnotes.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: Using Footnotes -author: Tao He -date: 2023-12-12 -category: Jekyll -layout: post -mermaid: true ---- - -This jekyll-theme supports [MathJax](https://www.mathjax.org/) to render footnotes -in markdown. - -e.g., - -```markdown -The well known Pythagorean theorem $x^2 + y^2 = z^2$ was -proved to be invalid for other exponents[^1]. -Meaning the next equation has no integer solutions: - -$$ x^n + y^n = z^n $$ -``` - -The well known Pythagorean theorem $x^2 + y^2 = z^2$ was -proved to be invalid for other exponents[^1]. -Meaning the next equation has no integer solutions: - -$$ x^n + y^n = z^n $$ - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -Long contents -------------- - -long contents ..... - -1. a -2. b -3. c -4. d - -### Sub title 1 - -### Sub title 2 - -### Sub title 3 - -[^1]: [https://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem](https://en.wikipedia.org/wiki/Fermat%27s_Last_Theorem) From 2824f29f26d90601c1b997f44885ecec38a8075d Mon Sep 17 00:00:00 2001 From: jungin7612 Date: Sun, 27 Jul 2025 15:37:22 +0900 Subject: [PATCH 5/8] Add content on random processes and i.i.d. processes to license.md --- _posts/2019-04-29-license.md | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/_posts/2019-04-29-license.md b/_posts/2019-04-29-license.md index e7a49349f1..dcdb385113 100644 --- a/_posts/2019-04-29-license.md +++ b/_posts/2019-04-29-license.md @@ -47,6 +47,56 @@ long contents ..... ## 2.5 Random Process +**확률 과정(Random Process)이란?** + +확률 과정은 다음과 같이 정의됩니다: + +$$ +X = \{X_n\}_{n=1}^{\infty} +$$ + +이것은 순서를 가진 확률 변수들의 집합이며, 각 $X_n$은 특정 확률 분포를 따릅니다. + +- 여기서 $n$은 꼭 시간(time)을 의미하지 않아도 됩니다. +- 예시: + - 텍스트: $X_1$은 첫 번째 문자, $X_2$는 두 번째 문자 등 + - 이미지: $X_{i,j}$는 $i$행 $j$열 픽셀의 밝기 + - 시계열: $X_t$는 $t$초 후의 값 + +**핵심**: 인덱스가 시간일 필요는 없으며, **순서만 있으면 확률 과정**이 됩니다. + +--- + +**i.i.d. 과정이란?** + +i.i.d.는 independent and identically distributed의 약자입니다. + +- **독립(independent)**: 각 $X_n$이 서로 영향을 주지 않음 +- **동일 분포(identically distributed)**: 모든 $X_n$이 동일한 확률 분포를 따름 + +전체 확률은 다음처럼 단순 곱으로 계산할 수 있습니다: + +$$ +P(X_1 = x_1, \dots, X_n = x_n) = \prod_{i=1}^{n} P(X_i = x_i) +$$ + +--- + +**현실은 대부분 i.i.d.가 아님** + +예: 텍스트 + +- "progra_ing"이라는 단어에서 빈칸에 'm'이 올 가능성이 높다고 판단할 수 있음 +- 이는 앞뒤 문맥이 영향을 주기 때문 → 요소들 간에 **의존성 존재** + +**결론**: 현실의 데이터는 보통 독립적이지 않고, 앞뒤 요소에 영향을 받습니다. + +i.i.d.가 아닌 경우 사용하는 모델들: + +- 마르코프 모델 (Markov Model) +- 순환 신경망 (Recurrent Neural Network, RNN) +- 트랜스포머 (Transformer) + ### 2.5.1 What is Markovian? ### 2.5.2 1st Order Markov Process From ad206324501b9c3dd7e012490c39587a5c64c383 Mon Sep 17 00:00:00 2001 From: jungin7612 Date: Mon, 28 Jul 2025 16:56:48 +0900 Subject: [PATCH 6/8] Enhance content on random processes in license.md by adding structured explanations, examples, and a summary table to clarify the relationship between i.i.d. and 1st-order Markov processes. --- _posts/2019-04-29-license.md | 86 ++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 9 deletions(-) diff --git a/_posts/2019-04-29-license.md b/_posts/2019-04-29-license.md index dcdb385113..8223fb5f15 100644 --- a/_posts/2019-04-29-license.md +++ b/_posts/2019-04-29-license.md @@ -47,7 +47,7 @@ long contents ..... ## 2.5 Random Process -**확률 과정(Random Process)이란?** +> **확률 과정(Random Process)이란?** 확률 과정은 다음과 같이 정의됩니다: @@ -82,14 +82,13 @@ $$ --- -**현실은 대부분 i.i.d.가 아님** - -예: 텍스트 - -- "progra_ing"이라는 단어에서 빈칸에 'm'이 올 가능성이 높다고 판단할 수 있음 -- 이는 앞뒤 문맥이 영향을 주기 때문 → 요소들 간에 **의존성 존재** - -**결론**: 현실의 데이터는 보통 독립적이지 않고, 앞뒤 요소에 영향을 받습니다. +> [!warning] **현실은 대부분 i.i.d.가 아님** +> 예: 텍스트 +> +> - "progra_ing"이라는 단어에서 빈칸에 'm'이 올 가능성이 높다고 판단할 수 있음 +> - 이는 앞뒤 문맥이 영향을 주기 때문 → 요소들 간에 **의존성 존재** +> +> $\therefore$ 현실의 데이터는 보통 독립적이지 않고, 앞뒤 요소에 영향을 받습니다. i.i.d.가 아닌 경우 사용하는 모델들: @@ -99,6 +98,75 @@ i.i.d.가 아닌 경우 사용하는 모델들: ### 2.5.1 What is Markovian? +i.i.d. ←────────────|────────────→ Practical +**1st-order Markov** + +**1차 마르코프 체인(first-order Markov chain)의 개념은, i.i.d. 가정과 실제 현실에서의 데이터 구조 사이를 연결해주는 중간 다리 역할을 합니다.** +"마르코프(Markov)"라는 말은 **1차 상관성(first-order correlation)**이 있다는 의미입니다. +즉, 현재 상태는 **직전 상태에만 의존**하고, 그 이전의 상태에는 의존하지 않는다는 것입니다. + +--- + +**예제 41: 랜덤 워크(Random Walk)** + +확률 과정 $X = \{X_n\}$를 다음과 같이 정의합니다: + +초기 상태: + +$$ +X_0 = 0 +$$ + +이후 각 $n$에 대해: + +$$ +X_n = +\begin{cases} +X_{n-1} + 1 & \text{with probability } \frac{1}{2} \\ +X_{n-1} - 1 & \text{with probability } \frac{1}{2} +\end{cases} +$$ + +즉, 현재 위치에서 매 스텝마다 동전 던지기로 1만큼 앞 또는 뒤로 이동하는 무작위 행보입니다. + +예를 들어 다음과 같은 정보가 주어졌다고 해 봅시다: + +$$ +X_{101} = 51 +$$ + +이때 $X_{102}$는 다음 두 가지 중 하나입니다: + +- $X_{102} = 50$ +- $X_{102} = 52$ + +추가로 $X_{100} = 50$이라는 정보를 안다고 해도, +$X_{102}$가 어떻게 될지를 예측하는 데 **아무런 도움이 되지 않습니다.** + +이것은 **1차 마르코프 체인의 특성**과 정확히 일치합니다: + +> **미래 상태는 현재 상태에만 의존하며, 과거는 무시됩니다.** + +--- + +**핵심 요약** + +| 구분 | 설명 | +| -------------- | ---------------------------------------------------------------- | +| i.i.d. | 각 값이 서로 독립이고 동일한 분포를 가짐 | +| 1차 마르코프 | 현재 상태는 바로 직전 상태에만 의존함 | +| 현실 데이터 | 대부분 i.i.d.는 아니며, 1차 마르코프 모델이 더 현실적 | +| 랜덤 워크 예시 | $X_{n}$은 $X_{n-1}$만으로 결정되며, $X_{n-2}$는 영향을 주지 않음 | + +--- + +**요약 구조** + +i.i.d. ←────────────|────────────→ 현실 데이터 +          ↑ +        1st-order Markov +   (현재 상태는 직전 상태에만 의존) + ### 2.5.2 1st Order Markov Process ### 2.5.3 kth Order Markov Process From 1f8eadab0e50d00339226ab7a61caf172bc52ef2 Mon Sep 17 00:00:00 2001 From: 2024148052 Date: Sat, 2 Aug 2025 20:01:56 +0900 Subject: [PATCH 7/8] Fix: Update conditional entropy derivation --- _posts/2019-04-29-license.md | 87 ++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/_posts/2019-04-29-license.md b/_posts/2019-04-29-license.md index 8223fb5f15..38a6499788 100644 --- a/_posts/2019-04-29-license.md +++ b/_posts/2019-04-29-license.md @@ -39,6 +39,93 @@ long contents ..... ### 2.4.2 Conditional Entropy +>**Conditonal Entropy란?** + +이미 알고 있는 정보가 존재할 때, 추가로 모르는 정보가 주는 정보량이다. + +이미 알고 있는 정보 $Y$가 주어졌을 때, $X$에 관한 정보량은 $$H(X|Y)$$와 같이 나타내고 아래와 같이 정의된다. + +$$ +H(X|Y) = \mathbb{E}\Big[\log \frac{1}{p_{X|Y}(X|Y)}\Big] += \sum_{x,y} p_{X,Y}(x,y) \log \frac{1}{p_{X|Y}(x|y)}. +$$ + +위의 경우에서 우리가 기댓값을 계산하고자 하는 함수는 $\log \frac{1}{p_{X|Y}(X|Y)}$이며 $x$ ,$y$의 확률은 joint distribution $p_{X,Y}(X,Y)$로 나타낼 수 있다. + +우리는 기대값을 계산하기 위해 변수 $X$와 $Y$를 고려하고 있다. 결합 엔트로피(joint entropy)는 개별 엔트로피의 합이며, 각각의 $y$와 전체 엔트로피에 대한 각각의 기여(contribution)를 고려할 때 명확해진다. 특정 조건 y를 고정하는 경우를 생각해 보면 다음과 같이 나타낼 수 있다. + +$$ +H(X|Y = y) = \mathbb{E}\Big[ \log \frac{1}{p_{X|Y}(X|Y = y)} \Big] +$$ + +이제 위 수식에서 $X$만이 유일한 변수이다. 그러므로 위 수식을 다음과 같이 나타낼 수 있다. + +$$ + += \sum_{x} p_{X|Y}(x|y) \log \frac{1}{p_{X|Y}(x|y)} + +$$ + +만약 우리가 특정 조건 $y$에 대한 모든 가능한 조건부 엔트로피를 합하면, $Y$에 주어진 $X$의 전체 조건부 엔트로피를 다음과 같이 나타낼 수 있다 + +$$ +H(X|Y) = \sum_{y} p_Y(y) H(X|Y = y) +$$ + +이제 엔트로피 $H(X)$와 $H(Y|X)$를 고려해보자. $H(X)$는 $X$에 대한 정보이고, $H(Y|X)$는 $X$의 정보가 주어졌을 때 $H(X,Y)$에서의 '남은'정보이다. 따라서 우리는 $H(X) + H(Y|X) = H(X,Y)$라고 기대할 수 있고 아래와 같이 증명가능하다. + +$$ +\mathbb{E}\Big[ \log \frac{1}{p_X(X)} \Big] ++ \mathbb{E}\Big[ \log \frac{1}{p_{Y|X}(Y|X)} \Big] += \mathbb{E}\Big[ \log \frac{1}{p_X(X) p_{Y|X}(Y|X)} \Big] +$$ + +$$ += \mathbb{E}\Big[ \log \frac{1}{p_{X,Y}(X,Y)} \Big] +$$ +$$ += H(X,Y). +$$ + +$p_{Y|X}(Y|X) = \frac{p_{X,Y}(X,Y)}{p_X(X)}$ +를 이용하면 위 증명이 성립함을 쉽게 알 수 있다. + +**Exercise 35. 위의 추론 게임(guess game)에서 다음을 계산하여라** + 1. $H(Y2|Y1)$ + 2. $H(Y4|Y1)$ + +풀이: + +1. +$\mathbb{E}\Big[ \log \frac{1}{p_{Y2|Y1}(Y2|Y1)} \Big]$을 구하면 된다. + +이 경우에서는 $Y1$과 $Y2$가 독립이므로 $\mathbb{E}\Big[ \log \frac{1}{p_{Y2}(Y2)} \Big]$를 구하면 된다. + +즉, $\sum_{y} p_{Y2}(y) \log \frac{1}{p_{Y2}(y)}$를 계산하면 된다. + +답: 1 + +2. + +$p_(Y4=0|Y1=0) = 3/4$ + +$p_(Y4=1|Y1=0) = 1/4$ + +$p_(Y4=0|Y1=1) = 1/4$ + +$p_(Y4=1|Y1=1) = 3/4$ + +를 이용하면 $H(Y4|Y1=0)$은 $3/4\log4/3+1/4\log4$이고 + +$H(Y4|Y1=1)$은 $3/4\log4/3+1/4\log4$이다. + +따라서 $H(Y4|Y1)$은 $1/2*3/4\log4/3+1/4\log4$+$1/2*3/4\log4/3+1/4\log4$이다. + +이를 $H(Y4)=1$와 비교해보면 더 작은 것을 알 수 있다. + +따라서 조건이 존재할 경우 정보가 같거나 줄어든다는 사실을 알 수 있다. + + ### 2.4.3 Mutual Information ### 2.4.4 Properties of Mutual Information From 732e83b4d0ae94ba276d98c594b78cba1b81756d Mon Sep 17 00:00:00 2001 From: 2024148052 Date: Sun, 3 Aug 2025 22:22:25 +0900 Subject: [PATCH 8/8] Fix: Minor edits in Information Theory notes --- _posts/2019-04-29-license.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/_posts/2019-04-29-license.md b/_posts/2019-04-29-license.md index 38a6499788..65ea694efb 100644 --- a/_posts/2019-04-29-license.md +++ b/_posts/2019-04-29-license.md @@ -61,9 +61,7 @@ $$ 이제 위 수식에서 $X$만이 유일한 변수이다. 그러므로 위 수식을 다음과 같이 나타낼 수 있다. $$ - = \sum_{x} p_{X|Y}(x|y) \log \frac{1}{p_{X|Y}(x|y)} - $$ 만약 우리가 특정 조건 $y$에 대한 모든 가능한 조건부 엔트로피를 합하면, $Y$에 주어진 $X$의 전체 조건부 엔트로피를 다음과 같이 나타낼 수 있다 @@ -75,9 +73,7 @@ $$ 이제 엔트로피 $H(X)$와 $H(Y|X)$를 고려해보자. $H(X)$는 $X$에 대한 정보이고, $H(Y|X)$는 $X$의 정보가 주어졌을 때 $H(X,Y)$에서의 '남은'정보이다. 따라서 우리는 $H(X) + H(Y|X) = H(X,Y)$라고 기대할 수 있고 아래와 같이 증명가능하다. $$ -\mathbb{E}\Big[ \log \frac{1}{p_X(X)} \Big] -+ \mathbb{E}\Big[ \log \frac{1}{p_{Y|X}(Y|X)} \Big] -= \mathbb{E}\Big[ \log \frac{1}{p_X(X) p_{Y|X}(Y|X)} \Big] +\mathbb{E}\Big[ \log \frac{1}{p_X(X)} \Big]+ \mathbb{E}\Big[ \log \frac{1}{p_{Y|X}(Y|X)} \Big]= \mathbb{E}\Big[ \log \frac{1}{p_X(X) p_{Y|X}(Y|X)} \Big] $$ $$ @@ -107,19 +103,19 @@ $\mathbb{E}\Big[ \log \frac{1}{p_{Y2|Y1}(Y2|Y1)} \Big]$을 구하면 된다. 2. -$p_(Y4=0|Y1=0) = 3/4$ +$p(Y4=0|Y1=0) = 3/4$ -$p_(Y4=1|Y1=0) = 1/4$ +$p(Y4=1|Y1=0) = 1/4$ -$p_(Y4=0|Y1=1) = 1/4$ +$p(Y4=0|Y1=1) = 1/4$ -$p_(Y4=1|Y1=1) = 3/4$ +$p(Y4=1|Y1=1) = 3/4$ 를 이용하면 $H(Y4|Y1=0)$은 $3/4\log4/3+1/4\log4$이고 $H(Y4|Y1=1)$은 $3/4\log4/3+1/4\log4$이다. -따라서 $H(Y4|Y1)$은 $1/2*3/4\log4/3+1/4\log4$+$1/2*3/4\log4/3+1/4\log4$이다. +따라서 $H(Y4|Y1)$은 $1/2x3/4\log4/3+1/4\log4$+$1/2x3/4\log4/3+1/4\log4$이다. 이를 $H(Y4)=1$와 비교해보면 더 작은 것을 알 수 있다.