zoukankan      html  css  js  c++  java
  • Supervised Learning000

    • the process of supervised learning

      given dataset with labels then learn the hypothesis/predict function h: x->y through learning algorithm. When the target variable we try to predict is continuous, we call it regression problem. Whrn the target variable we try to predict is discrete, we call it classification problem.

    •  Linear regression

    e.g. prediction of houses' price, give living area x1, number of bedrooms x2

    hθ(x) = θ0 + θ1x+ θ2x2 

    θi's are parameters/weight value, for simplicity, we can write in vectors as

    h(x) = sum(θix)  = θTx

    to get parameter θ we define the cost function:

    J(θ) = 1/2sum(hθ(x(i)) - y(i))2

      • LMS algorithm (Least Mean Squares)
        • consider gradient descent algorithm(find local minimum), which starts with some initial θ, and repeatedly performs the update:(repeat until convergence)

          θj  := θ- α*∂J(θ)/∂θj

          ∂J(θ)/∂θ= (hθ(x) - y)*xj

      • The normal equations

      • Probabilistic interpretation( of least squares)
        •  Assume that the target variables and the inputs are related via the equation y(i) = θTx(i) + ε(i), where ε(i) is an error term that captures either unmodeled effects ( such as if there are some features very pertinent相关的特征to predict housing price, but that we'd left out of the regression), or random nosie.
        • further assume that the ε(i) are distributed IID( independently and identically distribution)accroding to Gaussian distribution( also called Normal distribution) . I.e., the density of  ε(i)  is given by

        •  Then, construct likelihood function:
        • Next, get log likelihood l(θ)
        • Hence, maximizing l(θ) gives the same answer as minimizing J(θ) below, the original least-square function

     

     

  • 相关阅读:
    TCP报文发送工具
    Java基础—注解的使用
    STM32以太网ETH
    EC20 minipcie版4g模块开发笔记
    usb端点(endpoint)知识详解
    STM32 usb_mem.c和usb_sil.c文件的分析
    USB的中断说明
    STM32 可编程电压监测器(PVD)实现数据掉电保存
    关于FSMC地址线的理解
    STM32F4—fsmc的配置步骤
  • 原文地址:https://www.cnblogs.com/yuelien/p/12905560.html
Copyright © 2011-2022 走看看