You are here: Symbol Reference > MtxExpr Namespace > Classes > Matrix Record > public > Matrix.ZScore Method
MtxVec VCL
ContentsIndex
PreviousUpNext
Matrix.ZScore Method

Transforms matrix into matrix of standardized data.

Pascal
function ZScore(const Src: TMtx): TMtx; overload;

The routine uses Data matrix and transforms it into ZScore matrix of standardized data (the so called Z Scores). The standardization of each column (variable) is made by subtracting its mean and dividing by its standard deviation: 

 

Column - Mean(Column) Z(Column) = ----------------------- StdDev(Column)
var Data, Res: Matrix; begin Data.SetIt(3,3,false,[1,2,3, 4,5,6, 7,100,12]); Res.ZScore(Data); // Res = (-1 -0,604 -0,873, // 0 -0,55 -0,218 // 1 1,154 1,091) end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!