Is there a function that does Multivariate Gaussian Regression?
显示 更早的评论
Hi,
I have implemented a multivariate regression model using the MATLAB mvregress function. The model has been trained using data from 108 dances (each dance is described using 31 measurements). Dances have different emotions, which can be expressed using two variables, ρ and θ. The input of the model is a dance with an unknown emotion. The MV regress model works fine, but the results are not always accurate since the model used is linear. I was looking for a function that does multivariate gaussian regression or a way to modify the mvregress function for Gaussian instead of linear regression.
Xmat's size is 108 x 31
Y's size is 108 x 2 (ρ and θ)
Input's size is 1 x 31
n = 108;
d = 2;
Xcell = cell(1,n);
for i = 1:n
Xcell{i} = [kron([Xmat(i,:)],eye(d))];
end
[beta,sigma,E,V] = mvregress(Xcell,Y);
B = reshape(beta,2,32)';
ptb = bsxfun(@times,Input(1,:),B(2:32,1)');
ptb = sum(ptb,2);
rho = bsxfun(@plus,[B(1,1) 0]',ptb);
ptb = bsxfun(@times,Input(1,:),B(2:32,2)');
ptb = sum(ptb,2);
theta = bsxfun(@plus,[B(1,2) 0]',ptb);
Thanks,
Andreas
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!