gpt4 book ai didi

matlab - 一般数据集的数据增强技术?

转载 作者:太空宇宙 更新时间:2023-11-03 19:12:42 27 4
gpt4 key购买 nike

我正在研究机器学习问题,想在 matlab 中构建基于神经网络的分类器。一个问题是数据以特征的形式给出,样本数量要少得多。我知道图像的数据增强技术,通过旋转、平移、仿射平移等。

我想知道是否有适用于一般数据集的数据增强技术?比如是否可以使用随机性来生成更多数据?我看了答案 here但我不明白。

请尽可能提供工作细节的答案。

我们将不胜感激。

最佳答案

你需要调查autoencoders .实际上,您将数据传递到低级神经网络,它应用类似 PCA 的分析,随后您可以使用它来生成更多数据。

Matlab 有一个 autoencoder类以及 function ,这将为您完成所有这一切。来自matlab帮助文件

Generate the training data.

rng(0,'twister'); % For reproducibility
n = 1000;
r = linspace(-10,10,n)';
x = 1 + r*5e-2 + sin(r)./r + 0.2*randn(n,1);

Train autoencoder using the training data.

hiddenSize = 25;
autoenc = trainAutoencoder(x',hiddenSize,...
'EncoderTransferFunction','satlin',...
'DecoderTransferFunction','purelin',...
'L2WeightRegularization',0.01,...
'SparsityRegularization',4,...
'SparsityProportion',0.10);

Generate the test data.

n = 1000;
r = sort(-10 + 20*rand(n,1));
xtest = 1 + r*5e-2 + sin(r)./r + 0.4*randn(n,1);

Predict the test data using the trained autoencoder, autoenc .

xReconstructed = predict(autoenc,xtest');

Plot the actual test data and the predictions.

figure;
plot(xtest,'r.');
hold on
plot(xReconstructed,'go');

Plot results

您可以看到绿色圆圈,代表自动编码器生成的额外数据。

关于matlab - 一般数据集的数据增强技术?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39265746/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com