Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/17 16:52:36 (8 years ago)
Author:
abeham
Message:

#2457: working on MemPR integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/KnowledgeCenter.cs

    r14667 r14776  
    202202        key2Idx.Add(kvp.Key, kvp.Index);
    203203
     204      Func<double[], double[], double> euclid = (a, b) => Math.Sqrt(a.Zip(b, (x, y) => (x - y)).Sum(x => x * x));
     205      Func<DoubleArray, DoubleArray, double> euclidDArray = (a, b) => Math.Sqrt(a.Zip(b, (x, y) => (x - y)).Sum(x => x * x));
    204206      #region MDS
    205       Func<double[], double[], double> euclid = (a, b) => Math.Sqrt(a.Zip(b, (x, y) => (x - y)).Sum(x => x * x));
    206207      var num = instances.Count;
    207208      var matrix = new DoubleMatrix(num, num);
     
    243244        tsneFeatures[key2Idx.GetByFirst(instance.Key)] = new DoubleArray(instance.Value);
    244245      }
    245       var tsneCoords = TSNE<DoubleArray>.Run(tsneFeatures, 2, Math.Min((instances.Count - 1) / 3, 50), 0.1, (a, b) => Math.Sqrt(a.Zip(b, (c, d) => (c - d) * (c - d)).Sum()), new FastRandom(42));
     246      var tsne = new TSNE<DoubleArray>(new EuclidianDistance(), new FastRandom(42), stopLyingIter: 0, momSwitchIter: 0, momentum: 0, finalMomentum: 0, eta: 10);
     247      var tsneCoords = tsne.Run(tsneFeatures, 2, Math.Min((instances.Count - 1) / 4, 50), 0);
     248      //var tsneCoords = TSNE<DoubleArray>.Run(tsneFeatures, 2, Math.Min((instances.Count - 1) / 4, 50), 0, euclidDArray, new FastRandom(42));
    246249      #endregion
    247250
Note: See TracChangeset for help on using the changeset viewer.