Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/30/11 17:21:30 (14 years ago)
Author:
abeham
Message:

#1539

  • changed MDS optimization algorithm to Levenberg-Marquardt
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram/HeuristicLab.Analysis/3.3/Tests/MultidimensionalScalingTest.cs

    r5938 r6338  
    2121
    2222using System;
     23using System.Globalization;
    2324using HeuristicLab.Data;
    2425using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    4243      distances3[0, 2] = distances3[2, 0] = 6.4;
    4344      distances3[1, 2] = distances3[2, 1] = 5;
    44       stress = MultidimensionalScaling.CalculateNormalizedStress(distances3,
    45         MultidimensionalScaling.KruskalShepard(distances3));
     45      DoubleMatrix coords3 = MultidimensionalScaling.KruskalShepard(distances3);
     46      Console.WriteLine("Coordinates: ");
     47      Console.WriteLine("A = ({0}, {1}), B = ({2}, {3}), C = ({4}, {5})", coords3[0, 0], coords3[0, 1], coords3[1, 0], coords3[1, 1], coords3[2, 0], coords3[2, 1]);
     48      stress = MultidimensionalScaling.CalculateNormalizedStress(distances3, coords3);
     49      Console.WriteLine("Stress = " + stress.ToString(CultureInfo.InvariantCulture.NumberFormat));
    4650      Assert.IsTrue(stress < 0.1);
    4751      DoubleMatrix distances4 = new DoubleMatrix(4, 4);
Note: See TracChangeset for help on using the changeset viewer.