The stress factor for multidimensional scaling.
Calculates the GOF statistics for multidimensional scaling. The stress factor is defined as:
where hat(d(i,j)) is the predicted distance based on the MDS model. In his original paper on multi dimensional scaling, Kruskal (1964) gave following advise about stress values based on his experience:
More recent articles caution against using a table like this since acceptable values of stress depends on the quality of the distance matrix and the number of objects in that matrix.
Example 1
D stores data distance matrix, DHat stores reduced dimension estimated distance matrix. Uses MtxExpr, Statistics, Math387;
procedure Example;
var D,DHat: Matrix;
stress: TSample;
begin
...
// Calculate stress value - measure for GOF
// Smaller stress value means better GOF.
stress := MDScaleStress(D,DHat);
end;
#include "MtxVecCpp.h"
#include "Statistics.hpp"
void __fastcall Example()
{
Matrix D,DHat;
...
// Calculate stress value - measure for GOF
// Smaller stress value means better GOF.
double stress = MDScaleStress(D,DHat);
}
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
private void Example()
{
Matrix D = new Matrix(0,0);
Matrix DHat = new Matrix(0,0);
...
// Calculate stress value - measure for GOF
// Smaller stress value means better GOF.
double stress = MDScaleStress(D,DHat);
}
}