当前位置:网站首页>Neural Network Study Notes 4 - Autoencoder (including sparse, stacked) (updated)
Neural Network Study Notes 4 - Autoencoder (including sparse, stacked) (updated)
2022-07-30 10:40:00 【Oreos are delicious】
目录
配套讲解视频
It is recommended to read the blog post in conjunction with the video
10Minutes to learn automatic encoder from principle to programming implementation_哔哩哔哩_bilibili
10Minutes to learn automatic encoder from principle to programming implementation
1.Programs and Datasets
链接:https://pan.baidu.com/s/1aSNq94BJuKsiKO5gNGF29Q
提取码:6666
--来自百度网盘超级会员V5的分享
2.自动编码器
2.1自编码器原理
Learning efficient encodings in a set of data by means of unsupervised learning


The target of the autoencoder:Re-extract features,降低维度,Minimize refactoring errors
目标函数:Make the refactoring error as 0

Simple two-layer autoencoder example

2.2代码实现
1.数据导入
D=xlsread('C:\Users\86188\Desktop\B站ppt\ae\RaisinDataset.xlsx');
data=D(:,1:7)';
label=D(:,8)';2.数据集处理
k=rand(1,900);
[m,n]=sort(k);
input_train=data(:,n(1:750));
input_test=data(:,n(751:900));
output_train=label(:,n(1:750));
output_test=label(:,n(751:900));
x = input_train;
t=ind2vec(output_train);
t=full(t)3.设置网络结构
ae1=trainAutoencoder(x,5);
features=encode(ae1,x);
softmax=trainSoftmaxLayer(features,t);
nets=stack(ae1,softmax);4.显示结果,测试网络
view(nets)
output_test
y=nets(input_test) 
5.计算准确率
for i=1:150
output_fore(i)=find(y(:,i)==max(y(:,i)));
end
right1=0;
for i=1:150
if output_fore(i) == output_test(i)
right1=right1+1;
end
end
right=right1/1503.堆叠式自编码器
对于很多数据来说,仅使用两层神经网络的自编码器还不足以获取一种好的数据表示,为了获取更好的数据表示,我们可以使用更深层的神经网络,深层神经网络作为自编码器提取的数据表示一般会更加抽象,It can better capture the semantic information of the data.
在实践中经常使用逐层堆叠的方式来训练一个深层的自编码器.称为堆叠自编码器(StackedAuto-EncoderSAE)Stacked autoencoders can generally be trained layer by layer(Layer-WiseTraining)来学习网络参数
4.稀疏自编码器
4.1稀疏编码
Advantages of sparse coding
(1).计算量
稀疏性带来的最大好处就是可以极大地降低计算量.
(2)可解释性
因为稀疏编码只有少数的非零元素,相当于将一个输入样本表示为少数几个相关的特征.这样我们可以更好地描述其特征,并易于理解.
(3)特征选择
稀疏性带来的另外一个好处是可以实现特征的自动选择,只选择和输入样本相关的最少特征,This allows for a better representation of the input samples,降低噪声并减轻过拟合.
4.2.稀疏自编码器
By feeding the hidden layer units in the autoencoderz加上稀疏性限制,自编码器可以学习到数据中一些有用的结构.
目标函数

WRepresents a parameter in the autoencoder
和稀疏编码一样,The advantage of sparse autoencoders is high interpretability,并同时进行了隐式的特征选择.
结构图

边栏推荐
- Re19: Read the paper Paragraph-level Rationale Extraction through Regularization: A case study on European Court
- MySQL |子查询
- PyQt5 - Drawing different types of straight lines
- JCL 学习
- Js array operating mobile for encapsulation
- Re15: Read the paper LEVEN: A Large-Scale Chinese Legal Event Detection Dataset
- Selected System Design | Design of CAN Bus Controller Based on FPGA (with Code)
- In 2022, the top will be accepted cca shut the list
- 606. Create a string from a binary tree (video explanation!!!)
- Meikle Studio-Look at the actual combat notes of Hongmeng device development six-wireless networking development
猜你喜欢

线上靶机prompt.ml

Re19: Read the paper Paragraph-level Rationale Extraction through Regularization: A case study on European Court

flowable workflow all business concepts

从数据流中快速查找中位数
![[Qualcomm][Network] 网络拨号失败和netmgrd服务分析](/img/76/49054ff8c7215eca98cc479ab1d986.png)
[Qualcomm][Network] 网络拨号失败和netmgrd服务分析

易基因:人类tRNA基因位点表现出与衰老相关的DNA高甲基化|研究文章

4. yolov5-6.0 ERROR: AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor' solution

JVM内存布局、类加载机制及垃圾回收机制详解

Quick Start Tutorial for flyway

Alibaba Cloud OSS Object Storage
随机推荐
jmeter接口压力测试(一)
Flask's routing (app.route) detailed
flyway的快速入门教程
ospf2 two-point two-way republish (question 2)
Basic operations of sequence table in C language
Paper reading: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
软考 系统架构设计师 简明教程 | 案例分析 | 需求分析
PyQt5 - draw text on window
606. 根据二叉树创建字符串(视频讲解!!!)
Scrapy爬虫之网站图片爬取
idea2021+Activiti [the most complete note one (basic use)]
Re21:读论文 MSJudge Legal Judgment Prediction with Multi-Stage Case Representation Learning in the Real
Do you really understand the 5 basic data structures of Redis?
flowable工作流所有业务概念
Verilog之数码管译码
自适应控制——仿真实验一 用李雅普诺夫稳定性理论设计自适应规律
(***Key points***) Flink common memory problems and tuning guide (1)
idea2021+Activiti【最完整笔记一(基础使用)】
Multi-threading scheme to ensure that a single thread opens a transaction and takes effect
Study Notes 11--Direct Construction of Local Trajectories