Click or drag to resize
Accord.NET (logo)

ProcrustesAnalysis Class

Class to perform a Procrustes Analysis
Inheritance Hierarchy
SystemObject
  Accord.Statistics.AnalysisProcrustesAnalysis

Namespace:  Accord.Statistics.Analysis
Assembly:  Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax
public class ProcrustesAnalysis : IAnalysis
Request Example View Source

The ProcrustesAnalysis type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyProcrustedDatasets
Procrusted models produced from the computed sample data
Public propertyProcrustesDistances
Procrustes Distances of the computed samples
Top
Methods
  NameDescription
Public methodCompute
Compute the Procrustes analysis to extract Procrustes distances and models using the constructor parameters
Public methodCompute(Double)
Compute the Procrustes analysis to extract Procrustes distances and models
Public methodCompute(Int32, Double)
Compute the Procrustes analysis to extract Procrustes distances and models by specifying the reference dataset
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

Procrustes analysis is a form of statistical shape analysis used to analyze the distribution of a set of shapes. It allows to compare shapes (datasets) that have different rotations, scales and positions. It defines a measure called Procrustes distance that is an image of how different the shapes are.

References:

  • Wikipedia contributors. "Procrustes analysis" Wikipedia, The Free Encyclopedia, 21 Sept. 2015. Available at: https://en.wikipedia.org/wiki/Procrustes_analysis
  • Amy Ross. "Procrustes Analysis" Available at : http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.119.2686&rep=rep1&type=pdf

Examples
// This examples shows how to use the Procrustes Analysis on basic shapes
// We're about to demonstrate that a diamond with four identical edges is also a square !

// Define a square
double[,] square = { { 100, 100 },
                     { 300, 100 },
                     { 300, 300 },
                     { 100, 300 }
                   };
// Define a diamond with different orientation and scale
double[,] diamond = { { 170, 120 },
                      { 220, 170 },
                      { 270, 120 },
                      { 220, 70 }
                    };

// Create the Procrustes analysis object
ProcrustesAnalysis pa = new ProcrustesAnalysis(square, diamond);

// Compute the analysis on the square and the diamond
pa.Compute();

// Assert that the diamond is a square
Debug.Assert(pa.ProcrustesDistances[0, 1].IsEqual(0.0, 1E-11));

// Transform the diamond to a square
double[,] diamond_to_a_square = pa.ProcrustedDatasets[1].Transform(pa.ProcrustedDatasets[0]);
See Also