Normaliz: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Normalizes rows of matrix to unit vectors.
Normalizes rows of matrix to unit vectors.
===Synopsis===
===Synopsis===
:[ndat,norms] = normaliz(dat)  
:[ndat,norms] = normaliz(dat)  
:[ndat,norms] = normaliz(dat,''out,normtype'')
:[ndat,norms] = normaliz(dat,''out,normtype'')
===Description===
===Description===
NORMALIZ can be used for pattern normalization, which is useful for preprocessing in some pattern recognition applications and also for correction of pathlength effects for some quantification applications.
NORMALIZ can be used for pattern normalization, which is useful for preprocessing in some pattern recognition applications and also for correction of pathlength effects for some quantification applications.
The input is the data matrix dat. Optional input ''out'' suppresses warnings when set to 0 (zero) {default = 1} (warnings are given if the norm of a vector is zero). Optional input ''normtype'' can be used to specify the type of norm {default = 2}. If ''normtype'' is specified then ''out'' must be included, ''out'' can be empty [].
The input is the data matrix dat. Optional input ''out'' suppresses warnings when set to 0 (zero) {default = 1} (warnings are given if the norm of a vector is zero). Optional input ''normtype'' can be used to specify the type of norm {default = 2}. If ''normtype'' is specified then ''out'' must be included, ''out'' can be empty [].
The output is the matrix of normalized data ndat where the ''rows'' have been normalized, and the vector of norms used in the normalization norms. Warnings are given for any vectors with zero norm.
The output is the matrix of normalized data ndat where the ''rows'' have been normalized, and the vector of norms used in the normalization norms. Warnings are given for any vectors with zero norm.
===Algorithm===
===Algorithm===
For a 1 by ''N'' vector '''x''', the norm ''n''<sub>x</sub> is given by  where ''p'' is ''normtype''. The normalized 1 by ''N'' vector '''x'''<sub>n</sub> is given by '''x'''/''n''<sub>x</sub>.
For a 1 by ''N'' vector '''x''', the norm ''n''<sub>x</sub> is given by  where ''p'' is ''normtype''. The normalized 1 by ''N'' vector '''x'''<sub>n</sub> is given by '''x'''/''n''<sub>x</sub>.
===See Also===
===See Also===
[[auto]], [[baseline]], [[mncn]], [[mscorr]], [[snv]]
[[auto]], [[baseline]], [[mncn]], [[mscorr]], [[snv]]

Revision as of 15:26, 3 September 2008

Purpose

Normalizes rows of matrix to unit vectors.

Synopsis

[ndat,norms] = normaliz(dat)
[ndat,norms] = normaliz(dat,out,normtype)

Description

NORMALIZ can be used for pattern normalization, which is useful for preprocessing in some pattern recognition applications and also for correction of pathlength effects for some quantification applications.

The input is the data matrix dat. Optional input out suppresses warnings when set to 0 (zero) {default = 1} (warnings are given if the norm of a vector is zero). Optional input normtype can be used to specify the type of norm {default = 2}. If normtype is specified then out must be included, out can be empty [].

The output is the matrix of normalized data ndat where the rows have been normalized, and the vector of norms used in the normalization norms. Warnings are given for any vectors with zero norm.

Algorithm

For a 1 by N vector x, the norm nx is given by where p is normtype. The normalized 1 by N vector xn is given by x/nx.

See Also

auto, baseline, mncn, mscorr, snv