Manhattandist: Difference between revisions
Jump to navigation
Jump to search
imported>Benjamin (Created page with "===Purpose=== Calculates ===Synopsis=== :distances = manhattandist(x) :distances = manhattandist(x,basis) :distances = manhattandist(x,options) :distances = manhattandist(x...") |
imported>Benjamin mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Calculates | Calculates the Manhattan Distance between: (1) Samples (rows) of a Dataset Object (DSO) a matrix. (2) rows of one DSO/matrix and the rows of another DSO/matrix. | ||
===Synopsis=== | ===Synopsis=== | ||
Line 10: | Line 10: | ||
===Description=== | ===Description=== | ||
Calculates the Manhattan Distance, sum of the absolute value differences, from each row to every other row in the supplied matrix or, optionally, all rows of (x) to all rows in a second matrix (basis). | |||
====Inputs==== | ====Inputs==== | ||
* '''x''' = A | * '''x''' = A DSO or a matrix. | ||
====Optional Inputs==== | ====Optional Inputs==== | ||
* '''basis''' = A second | * '''basis''' = A second DSO/matrix to compare the first DSO/matrix against when calculating Manhattan distance. | ||
* '''options''' = | * '''options''' = Discussed below. | ||
====Outputs==== | ====Outputs==== | ||
* '''distances''' = | * '''distances''' = An m-by-m matrix containing the comprehensive calculated Manhattan distances between samples. | ||
====Options==== | |||
options = A structure array with the following fields: | |||
* '''waitbar''': [{'auto'}| 'on' | 'off' ], display waitbar. 'Auto' setting will automatically display a waitbar if computation takes longer than 3 seconds. | |||
* '''diag''': {default: 0} Defines the values to be used when comparing a sample to itself. Technically this distance is zero however in some instances, using an alternate value (e.g.: inf) is useful for flagging these self-calculated distances. | |||
===See Also=== | ===See Also=== | ||
[[analysis]], [[analysis_GUI]], [[cluster]], [[pca]], [[simca]], [[gcluster]] |
Latest revision as of 13:19, 16 August 2017
Purpose
Calculates the Manhattan Distance between: (1) Samples (rows) of a Dataset Object (DSO) a matrix. (2) rows of one DSO/matrix and the rows of another DSO/matrix.
Synopsis
- distances = manhattandist(x)
- distances = manhattandist(x,basis)
- distances = manhattandist(x,options)
- distances = manhattandist(x,basis,options)
Description
Calculates the Manhattan Distance, sum of the absolute value differences, from each row to every other row in the supplied matrix or, optionally, all rows of (x) to all rows in a second matrix (basis).
Inputs
- x = A DSO or a matrix.
Optional Inputs
- basis = A second DSO/matrix to compare the first DSO/matrix against when calculating Manhattan distance.
- options = Discussed below.
Outputs
- distances = An m-by-m matrix containing the comprehensive calculated Manhattan distances between samples.
Options
options = A structure array with the following fields:
- waitbar: [{'auto'}| 'on' | 'off' ], display waitbar. 'Auto' setting will automatically display a waitbar if computation takes longer than 3 seconds.
- diag: {default: 0} Defines the values to be used when comparing a sample to itself. Technically this distance is zero however in some instances, using an alternate value (e.g.: inf) is useful for flagging these self-calculated distances.