|
MANHATTAN DISTANCEName:
The Manhattan distance is also referred to as the city block distance or the taxi-cab distance. It is equivalent to a Minkowsky distance with P = 1. The Manhattan distance is the distance measured along axes at right angles.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the first response variable; <y2> is the second response variable; <par> is a parameter where the computed Manhattan distance is stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = MANHATTAN DISTANCE Y1 Y2 SUBSET Y1 > 0 SUBSET Y2 > 0
SKIP 25 READ IRIS.DAT Y1 TO Y4 X . LET DIST = MANHATTAN DISTANCE Y1 Y2 SET WRITE DECIMALS 4 TABULATE MANHATTAN DISTANCE Y1 Y2 X . XTIC OFFSET 0.2 0.2 X1LABEL GROUP ID LET NDIST = UNIQUE X XLIMITS 1 NDIST MAJOR X1TIC MARK NUMBER NDIST MINOR X1TIC MARK NUMBER 0 CHAR X LINE BLANK LABEL CASE ASIS CASE ASIS TITLE CASE ASIS TITLE OFFSET 2 . TITLE Manhattan Distance (IRIS.DAT) Y1LABEL Manhattan Distance MANHATTAN DISTANCE PLOT Y1 Y2 XThe following output is generated Cross Tabulate MANHATTAN DISTANCE (Response Variables: Y1 Y2 ) --------------------------------------------- X | MANHATTAN DISTA --------------------------------------------- 1.0000 | 78.9000 2.0000 | 158.3000 3.0000 | 180.7000>
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 07/20/2017 |