Comments (7)
谢谢指出错误,fixing...
from ai-edu.
【7.2线性多分类的神经网络实现】思考与练习:
从4个样本的推理结果来看,分类都是正确的,但是只有第一个样本的结果的0.734的概率值处于绝对领先位置,其它几个分类的概率值优势并不明显,这是为什么?如何让其正确分类的概率值的差距更大?
- 当样本数据越接近两个分类的分割线时,则该样本位于分割线两侧的分类的概率越接近。
- 我的想法是从SoftMax类中的forward函数入手。我们在该函数中为避免计算溢出有如下改进:
shift_z = z - np.max(z, axis=1, keepdims=True)
exp_z = np.exp(shift_z)
a = exp_z / np.sum(exp_z, axis=1, keepdims=True)
由shift_z<=0,如果对shift_z乘上系数a(a>1),则得到exp_z'=np.power(exp_z,a),对np.power(exp_z,a) / np.sum(np.power(exp_z,a), axis=1, keepdims=True)
化简后可推导得到exp_z越大,得到的新概率就越大
from ai-edu.
当系数a=1.5时,我得到如下结果:
w= [[-1.16141288 -2.82832541 3.98973829] [ 3.60888522 -2.30797064 -1.30091458]]
b= [[-1.45768655 2.91008039 -1.45239384]]
output= [[0.00903175 0.77403588 0.21693236] [0.22562913 0.12809308 0.64627779] [0.39531895 0.37732049 0.22736056] [0.53449856 0.45238934 0.0131121 ]]
当系数a=2时,得到如下结果:
w= [[-0.99055252 -2.37294419 3.36349671] [ 3.06044087 -1.9448823 -1.11555856]]
b= [[-1.23151125 2.44669232 -1.21518107]]
output= [[0.00531191 0.80002046 0.19466762] [0.2091815 0.11111932 0.67969918] [0.40393934 0.38113192 0.21492873] [0.54796686 0.44374614 0.00828699]]
from ai-edu.
【7.3线性多分类原理】思考与练习:
1.我们假设$w_{21} > w_{22} > w_{23}$是否有根据呢?假设$w_{21} > w_{23} > w_{23}$,直线的位置会有所变化吗?
2.最后一张图的三条直线应该相交于一点吗?
-
(a)当我们分析第一类样本时,将第一类样本与其他样本分开的直线是
y_{12} = W_{12} \cdot x + B_{12}
y_{13} = W_{13} \cdot x + B_{13}
而第一类的蓝色点样本都位于两条直线的上方,即公式18、19
y > W_{12} \cdot x + B_{12} \tag{18}
y > W_{13} \cdot x + B_{13} \tag{19}
再结合公式13、14,可推得w_{21}>w_{22},w_{21}>w_{23}(b)第一问的第二部分是写错了吗?
-
如果有点p,其(x,y)坐标位于三条分割线围成的三角形中,则该点p不属于三分类中的任何一类。
from ai-edu.
07.1-多分类函数中第22个公式的推导的倒数第二步应该是-e^zi/E*e^zj/E,你写成两个都是j了
from ai-edu.
from ai-edu.
from ai-edu.
Related Issues (20)
- 有个公式中的值希望您能帮我解答一下 HOT 2
- 无法下载数据> 请问,数据在哪里down HOT 6
- 这个章节图片无法显示 HOT 1
- B15-基于深度学习的代码搜索案例中爬取好的数据集链接失效
- 图片加载失败 -- 神经网络基本原理教程说明 HOT 1
- 数据包下载路径访问异常,无法正常下载 HOT 4
- mkdocs build 图片不显示 HOT 2
- H
- 17.3.1 计算反向传播的梯度矩阵 公式 1,2,3,4 显示错误
- 1.3.3 神经网络中的矩阵运算 公式显示错误 HOT 2
- 1.3 插图中的文案错误
- Education it
- 大量图片路径错误 HOT 2
- 大量图片路径错误 HOT 3
- 请教一个L1正则中的疑惑 HOT 1
- 图片内容错误 HOT 3
- 图片加载不出 HOT 5
- 实践案例中的量化交易的源代码无法找到
- 请问这个项目以后还会更新吗? HOT 2
- 这里貌似有错误? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-edu.