首页 > 其他分享 >AI 学习笔记

AI 学习笔记

时间:2023-05-05 12:12:18浏览次数:30  
标签:function Loss partial AI sum frac 笔记 学习 theta

AI 学习笔记

机器学习简介

Different types of Functions

Regression : The function outputs a scalar(标量).

  • predict the PM2.5

Classification : Given options (classes), the function outputs the correct one.

  • Spam filtering

Structured Learning : create something with structure(image, document)

Example : YouTube Channel

1.Function with Unknown Parameters.

\[y=b+wx_1 \]

2.Define Loss from Training Data

  • Loss is a function of parameters

\[L(b,w) \]

  • Loss : how good a set of values is.
  • L is mean absolute error (MAE)

\[e=\left | y-\hat{y} \right | \]

  • L is mean square error (MSE)

\[e=(y-\hat{y})^2 \]

\[L=\frac{1}{N} \sum_{n}^{}e_n \]

3.Optimization

\[w^*,b^*=arg\,\min_{w,b} \,L \]

Gradient Descent

  • (Randomly) Pick an initial value :

\[w^0 \]

  • Compute :

\[\frac {\partial L} {\partial w} |_{w=w_0} \]

Negative : Increase w

Positive : Decrease w

\[\eta\frac {\partial L} {\partial w} |_{w=w_0} \]

η:learning rate (hyperparameters)

  • Update w iteratively
    • Local minima
    • global minima

类似一个参数,推广到多个参数。

Linear Models

Linear models have severe limitation. Model Bias.

We need a more flexible model!

curve = constant + sum of a set of Hard Sigmoid Function

\[y=c\frac {1} {1+exp(-(b+wx_1))} \\ =csigmoid(b+wx_1) \]

\[y=b+\sum_{i}sigmoid(b_i+w_ix_i) \]

\[y=b+\sum_{i}sigmoid(b_i+\sum_{j}w_{ij}x_j) \]

线性代数角度:

\[r=b+Wx \]

\[a=\sigma(r) \]

\[y=b+c^Ta \]

Loss

  • Loss is a function of parameters L(θ)
  • Loss means how good a set of values is.

Optimization of New Model

\[\theta= \begin{bmatrix} \theta_1 \\ \theta_2 \\ \theta_3 \\ \dots \end{bmatrix} \]

\[\theta=arg \min_\theta L \]

  • (Randomly) Pick initial values θ^0

1 epoch = see all the batched once

update : update θ for each batch

Sigmoid -> ReLU (Rectified Linear Unit)

统称为 Activation function

Neural Network

PyTorch

标签:function,Loss,partial,AI,sum,frac,笔记,学习,theta
From: https://www.cnblogs.com/kennem/p/17373746.html

相关文章

  • Promise学习
    1.理解1)Promise是一门新技术(ES6规范)2)Promise是JS中进行异步编程的新解决方案 2.具体表达1)从语法上说:Promise是一个构造函数,2)从功能上说:Promise对象用来封装一个异步操作并可以获取其成功/失败的结果值支持链式调用,解决回调地狱问题,回调函数中多次嵌套。 3.Promise......
  • Android studio Failed to start [powershell.exe]
    无法打开本地终端解决办法:1、在file→settings→Tools→Terminal→Shellpath中把值设置为电脑系统 powershell.exe文件的全路径(如下图)  ......
  • DevTools failed to load source map: Could not load content for https://xxxxx/boo
    DevToolsfailedtoloadsourcemap:Couldnotloadcontentforhttps://xxxxx/bootstrap-theme.css.map:HTTPerror:statuscode404,net::ERR_HTTP_RESPONSE_CODE_FAILURE这个错误意味着浏览器无法加载指定的CSSsourcemap文件。CSSsourcemap文件通常用于调试前端......
  • chatgpt接口开发笔记2生成图片接口
    chatgpt接口开发笔记2生成图片接口chatgpt的生成图片接口,可以根据用户的描述来生成满足用户意愿的图片1、了解接口参数接口地址:POSThttps://api.openai.com/v1/images/generations下面是接口文档描述内容curlhttps://api.openai.com/v1/images/generations\-H"Co......
  • httprunner 4.x学习 - 2.测试用例结构(testcase)
    前言httprunner4.x版本,YAML/JSON格式用例(testcase)结构延续了之前的config和teststeps两个部分config配置部分config部分示例config:name:"requestmethodstestcasewithfunctions"variables:foo1:config_bar1foo2:config_bar2......
  • Robust Deep Reinforcement Learning against Adversarial Perturbations on State Ob
    郑重声明:原文参见标题,如有侵权,请联系作者,将会撤销发布!NeurIPS2020 ......
  • 【VBA】树控件TreeView的学习(一)
    哈喽,手机边亲爱的你还好吗?我是默默给大家分享Access知识的will。大家2022年快乐,从今天开始我们来讲一下树控件。树控件在我们的开发中是经常用的到的控件也是一个重点,我会从最简单的讲起,一点点,一点点的加上难度,最后我们把BOM挂到树上,顺便讲一下BOM。我会先发一篇文章再出一个视频。......
  • 21、MHA master high availability (主节点高可用)
    MHAmasterhighavailability(主节点高可用)MHA:MasterHighAvailability,对主节点进行监控,可实现自动故障转移至其它从节点;通过提升某一从节点为新的主节点,基于主从复制实现,还需要客户端配合实现,目前MHA主要支持一主多从的架构,要搭建MHA,要求一个复制集群中必须最少有三台......
  • OushuDB 小课堂丨推动保险业的数字化转型:采用 AI 驱动的解决方案
    更多内容请关注OushuDB小课堂近年来,随着技术进步不断改变传统的商业模式,保险业发生了重大变化。从承保到理赔管理,人工智能(AI)和机器学习为提高效率、准确性和客户满意度的创新解决方案铺平了道路。其中一项突破是人工智能解决方案的出现,例如数据提取工具,这彻底改变了非结构化......
  • Xenomai 进程间通信方式
    Xenomai进程间通信方式分成Xenomai域内的IPC以及Xenomai域和Linux域之间的IPC,目前采用的rtipc(RTDM驱动)的方式,主要是给用户空间提供socket接口,实时应用通过调用对应的接口可以避免切换到Linux域而导致实时性降低。rtipc对应了三个协议:XDDP(Xenomai域和Linux域之间的IPC)IDDP和BUFP......