Giter Site home page Giter Site logo

cs229's People

Contributors

abooundev avatar

Watchers

 avatar

cs229's Issues

generalized linear model (GLM)

• Exponential family of distributions -> 분포 정리
• Mean and (canonical) link functions -> response functions // 슬라이드 참고
• Convexity of log partition function
• Generalized linear model (GLM)
• Various GLM models

베이즈 정리, 우도, 최대 우도법

  • 베이즈 정리와 우도
  • 딥러닝에서 자주 사용되는 교차 엔트로피나 최대 우도법

베이즈 정리, 우도, 최대우도법

  • 결합 확률(joint probability)
    $$
    P(y,x) = P(x|y)P(y) = P(x,y) = P(y|x)P(x)
    $$

  • 베이즈 정리 (bayes formula)
    $$
    P(y|x) = \frac{P(x|y)P(y)}{P(x)}
    $$
    $P(y|x)$ : posterior probability

    $P(x|y)$: likelihood

    $P(y)$: prior probability // 사건 $x$와 무관하게 미리 알 수 있는 확률

    사후 확률에서 분모인 $p(x)$는 무시할 수 있음. 절대적인 값이 필요한 것이 아닌 y의 각 class에 대한 상대적인 확률이 필요한 것이기 때문

  • 조건부 확률 (conditional probability)
    $$
    P(추정해야 할 사건|이미 알고 있는 사건) = P(y|x)
    $$

  • 우도 (likelihood) = 역확률 문제
    $$
    P(이미 알고 있는 사건|추정해야 할 사건) = P(x|y) = \mathcal{L(y|x)}
    $$

  • 패턴 인식
    $$
    \hat{y} = arg\max_y P(y|x)
    $$

    • 실제로 $P(y|x)$를 직접 추정하는 것은 불가능

    • $P(y)$$P(x|y)$를 구할 수 있다면 베이즈 정리를 이용해 $p(y|x)$를 간접적으로 계산할 수 있음

  • $P(x|y)$ 추정 방법 = 우도 추정 방법(liklihodd estimation)

    • 여러가지 확률 밀도 추정(density estimation) 방법 이용
  • 최대 우도 추정 (Maximun Likelihood Estimation, MLE)

    • 딥러닝에서 목적함수로 우도를 널리 활용

    • 데이터 $\mathbb{X}$가 주어졌을 때, $\mathbb{X}$를 발생시켰을 가능성을 최대로 하는 매개변수 $\theta$ 를 찾음
      $$
      \hat{\theta} = arg\max_\theta P(\mathbb{X}|\theta)
      $$
      $\theta$: 매개변수 집합

    • 데이터 $\mathbb{X}={x_1, x_2, ..., x_n}$은 독립동일분포(iid, independent and identically distributed)이므로, sample을 독립적으로 다룰 수 있음
      $$
      P(\mathbb{X}|\theta) = p(x_1, x_2, ..., x_n|\theta) = \textstyle \prod_{i=1}^N P(x_i|\theta)
      $$

    • 그러나 sample수 = n이 너무 커질 경우, n번 곱하면 확률값이 너무 작아져, 연산시 버림될 수도 있음

  • 최대 로그 우도 추정 (Maximun Log Likelihood Estimation)
    $$
    \hat{\theta} = arg\max_\theta logP(\mathbb{X}|\theta) = arg\max_\theta \textstyle \sum_{i=1}^N P(x_i|\theta)
    $$

정리

패턴인식에서는 사후 확률(이미 알고 있는 사건을 기반으로 추정해야하는 사건의 확률)을 최대화 하는 y의 값을 구하는 문제이나, 실제로 사후 확률을 구할 수 없으므로, 베이즈 정리를 이용해 사전 확률과 우도(추정해야하는 사건을 기반으로 이미 알고 있는 사건을 확률)을 추정하여, 간접적으로 사후 확률을 구할 수 있다.

딥러닝에서는 우도를 이용하여 매개변수를 기반으로 데이터 $\mathbb{X}$를 발생시킬 확률을 최대화하는 매개변수를 탐색하는 최대 우도 추정법을 목적함수로 이용한다. 그러나 확률의 곱셈으로 우도가 매우 작아지는 것을 방지하기 위해, 최대로그우도추정법을 사용한다.

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.