<监督和无监督学习>Introduction to Machine Learning

Definition

  • Machine learning is field of study thaht gives computers the ability to learn withuot being explicitly programmed.

Machine Learning Algorithms

  • Supervised learning
  • Unsupervised learning
  • Recommender system
  • Reinforcement learning

Supervised Learning

Basic Concept

  • Input and its corresponding right answer give labels then test the module with brand new input

  • Example:

  • Types

    • Regression: a particular type of supervise learning, is predict a number from infinitely many possible outputs

    • Classification : predict catagories, finited possible outputs (classes/catogories may be many, so do the inputs)

Linear Regression Model

  • Terminology
    • x = "input" variable = feature
    • y = "output" variable = "taget" variable
    • m = number of training examples
    • (x,y) = single training example
    • w,b = parameter = coefficients = weights
    • w is slope while b is y-intercept
  • The process of unsupervise learning

    • Univariable linear regression = one variable linear regression
  • Cost function ------ find w and b (额外除以2目的是方便后面梯度下降求导时把2约去使式子看起来更简洁)
    • Squared error cost function (To find different value when choosing w and b)

    • For linear regression with the squared error cost function, you always end up with a bow shape or a hammock shape.

      ==

    • The difference between fw(x) and J(w)

      • the previous one is related to x and we choose different w for J(w)

Gradient descent

  • The method of find the minimal J(w,b)
  • Every time ture 360 degree to have a little step and find the intermediate destination with the the largest difference with the last point, then do the same until you find you couldn't go down anymore
  • process (so called "Batch" gradient descent)
    • start with some w,b (set w=b=0)
    • keep chaging w,b to reduce J(w,b)
    • Until we settle at or near a minimum
  • If you find different minimal result by choosing different starting point, all these different results are calledlocal minima
  • Gradient descent algorithm
    • |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
      | α = learning rate (usually a small positive number bwtween 0 to 1):decide how large the step I take when going down to the hill (dJ(w,b)/dw) destinate in which direction you want to take your step |

    • The end condition: w and b don't change much with each addition step that you take

    • Tip: b and w must be updated simultaneously

    • WHY THEY MAKE SENSE?

    • Learning rate α

      |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
      | Problem1: When α is too small, the gradient makes sense but is too slow Problem2: When α is too big, it may overshoot, never reach the minimal value of J(w) Problem3: When the starting point is the local minima, the result will stop at the local minima (Can reach locak minimum with fixed learning rate) 所以!α是要根据坡度变化而变化的!! |

Learning Regression Algorithm

  • For square error cost function, there only one minima

Unsupervise Learning

  • Finding something interesting in unlabeled data:Data only comes with inputs x, but not outputs label y. Algrithm has to find structure in the data
  • Types
    • Clustering : Group similar data points together

    • Anomaly detection :Find unusual data points

    • Dimensionality redution: Compress data using fewer numbers

相关推荐
躺柒几秒前
读人机沟通法则:理解数字世界的设计与形成01机器循环运行
人工智能·计算机·计算·数字世界·人机对话
智算菩萨5 分钟前
摩擦电纳米发电机近期进展的理论脉络梳理:从接触起电到统一建模与能量转换
linux·人工智能·算法
LiYingL5 分钟前
TRACEALIGN:追踪大规模语言模型对齐漂移的原因和保护措施
人工智能·语言模型·自然语言处理
囊中之锥.17 分钟前
机器学习第三部分---决策树
人工智能·决策树·机器学习
YJlio41 分钟前
ProcessExplorer_17.09_x64-Chs 新版本升级:我看到的区别与优势(含升级思路与注意点)
人工智能·笔记·学习
-木槿昔年-1 小时前
【米尔-安路MYD-YM90X创意秀】飞龙派学习和PS串口实践
学习·fpga开发
Aaron15881 小时前
基于RFSOC+VU13P+GPU架构在雷达电子战的技术
人工智能·算法·fpga开发·架构·硬件工程·信号处理·基带工程
yiersansiwu123d1 小时前
AI大模型的技术演进与产业赋能:迈向协同共生的智能新时代
人工智能
weisian1511 小时前
入门篇--人工智能发展史-4-点燃深度学习革命的那把火,AlexNet
人工智能·深度学习
梦帮科技1 小时前
Scikit-learn特征工程实战:从数据清洗到提升模型20%准确率
人工智能·python·机器学习·数据挖掘·开源·极限编程