采用深度稀疏自动编码器实现高维矩阵降维,提取特征


将节点相似度矩阵,作为深度稀疏自动编码器的输入,并通过不断迭代,作为输出低维特征矩阵。(matlab编写)
资源截图
代码片段和文件信息
function [] = checkNumericalGradient()
% This code can be used to check your numerical gradient implementation 
% in computeNumericalGradient.m
% It analytically evaluates the gradient of a very simple function called
% simpleQuadraticFunction (see below) and compares the result with your numerical
% solution. Your numerical gradient implementation is incorrect if
% your numerical solution deviates too much from the analytical solution.
  
% Evaluate the function and gradient at x = [4; 10]; (Here x is a 2d vector.)
x = [4; 10];
[value grad] = simpleQuadraticFunction(x);

% Use your code to numerically compute the gradient of simpleQuadraticFunction at x.
% (The notation “@simpleQuadraticFunction“ denotes a pointer to a function.)
numgrad = computeNumericalGradient(@simpleQuadraticFunction x);

% Visually examine the two gradient computations.  The two columns
% you get should be very similar. 
disp([numgrad grad]);
fprintf(‘The above two columns you get should be very similar.
(Left-Your Numerical Gradient Right-Analytical Gradient)

‘);

% Evaluate the norm of the difference between two solutions.  
% If you have a correct implementation and assuming you used EPSILON = 0.0001 
% in computeNumericalGradient.m then diff below should be 2.1452e-12 
diff = norm(numgrad-grad)/norm(numgrad+grad);
disp(diff); 
fprintf(‘Norm of the difference between numerical and analytical gradient (should be < 1e-9)

‘);
end


  
function [valuegrad] = simpleQuadraticFunction(x)
% this function accepts a 2D vector as input. 
% Its outputs are:
%   value: h(x1 x2) = x1^2 + 3*x1*x2
%   grad: A 2x1 vector that gives the partial derivatives of h with respect to x1 and x2 
% Note that when we pass @simpleQuadraticFunction(x) to computeNumericalGradients we‘re assuming
% that computeNumericalGradients will use only the first returned value of this function.

value = x(1)^2 + 3*x(1)*x(2);

grad = zeros(2 1);
grad(1)  = 2*x(1) + 3*x(2);
grad(2)  = 3*x(1);

end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1982  2014-10-30 12:38  SparseAutoencodercheckNumericalGradient.m

     文件       1531  2014-10-30 12:38  SparseAutoencodercomputeNumericalGradient.m

     文件       2647  2014-10-30 12:38  SparseAutoencoderdisplay_network.m

     文件        622  2014-10-30 12:38  SparseAutoencoderinitializeParameters.m

     文件        884  2019-02-25 17:56  SparseAutoencodermain.m

     文件       3143  2014-10-30 12:38  SparseAutoencoderminFuncArmijoBacktrack.m

     文件        807  2014-10-30 12:38  SparseAutoencoderminFuncautoGrad.m

     文件        901  2014-10-30 12:38  SparseAutoencoderminFuncautoHess.m

     文件        307  2014-10-30 12:38  SparseAutoencoderminFuncautoHv.m

     文件        870  2014-10-30 12:38  SparseAutoencoderminFuncautoTensor.m

     文件        374  2014-10-30 12:38  SparseAutoencoderminFunccallOutput.m

     文件       1763  2014-10-30 12:38  SparseAutoencoderminFuncconjGrad.m

     文件        953  2014-10-30 12:38  SparseAutoencoderminFuncdampedUpdate.m

     文件       2421  2014-10-30 12:38  SparseAutoencoderminFuncexample_minFunc.m

     文件       1556  2014-10-30 12:38  SparseAutoencoderminFuncexample_minFunc_LR.m

     文件        106  2014-10-30 12:38  SparseAutoencoderminFuncisLegal.m

     文件        885  2014-10-30 12:38  SparseAutoencoderminFunclbfgs.m

     文件       2293  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.c

     文件       7707  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexa64

     文件       7733  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexglx

     文件       9500  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexmac

     文件      12660  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexmaci

     文件       8800  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexmaci64

     文件       7168  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexw32

     文件       9728  2014-10-30 12:38  SparseAutoencoderminFunclbfgsC.mexw64

     文件        594  2014-10-30 12:38  SparseAutoencoderminFunclbfgsUpdate.m

     文件        397  2014-10-30 12:38  SparseAutoencoderminFunclogisticLogisticDiagPrecond.m

     文件        208  2014-10-30 12:38  SparseAutoencoderminFunclogisticLogisticHv.m

     文件        625  2014-10-30 12:38  SparseAutoencoderminFunclogisticLogisticLoss.m

     文件       1111  2014-10-30 12:38  SparseAutoencoderminFunclogisticmexutil.c

............此处省略34个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)