Error using gmdistribution for GMM

Hi, I am trying to create a GMM model for my dataset X which is of size 200x39. At the line gm = gmdistribution(mu, sigma, pcomponents), I am getting the following error
"Error using checkdata (line 18) X must be a matrix with 39 columns.
Error in gmdistribution/pdf (line 16) checkdata(X,obj);"
Size of mu -> 32x39, sigma -> 39x39x32, pcomponents -> 1x32
My X is infact having 39 columns. So I am not able to understand what exactly is causing the error. Any hint would be of great help. Thanks in advance.

Answers (1)

KSSV
KSSV on 15 Dec 2016
Check the sizes of mu, sigma,pcomponents you are entering into the function?
For your data of 200x39, sigma should be 39x39 or 1X39 and pcomponents should 1x200.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 15 Dec 2016

Answered:

on 15 Dec 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!