SOD-package: Heuristict mapping of N-dimensional nodes to M-dimensions

Description Details Author(s) References See Also Examples

Description

Maps points in N- to M-dimensions (where N > M) using a heuristic that tries to retain correct inter-node distances by rearranging nodes using errors in the inter-node distances induced by gradually shrinking the number of dimensions.

The primary purpose of this is to represent N-dimensional nodes (points) in a 2-D or 3-D space in order to visualise the relationships between nodes.

Since the method is computationally intensive, two classes are provided

*On recent versions of Mac OSX the default compiler is clang rather than gcc. Unfortunately, clang doesn't support openMP, so the current version of the configuration script doesn't use openMP on Macs. openCL acceleration is also dependent on the host computer, so may or may not be available.

Details

Package: SOD
Type: Package
Version: 1.0
Date: 2013-10-10
License: GPL-2

The basic functions are accessed from DimSqueezer objects which are reference class objects that provide an interface to the C++ implementation.

The resulting objects can be used to repeat the mapping using different parameter combinations.

Functions are also provided to specify the manner in which dimensionality is reduced;
parallelDimFactors(...)
parallelExpDimFactors(...),
and how to plot point positions and stress evolution;
plotPoints(...)
plotConcentric(...)
plotStress(...).

Author(s)

Martin Jakt

Maintainer: Martin Jakt <lmjakt@gmail.com>

References

http://martin.jakt.org.uk/r-sod/
http://www.gitorious.org/r-sod/
If you should use this package in a publication please see the above URLs for the appropriate citation.

See Also

DimSqueezer
DimSqueezer_CL
parallelDimFactors
parallelExpDimFactors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require(SOD)
## Not run: 
## read in the f186 data set
data("f186", package="SOD")

## f186 contains information about a set of cells. We
## want to use columns 7:12, which contain transcript
## densities to visualise the relationships between the
## cells.
m <- as.matrix( f186[,7:12] )

## Make a normal (openMP) accelarated squeezer object

## use a subset of the rows to reduce the computation time
## for automated checks
r <- 1:200
ds1 <- DimSqueezer$new(m[r,])

## you can also use:
## ds1 <- new("DimSqueezer", m[r,])

## squeeze 200 iterations resulting in a
## 2 dimensional representation.
sq1 <- ds1$squeeze(2, 200)

## Make an openCL accelerated squeezer object
## note this is only available where both the physical
## hardware and the appropriate development environment
## is available.
ds2 <- DimSqueezer_CL$new(m)

## squeeze, 200 iterations using a work group size of 64
## giving a 2 dimensional representation.
sq2 <- ds2$squeeze(2, 200, 64)

## functions to plot the relationships
plotPoints(sq1)

## use columns of f186 to make a more interesting
## plot
plotPoints(sq1, col=hsvScale(f186[r,"Etv2"]), pch=19)
plotPoints(sq1, col=hsvScale(f186[r,"p_Etv2"]), pch=19)

## and a funky plot
plotConcentric(sq1, f186[r,7:12], cex.max=5, pch=19, leg.pos="topleft")

## and to plot the stress mapping.
plotStress(sq1)

## End(Not run)

SOD documentation built on May 30, 2017, 2:03 a.m.