This is a static copy of a profile report

Home

Optimizer_cpu>Optimizer_cpu.score (Calls: 9, Time: 0.327 sec)
Generated 28-May-2016 14:58:47 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
...ll_classes_within_confidence_intervalclass method9
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
74
weight_bins(b) = sum((bin_memb...
27000.190 s58.1%
70
edges = single(norminv((0:o.C....
1350.048 s14.6%
71
[~,~,bin_membership] = histcou...
1350.037 s11.2%
63
threshold = chi2inv(cl, (o.C.N...
90.036 s10.9%
72
weight_bins = zeros(o.C.NPROBA...
1350.003 s0.9%
All other lines  0.014 s4.3%
Totals  0.327 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
histcountsfunction1350.030 s9.0%
chi2invfunction90.026 s8.0%
norminvfunction1350.007 s2.3%
Self time (built-ins, overhead, etc.)  0.264 s80.7%
Totals  0.327 s100% 
Code Analyzer results
Line numberMessage
Coverage results
Show coverage for parent directory
Total lines in function19
Non-code lines (comments, blank lines)2
Code lines (lines that can run)17
Code lines that did run17
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
Calls 
 line
  61 
        function [scores] = score(o, weights, samples)
< 0.01 
      9 
  62 
            cl = 1 - (1-o.C.CONFIDENCE_LEVEL)/(o.nfeature*o.nclass); 
  0.04 
      9 
  63 
            threshold = chi2inv(cl, (o.C.NPROBABILITY_BINS - o.C.DOFS)); 
  64 

< 0.01 
      9 
  65 
            classwise_share = sum(weights, 2); 
< 0.01 
      9 
  66 
				scores = zeros(o.nfeature, o.nclass, 'single'); 
< 0.01 
      9 
  67 
            for j = 1:o.nclass 
< 0.01 
     45 
  68 
                expected_distribution = classwise_share(j)/o.C.NPROBABILITY_BINS; 
< 0.01 
     45 
  69 
                for i = 1:o.nfeature 
  0.05 
    135 
  70 
                    edges = single(norminv((0:o.C.NPROBABILITY_BINS)/o.C.NPROBABILITY_BINS, o.mu(i,j), sqrt(o.Sigma(i,i,j)))); 
  0.04 
    135 
  71 
                    [~,~,bin_membership] = histcounts(samples(i,:), edges); 
< 0.01 
    135 
  72 
                    weight_bins = zeros(o.C.NPROBABILITY_BINS, 1, 'single'); 
< 0.01 
    135 
  73 
                    for b = 1:o.C.NPROBABILITY_BINS 
  0.19 
   2700 
  74 
                        weight_bins(b) = sum((bin_membership==b) .* weights(j,:)); 
< 0.01 
   2700 
  75 
                    end 
< 0.01 
    135 
  76 
                    scores(i,j) = sum((weight_bins-expected_distribution).^2/expected_distribution) / threshold; 
< 0.01 
    135 
  77 
                end 
< 0.01 
     45 
  78 
            end 
< 0.01 
      9 
  79 
        end 

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