#

## Manuals

### mds

#### Description

perform multidimensional scaling on a difference matrix

#### Credits

This is a stand-alone version of the functions `cmdscale`, `isoMDS`, and `sammon` available in R.

#### Synopsis

mds [-K | -S] [-i filename] [-m float] [-n int] [-o filename] [-t float] dimensions difference-table-file

#### Options

-K
  use Kruskal's method
-S
  use Sammon mapping
-i filename
  initialise from file (with -K or -S only)
-m float
  initial magic value (with -S only, default: 0.2)
-n int
  maximum number of iterations (with -K or -S only, default: 50 with -K; 100 with -S)
-o filename
  write results to file (default: <stdout>)
-t float
  tolerance (with -S only, default: 0.0001)

#### Cancelling

The program will abort if a file _CANCEL_.L04 exists in the current directory, or if it is created while the program is running. This is useful for stopping long running calculations from a GUI, such as pyL04.

#### Files

The input file is a difference matrix file.

The output file, as well as an optional initialisation file, is a vector file.

#### Examples

This command performs Classical Multidimensional Scaling into 2 dimensions on the difference matrix stored in the file `difmatrix` and stores the result in the file `results`:

        mds 2 difmatrix > results

This command performs Kruskal's Non-metric Multidimensional Scaling into 3 dimensions on the difference matrix stored in the file `difmatrix` and stores the result in the file `results3`:

        mds -K 3 difmatrix > results3

#### Type of mapping

By default, the program does Classical Multidimensional Scaling.

With the option -K the program does Kruskal's Non-metric Multidimensional Scaling.

With the option -S the program does Sammon's Non-Linear Mapping.

Kruskal's Method and Sammon Mapping require a pre-initialisation. By default, this is done by Classical Multidimensional Scaling. However, you can use the result of a previous run of the program as an initialisation. For example:

        mds -o tmp -S 3 difmatrix
        mds -o result -i tmp -K 3 difmatrix

In this case, initialisation is first done by Classical Multidimensional Scaling, then a Sammon Mapping is performed, and then this Sammon Mapping is used as the initialisation for doing Kruskal's Method.