首页 > 其他分享 >深度学习入门 Chapter2

深度学习入门 Chapter2

时间:2023-03-19 14:23:28浏览次数:46  
标签:入门 sum 深度 Chapter2 weights predicted output input perceptron

What's perceptron algorithm invented by Frank Rosenblatt?

The perceptron algorithm is a supervised learning algorithm for binary classification of input data into one of two possible categories. It was invented by Frank Rosenblatt in 1957 and is one of the oldest and simplest artificial neural network models.

The perceptron algorithm works by taking a set of input values and computing a weighted sum of those inputs. This sum is then compared to a threshold value, and the perceptron outputs a 1 if the sum is greater than the threshold or a 0 otherwise. The weights used in the weighted sum are adjusted during training to minimize the error between the predicted output and the true output.

The training process of the perceptron algorithm involves iterating through the input data and adjusting the weights for each input until the algorithm converges to a set of weights that produces accurate predictions. During each iteration, the perceptron makes a prediction for each input and updates the weights based on whether the prediction is correct or not. The weights are updated using the following formula:

new_weight = old_weight + learning_rate * (true_output - predicted_output) * input

where learning_rate is a hyperparameter that controls the rate at which the weights are updated, true_output is the true label of the input, predicted_output is the output predicted by the perceptron, and input is the input data.

Explain each part of formula y=w1x1+w2x2+b, which is used for perceptron

The formula y = w1x1 + w2x2 + b represents the basic computation of a perceptron, where:

  • y is the output of the perceptron. It represents the predicted class label for the input data.
  • x1 and x2 are the input features for the perceptron. They represent the values of the features for a specific input data point.
  • w1 and w2 are the weights associated with the input features. They represent the importance of each input feature in making the prediction.
  • b is the bias term. It represents the threshold for activation of the perceptron.

The perceptron algorithm uses this formula to compute the weighted sum of the input features. If this sum is greater than the threshold value b, the perceptron predicts the positive class, otherwise it predicts the negative class.

During the training process of the perceptron algorithm, the weights and bias term are adjusted to minimize the error between the predicted output and the true output. The weights are adjusted by adding a fraction of the difference between the true output and the predicted output multiplied by the input feature value. The bias term is adjusted by adding a fraction of the difference between the true output and the predicted output.

In summary, the perceptron algorithm uses the formula y = w1x1 + w2x2 + b to compute the weighted sum of the input features and make a prediction about the class label of the input data. The weights and bias term are adjusted during training to minimize the error between the predicted output and the true output.

Is there a term for w1x1+w2x2?

Yes, the term "weighted sum" is often used to refer to the expression w1x1 + w2x2. It represents the linear combination of the input features x1 and x2 with their corresponding weights w1 and w2. The weighted sum is a fundamental building block in many machine learning algorithms, including the perceptron and linear regression.

What's the concept difference between A*B and A.dot(B)?

In NumPy, the * operator performs element-wise multiplication between two arrays, while the dot() method performs matrix multiplication between two arrays.

When two arrays A and B are multiplied using *, the corresponding elements of the two arrays are multiplied element-wise to produce a new array of the same shape. For example, if:

A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])

Then A * B would result in:

array([[ 5, 12],
       [21, 32]])

 

标签:入门,sum,深度,Chapter2,weights,predicted,output,input,perceptron
From: https://www.cnblogs.com/chucklu/p/17233001.html

相关文章

  • java——Zookeeper学习——入门学习
    学习之前看了2个B站教程:   1、千峰:https://www.bilibili.com/video/BV1Ph411n7Ep/?vd_source=79bbd5b76bfd74c2ef1501653cee29d6   2、黑马:https://www.bili......
  • Hadoop入门
    目录1️⃣、Hadoop概述1.1、Hadoop是什么1.2、三大发行版本1.3、优势1.4、组成HDFSYARNMapReduceHDFS、YARN、MapReduce三者关系1.6、大数据技术生态体系2️⃣、Hadoop运行环境......
  • 基于深度学习的跌倒检测系统(UI界面+YOLOv5+训练数据集)
    摘要:跌倒监测系统用于智能化监测是否有行人跌倒,通过YOLOv5的深度学习技术对视频、图片、摄像头等画面进行跌倒检测,分析并安全提醒。在介绍算法原理的同时,给出Python的实......
  • Tomcat 入门实战(2)--Tomcat Native Library 使用
     本文主要介绍 TomcatNativeLibrary安装及使用,文中所使用到的软件版本:Centos7.9.2009、Java1.8.0_321、Tomcat8.5.84、APR1.7.0。1、APR1.1、APR简介APR(Apac......
  • 【Netty入门和实践】1.传统的socket分析
    我们知道,使用Java进行TCP/UDP协议的网络通信一般使用Java的Net包下的Socket服务进行编写,有Server服务端和Client客户端,服务端用于监听客户端的连接和接......
  • 动手学深度学习-第一章引言
    在DATAwhale的组织下,开始新的一轮深度学习,感谢组织,感谢沐神.机器学习(machinelearning,ML)是一类强大的可以从经验中学习的技术。通常采用观测数据或与环境交互的形式,机器学习算法会......
  • 快速带你入门css
    css复习笔记1.css样式值1.1文字样式1p{2font-size:30px;/*设置文字大小*/3font-weight:bold;/*文字加粗*/4font-style:ital......
  • Vue2入门之超详细教程三-初识模板语法
    1、简介模板语法就是按照固定的模板去书写代码,分为插值语法和指令语法。差值语法:功能:用于解析标签体内容写法:{{xxxx}},xxx是js表达式,且可以读取......
  • 20230317软件测试入门
    https://zh.wikipedia.org/wiki/软件测试https://www.ibm.com/cn-zh/topics/software-testinghttps://www.softwaretestingmaterial.com/software-testing/https......
  • 新手如何入门性能测试?一文4个章节带你学会性能测试
    本文介绍一下性能测试的基础内容和一些学习经验,主要讲针对服务器端的性能测试。其他代码级性能测试、前端性能测试等属于比较细分的领域,建议大家有需要的时候针对性得去学......