Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/17 12:15:37 (7 years ago)
Author:
gkronber
Message:

#2700: made some changes / bug-fixes while reviewing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEStatic.cs

    r14837 r14855  
    285285          var minBeta = double.MinValue;
    286286          var maxBeta = double.MaxValue;
    287           const double tol = 1e-5;  // TODO: why 1e-5?
     287          const double tol = 1e-5; 
    288288
    289289          // Iterate until we found a good perplexity
    290290          var iter = 0; double sumP = 0;
    291           while(!found && iter < 200) {  // TODO 200 iterations always ok?
     291          while(!found && iter < 200) { 
    292292
    293293            // Compute Gaussian kernel row
    294             for(var m = 0; m < k; m++) curP[m] = Math.Exp(-beta * distances[m + 1]); // TODO distances m+1?
     294            for(var m = 0; m < k; m++) curP[m] = Math.Exp(-beta * distances[m + 1]);
    295295
    296296            // Compute entropy of current row
     
    298298            for(var m = 0; m < k; m++) sumP += curP[m];
    299299            var h = .0;
    300             for(var m = 0; m < k; m++) h += beta * (distances[m + 1] * curP[m]); // TODO: distances m+1?
     300            for(var m = 0; m < k; m++) h += beta * (distances[m + 1] * curP[m]);
    301301            h = h / sumP + Math.Log(sumP);
    302302
Note: See TracChangeset for help on using the changeset viewer.