Git Product home page Git Product logo

dragonwarrior15 / statistical-learning-notes Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 3.0 5.18 MB

Notes for Statistical Learning

Home Page: https://DragonWarrior15.github.io/statistical-learning-notes/

Python 60.67% Makefile 2.10% Ruby 0.12% HTML 22.36% SCSS 2.04% CSS 10.97% JavaScript 1.73%
statistical-learning machine-learning deep-learning math differential-equations linux-shell probability

statistical-learning-notes's Introduction

Notes

Accessible at https://DragonWarrior15.github.io/statistical-learning-notes/

Building Locally

  • Run make jekyll_serve to serve using jekyll

Common Pitfalls/Suggestions

  • MathJax overview: See 1 and 2.
  • To escape the curly braces inside math mode, use a double back slash like \\{. This is because of two levels of processing by Jekyll and MathJax (see here).
  • Any hanging pair of square brackets [ ] in math mode should be escaped using \[ \] so that markdown does not process them as hyperlinks.
  • Refer to include_mathjax.html for examples on defining new macros and including extensions. This files also defines the complete configuration to import MathJax to a jekyll project.
  • Instead of \bigg use \left and \right for automatically sizing brackets. However, \left and \right should be present in pairs with matching pairs of brackets. Otherwise, MathJax can throw errors like missing left or right or missing &.
  • The actual $ symbol can be included as \\$, i.e., by double escapting \ so that its interpreted as \$. Just using \$ will make it be interpreted as $ and begin as math mode.
  • The following will work
    \begin{alignat}{2}
        \text{Accept} \quad &H_{0} \quad &&\text{if} \quad \chi_{1-\alpha/2, n-1}^{2} \leq TS \leq \chi_{\alpha/2, n-1}^{2}\newline
        \text{Reject} \quad &H_{0} \quad &&\text{otherwise}
    \end{alignat}
    while this will not show proper alignment
    \begin{alignat}{2}
        \text{Accept} \quad &H_{0} \quad &\text{if} \quad \chi_{1-\alpha/2, n-1}^{2} \leq TS \leq \chi_{\alpha/2, n-1}^{2}\newline
        \text{Reject} \quad &H_{0} \quad &\text{otherwise}
    \end{alignat}
    This is probably because of how alignment is handled for the text command in math mode.
  • If only a math mode text is present in some list of items, begin it from next line as shown below for correct formating
    1.
        \begin{align}
            E = mc^{2}
        \end{align}
  • Linking to another page of the project can be done by following the template
    {{ "/notes/full_path_to_file/file.html#a-heading-name" | relative_url }}
    For a heading in the same file, a simple #a-heading-name will suffice
  • Before starting any table, there should be a blank line before it, otherwise it is not parsed correctly. It is a good practice to keep a blank line after the table as well, but that may not work when table is inside lists.
  • Use \quad in math mode for spacing between text and mathematical expression.

Custom MathJax shorthands

  • Set notations
    • \real to denote the set of real numbers
    • \comp to denote the set of complex numbers
    • \field to denote a field
    • \setv to denote the set V
    • \setw to denote the set W
    • \setlm to denote the matrix L
    • \matm to denote the matrix M
  • Operators
    • \minimize, \maximize, \argmin and \argmax are defined to denote the minimization, maximization, minimum value index, and maximum value index positions respectively.
  • Operators with arguments
    • \KL{arg 1, arg2} to denote the KL divergence between functions arg1 and arg2
    • \detm{arg} to denote the determinant of the matrix arg, can also be used to generate left and right vertical bars the height of the expression
    • \roundbr{arg} to create round brackets around arg with the appropriate sizing
    • \squarebr{arg} to create sqyare brackets around arg with the appropriate sizing
    • \diffone{arg} to denote the first derivative of arg using a single prime character in power
    • \difftwo{arg} to denote the second derivative of arg in the double prime notation

Codes in markdown+jekyll

  • To use double curly braces inside a code block, enclose it inside the raw tag
    {% raw %}
    This is a code with double curly braces {{ user.name | uppercase }}
    {% endraw %}

Defining Navigation

  • Refer to navigation.yml to see how the navigation is defined currently. It follows the below format
    topic:
      - name: Section/Chapter 1 Name
        link: complete_path_to_the_file.html
        subnav:
          - name: Subsection 1.1
            link: complete_path_to_the_file.html
          - name: Subsection 1.2
            link: complete_path_to_the_file.html
      - name: Section/Chapter 2 Name
        link: complete_path_to_the_file.html
        subnav:
          - name: Subsection 2.1
            link: complete_path_to_the_file.html

Using find and grep

Suppose we rearrange the directory structure. Since the URLs are hardcoded when referring to a section somewhere else, we need to go through and replace all such links to point to the new path.

Assuming we changed /notes/differential_equations/laplace_transforms.md to /notes/differential_equations/laplace_transforms/intro.md. The command to search through all the places where the change needs to be made

find . -type f -name "*.md" -or -name "*.yml" -exec grep "/notes/differential_equations/laplace_transforms.html" {} ';'

And to replace with the new path

find . -type f -name "*.md" -or -name "*.yml" -exec sed -s "|/notes/differential_equations/laplace_transforms.html|/notes/differential_equations/laplace_transforms/intro.md|" {} ';'

Generating Combined Files

To generate a single md file containing all the pages for one notes section

  • Run the file generate_combined_md.py notes_name where notes_name is the command line argument for the notes section you want to combine
  • Serve the jekyll project using make jekyll serve
  • Locally, go to the page http://127.0.0.1:4000/statistical-learning-notes/combined.html
  • Save as PDF in the browser as needed

Common problem in WSL

In case you are running WSL and unable to connect to the server

  • Close the ubuntu window
  • Open cmd and type wsl --shutdown
  • Restart cmd and type wsl
  • Now try running the commands

statistical-learning-notes's People

Contributors

dragonwarrior15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

statistical-learning-notes's Issues

statistical learning notes errata

  • cov of Y = AX + b the equations are flowing out of page
  • E[X vector] equation flowing out of page
  • total expectation theorem extra bracket
  • gradient boosting algorithm, 2nd subpoint of 2nd point, change loss input from xi to yi
  • paragraph derivation of PCA, change $0 to 1$ to $[0,1]$
  • gaussian process, remove K(x_{n}, x_{2}) to correct the covariance matrix formatting
  • gaussian process, insert comman between \hat{K}(x_{i} - x_{j}) and m(x)
  • Autoregressive Model (AR) correct definition, add W_{t} term, and insert space before \phi_{p} \neq 0
  • Causality, autocovariance of AR(1), remove power of 2 from W_{t-i}
  • Maximum probability of improvement make brackets larger in the formula
  • Expected improvement formula, insert new line before Z, change it to where Z, remove the empty brackets in \mu(x)
  • Boosting Trees near "If the regions are already known" change the loss function to use y instead of x
  • bias variance tradeoff, equations going out of page

statistical learning notes errata

Correct rendering of the file name in Gaussian Process: tex_files/statistical_learning/sections/bayesian_methods/gaussian_process.tex
Correct the max not rendered correctly in the same file under subsection: Prediction with noisy data

additions

  • orthogonal matrix and properties
  • size of test for composite hypothesis (using supremum)
  • mean of the F distribution
  • relation betwen beta and gamma distributions
  • Rao-Blackwell and Lehmann-Scheffe theorems
  • Cayley-Hamilton theorem
  • Cramer-Rao bound for biased estimators
  • add geometric distribution
  • add negative binomial distribution

Variance Definition

Add the definition and properties of variance calculation in case of vectors/matrices in variance-covariance section

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.