This is a static copy of a profile report

Home

Optimizer_cpu>Optimizer_cpu.maximization (Calls: 900, Time: 2.795 sec)
Generated 28-May-2016 14:58:45 using performance time.
class method in file /home/johs/work/clustering/src/Optimizer_cpu.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
Optimizer_cpu>Optimizer_cpu.MoGEMclass method900
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
121
w = repmat(weights(i,:), o.nfe...
54001.094 s39.1%
124
o.Sigma(:,:,i) = (mu_deviation...
54001.006 s36.0%
122
o.mu(:,i) = sum(w.*samples,2) ...
54000.408 s14.6%
123
mu_deviation = samples - repma...
54000.193 s6.9%
117
o.P = mean(weights,2);
9000.079 s2.8%
All other lines  0.016 s0.6%
Totals  2.795 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
meanfunction9000.072 s2.6%
Self time (built-ins, overhead, etc.)  2.723 s97.4%
Totals  2.795 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function17
Non-code lines (comments, blank lines)1
Code lines (lines that can run)16
Code lines that did run10
Code lines that did not run6
Coverage (did run/can run)62.50 %
Function listing
time 
Calls 
 line
 116 
        function [o] = maximization(o, weights, samples)
  0.08 
    900 
 117 
            o.P = mean(weights,2); 
< 0.01 
    900 
 118 
            for i = 1:o.nclass 
< 0.01 
   5400 
 119 
                weight_share = o.P(i) * o.nsample; 
< 0.01 
   5400 
 120 
                if weight_share >= 2 
  1.09 
   5400 
 121 
                    w = repmat(weights(i,:), o.nfeature, 1); 
  0.41 
   5400 
 122 
                    o.mu(:,i) = sum(w.*samples,2) / weight_share; 
  0.19 
   5400 
 123 
                    mu_deviation = samples - repmat(o.mu(:,i), 1, o.nsample); 
  1.01 
   5400 
 124 
                    o.Sigma(:,:,i) = (mu_deviation * (w.*mu_deviation)') / weight_share; 
 125 
                else
 126 
					fprintf('%-10s %10.6f %10.6f class %d\n', 'SINGULAR', 0, 0, i-1);
 127 
					o.P(i) = 1/o.nclass;
 128 
					o.mu(:,i) = samples(:,1+round(N-1)*rand);
 129 
					o.Sigma(:,:,i) = cov(samples') / o.nclass;
 130 
                end
< 0.01 
   5400 
 131 
            end 
< 0.01 
    900 
 132 
        end 

Other subfunctions in this file are not included in this listing.