Statistics Basic Notes

ForHHeart / 2024-02-19 / 原文

🥥 Table of Content

  • I. Probability
  • II. Calculus




🥑 Get Started!

I. Probability

  • 01 - Conditional Probability & Joint Probaility
  • 02 - Generative Model
    • Naive Bayes
    • Hidden Markov Model(HMM)
  • 03 - Discriminative Model
    • Logistic Regression
    • Maximum Entropy Markov Model(MEMM)
    • Conditional Random Fields(CRF)

01 - Conditional Probability & Joint Probaility

$P(x|y) = \dfrac{P(x, y)}{P(y)}$

\(P(x, y) = P(x|y)P(y)\)

If two variables are independent in a joint distribution, we write: $X \perp\!\!\!\perp Y$.

In terms of probability:

$P(X, Y) = P(X)P(Y)$
It also implies that:
$P(X) = P(X|Y) \quad and \quad P(Y) = P(Y|X)$

II. Calculus

Hessian Matrix | Baidu Baike

import sympy as sp

# Define the variables
x, y = sp.symbols('x y')

# Define the function
f = x**2 + 3*y**2

# Compute the Hessian
hessian = sp.hessian(f, [x, y]).tolist()
print(hessian)