covartech / PRT

Pattern Recognition Toolbox for MATLAB
http://covartech.github.io/
MIT License
144 stars 70 forks source link

time consuming line in prtRvMixture.set.components #5

Closed peterTorrione closed 11 years ago

peterTorrione commented 12 years ago

I end up spending a lot of time in prtUtilIsMethodIncludeHidden, looking for weightedMle when I need to make a lot of GMM's over and over again...

Like > 1/3rd of the whole process. Can we have a new class prtRvMixable, that defines abstract weightedMle? Then if you want to be mixable, you inherit from prtRv & prtRvMixable?

                                          function R = set.components(R,CompArray)

0.20 26489 117 if ~isempty(CompArray) 1.29 26489 118 assert(isa(CompArray(1),'prtRv'),'components must be a prtRv'); 64.10 26489 119 assert(prtUtilIsMethodIncludeHidden(CompArray(1),'weightedMle'),'The %s class is not capable of mixture modeling as it does not have a weightedMle method.',class(CompArray(1))); 0.26 26489 120 assert(isvector(CompArray),'components must be an array of prtRv objects'); 0.01 26489 121 end

newfolder commented 12 years ago

This change has been made. Thanks for the suggestion.

peterTorrione commented 11 years ago

Seems fixed.