资源简介
GMM代码用于目标检测,效果不错 ,需要自己修改下。
代码片段和文件信息
function [net options] = glmtrain(net options x t)
%GLMTRAIN Specialised training of generalized linear model
%
% Description
% NET = GLMTRAIN(NET OPTIONS X T) uses the iterative reweighted
% least squares (IRLS) algorithm to set the weights in the generalized
% linear model structure NET. This is a more efficient alternative to
% using GLMERR and GLMGRAD and a non-linear optimisation routine
% through NETOPT. Note that for linear outputs a single pass through
% the algorithm is all that is required since the error function is
% quadratic in the weights. The error function value at the final set
% of weights is returned in OPTIONS(8). Each row of X corresponds to
% one input vector and each row of T corresponds to one target vector.
%
% The optional parameters have the following interpretations.
%
% OPTIONS(1) is set to 1 to display error values during training. If
% OPTIONS(1) is set to 0 then only warning messages are displayed. If
% OPTIONS(1) is -1 then nothing is displayed.
%
% OPTIONS(2) is a measure of the precision required for the value of
% the weights W at the solution.
%
% OPTIONS(3) is a measure of the precision required of the objective
% function at the solution. Both this and the previous condition must
% be satisfied for termination.
%
% OPTIONS(5) is set to 1 if an approximation to the Hessian (which
% assumes that all outputs are independent) is used for softmax
% outputs. With the default value of 0 the exact Hessian (which is more
% expensive to compute) is used.
%
% OPTIONS(14) is the maximum number of iterations for the IRLS
% algorithm; default 100.
%
% See also
% GLM GLMERR GLMGRAD
%
% Copyright (c) Ian T Nabney (1996-2001)
% Check arguments for consistency
errstring = consist(net ‘glm‘ x t);
if ~errstring
error(errstring);
end
if(~options(14))
options(14) = 100;
end
display = options(1);
% Do we need to test for termination?
test = (options(2) | options(3));
ndata = size(x 1);
% Add a column of ones for the bias
inputs = [x ones(ndata 1)];
% Linear outputs are a special case as they can be found in one step
if strcmp(net.outfn ‘linear‘)
if ~isfield(net ‘alpha‘)
% Solve for the weights and biases using left matrix divide
temp = inputs\t;
elseif size(net.alpha == [1 1])
% Use normal form equation
hessian = inputs‘*inputs + net.alpha*eye(net.nin+1);
temp = pinv(hessian)*(inputs‘*t);
else
error(‘Only scalar alpha allowed‘);
end
net.w1 = temp(1:net.nin :);
net.b1 = temp(net.nin+1 :);
% Store error value in options vector
options(8) = glmerr(net x t);
return;
end
% Otherwise need to use iterative reweighted least squares
e = ones(1 net.nin+1);
for n = 1:options(14)
switch net.outfn
case ‘lo
相关资源
- GMM的matlab实现集合
- GMM模型,用MATlab编写的。可以用来训
- EM算法训练GMM的聚类函数vq_flat看评论
- 高斯混合模型GMM 及高斯混合回归MAT
- 多种图像边缘检测与分割处理matlab实
- matlab水果识别系统设计成品,代码,
- 数学建模国赛题目,代码。圆桌优化
- matlab写的GMM代码
- GMM 混合高斯背景建模
- 声纹识别
- GMMP SkinColor
- 高斯混合模型(GMM)
- GMM-UBM系统框架的MAP算法
- GMM,HMM的语音识别,说话人识别源码
- GMM GMM的说话人识别系统
- GMM 本代码建立高斯混合模型(高斯多
- MFCC-GMM 基于MFCC的GMM的说话人识别
- speech-emotion-recognition-system gmm模型下的
- GMMsegmation
- GMM 做毕设是用到的gmm的matlab程序
- Voice_Conversion_1 基于GMM模型实现语音转
- clustering 使用K-means
- HMM_GMM 一个有效的
- GMM GMM说话人识别平台全套
- voice-conversion--MFCC-GMM 实现多个人的说
- GMM 建立了混合高斯模型
- mulgmm 利用混合高斯模型对图像序列经
- SpeakerMFCCGMM
- 高斯混合模型matlab代码
- 二维高斯混合模型GMM图形化简单明了
评论
共有 条评论