GPU for HMM training
Mostrar comentarios más antiguos
Hi I have a large dataset and when I used hidden markov model to train the data I have to wait a long time. Would GPU parallel computing speed this up. It seems the HMM (in the stats toolbox) is not mentioned as a supported function within the it.
Any experience or ideas?
Respuesta aceptada
Más respuestas (2)
John Melonakos
el 7 de Jun. de 2011
Jacket has been used heavily for HMMs on the GPU in MATLAB. K-Means is also really fast. Here is some sample code:
% initial points
n = 1e6; % 3e6;
X = [randn(n,1) randn(n,1)] * 2;
ind = ceil(6*rand(n,1));
X(ind<3,1) = X(ind<3,1)/2 - 7;
X(ind==4,:) = X(ind==4,:)/3 + 4;
X = X';
% cluster
k = 20; % 5 clusters
X = gsingle(X);
[d n] = size(X);
assert(d == 2); % just for 2D case
% initial state
Z = X(:, ceil(1:n/k:n));
Z = reshape(Z, [2 1 k]);
% kmeans phase 1, 10 iterations
tic
for i = 1:10, i
% distances
D = bsxfun(@minus, X, Z);
D = sum(D .* D);
D = permute(D, [3 2 1]);
% minimum distances
[Y, I] = min(D);
% re-assign clusters
for j = 1:k
ii = find(I == j); if isempty(ii), error('empty cluster'); end
Z(:,1,j) = mean(X(:,ii), 2);
end
end
toc
engstudent
el 7 de Dic. de 2012
0 votos
hi every one i am working in isolated word recognition and i need the step to use the hmm in matlab 2012, if any one can help me please send help to my email"sajasaad_eng@yahoo.com".
Categorías
Más información sobre Parallel and Cloud en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!