From perceptrons to machine learning (一)

本文从20世纪50年代的感知机开始,介绍了感知机的工作原理,如何通过权重和阈值进行决策。然后引入了偏置的概念,并讨论了感知机如何实现基本的逻辑功能。接着,文章过渡到机器学习,解释了在未知权重和偏置的情况下,如何通过已有的输入-输出样本来调整这些参数。最后,提出了sigmoid神经元,以解决在权重和偏置微调时输出平滑变化的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. Start from perceptrons
    1.1 Developed in the 1950s and 1960s by the scientist Frank Rosenblatt.
    A perceptron takes several binary inputs, x1, x2, …, and produces a single binary output with variant weights.
    在这里插入图片描述
    By varying the weights and the threshold, we can get different models of decision-making.
    在这里插入图片描述
    简单理解: 我要决定明天是否去听一个音乐会,会影响这个决定的因素如下:
    a. 我女朋友去不去
    b. 会不会下雨
    c. 这个音乐会是不是很吸引我
    每个因素会有个权重,也就是weight, 假设每个因素输入都是0和1, 那么乘以权重,跟自己设定的threshold对比就可以决定是否去参加!权重决定了每个因素的重要性。

1.2 Modify the way we describe perceptrons as below, introduce bias(b) instead of threshold.
在这里插入图片描述
it’s interesting that perceptrons can be used to compute the elementary logic functions(与或门一类的,参考数字电路)
1 * (-2) + 1 * (-2) + 3 = -1
在这里插入图片描述
Sample of NAND gate.
在这里插入图片描述

  1. From perceptrons to machine learning.
    2.1 What is machine learning
    Now the problem is that we don’t know the weights and bias in above perceptrons, but we have a lot of inputs-outputs which we can refer to. For example :
    person a : 我女朋友去,下雨,我喜欢这个音乐会 ->我去
    person b : 我女朋友去,不下雨,我喜欢这个音乐会 ->我去。。。
    person x : …
    We need to know the weights and bias that we can setup the perceptron for future decision making.

We can setup some initial value(randomly) of weights and bias, then use the sample inputs to do calculation. Compare with the actual results, to know the differences. Then we can adjust the weights and bias according to the results, then run the perceptons again. --this is machine learning.

2.2 Introduce Sigmoid neurons
In above machine learning procedures, we need to adjust the weights and bias according to result differences. Then we can modify the weights and bias a little, and we want to see just small changes in the output. But go back to the above perceptron, we can see that the output’s chart as below, the output can only be 0 or 1. We cannot have small change of output with small change of weights and bias.
在这里插入图片描述

We need to make the chart smooth, and differentiable, so we introduced sigmoid function.
σ(z) = 1/(1+exp(-z)). As below chart, the smoothness of the sigmoid function means small changes of W and B will produce a small change of output.
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值