Changeset 6338 for branches/histogram/HeuristicLab.Analysis/3.3/Tests
- Timestamp:
- 05/30/11 17:21:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Analysis/3.3/Tests/MultidimensionalScalingTest.cs
r5938 r6338 21 21 22 22 using System; 23 using System.Globalization; 23 24 using HeuristicLab.Data; 24 25 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 42 43 distances3[0, 2] = distances3[2, 0] = 6.4; 43 44 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)); 46 50 Assert.IsTrue(stress < 0.1); 47 51 DoubleMatrix distances4 = new DoubleMatrix(4, 4);
Note: See TracChangeset
for help on using the changeset viewer.