Cheatsheet of Latex Code for Most Popular Machine Learning Equations

rockingdingo 2021-08-22 #latex #machine learning #equations #nlp #recommendation


Distance Measure

Generative Models

  • Generative Adversarial Networks

    Equation


    Latex Code
        \min_{G} \max_{D} V(D,G)=\mathbb{E}_{x \sim p_{data}(x)}[\log D(x)]+\mathbb{E}_{z \sim p_{z}(z)}[\log(1-D(G(z)))]
        
    Explanation

  • Variational AutoEncoder

    Estimating the Log-likelihood and Posterior
    Equation


    Latex Code
        \log p_{\theta}(x)=\mathbb{E}_{q_{\phi}(z|x)}[\log p_{\theta}(x)] \\
        =\mathbb{E}_{q_{\phi}(z|x)}[\log \frac{p_{\theta}(x,z)}{p_{\theta}(z|x)}] \\
        =\mathbb{E}_{q_{\phi}(z|x)}[\log [\frac{p_{\theta}(x,z)}{q_{\phi}(z|x)} \times \frac{q_{\phi}(z|x)}{p_{\theta}(z|x)}]] \\
        =\mathbb{E}_{q_{\phi}(z|x)}[\log [\frac{p_{\theta}(x,z)}{q_{\phi}(z|x)} ]] +D_{KL}(q_{\phi}(z|x) || p_{\theta}(z|x))\\
        
    Explanation

    Evidence Lower Bound
    Equation


    Latex Code
            \mathbb{L}_{\theta,\phi}(\mathbf{x})=\mathbb{E}_{q_{\phi}(\mathbf{z}|\mathbf{x})}[\log p_{\theta}(\mathbf{x},\mathbf{z})-\log q_{\phi}(\mathbf{z}|\mathbf{x}) ]
        
    Explanation

    Reparameterization trick
    Equation

    Latex Code
            z = \mu + \epsilon \cdot \sigma
        
    Explanation

Natural Language Processing