<监督和无监督学习>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

相关推荐
瑞华丽PLM6 分钟前
国产PLM软件源头厂家的AI技术应用与智能化升级
人工智能·plm·国产plm·瑞华丽plm·瑞华丽
AI视觉网奇9 分钟前
metahuman 购买安装记录
笔记·学习·ue5
Ryan老房10 分钟前
无人机航拍图像标注-从采集到训练全流程
yolo·目标检测·机器学习·计算机视觉·目标跟踪·无人机
xixixi7777715 分钟前
基于零信任架构的通信
大数据·人工智能·架构·零信任·通信·个人隐私
玄同76518 分钟前
LangChain v1.0+ Prompt 模板完全指南:构建精准可控的大模型交互
人工智能·语言模型·自然语言处理·langchain·nlp·交互·知识图谱
Ryan老房22 分钟前
开源vs商业-数据标注工具的选择困境
人工智能·yolo·目标检测·计算机视觉·ai
取个鸣字真的难27 分钟前
Obsidian + CC:用AI 打造知识管理系统
人工智能·产品运营
困死,根本不会44 分钟前
OpenCV摄像头实时处理:基于 HSV 颜色空间的摄像头实时颜色筛选工具
人工智能·opencv·计算机视觉
Shirley~~1 小时前
Vue-skills的中文文档
前端·人工智能
华大哥1 小时前
AI大模型基于LangChain 进行RAG与Agent智能体开发
人工智能·langchain