Package mvpa :: Package mappers :: Module lle :: Class LLEMapper

[hide private]
[frames] | no frames]

# Class LLEMapper

source code

    Locally linear embbeding Mapper.

    This mapper performs dimensionality reduction. It wraps two algorithms
    provided by the Modular Data Processing (MDP) framework.

    Locally linear embedding (LLE) approximates the input data with a
    low-dimensional surface and reduces its dimensionality by learning a
    mapping to the surface.

    This wrapper class provides access to two different LLE algorithms (i.e.
    the corresponding MDP processing nodes). 1) An algorithm outlined in *An
    Introduction to Locally Linear Embedding* by L. Saul and S. Roweis, using
    improvements suggested in *Locally Linear Embedding for Classification* by
    D. deRidder and R.P.W. Duin (aka `LLENode`) and 2) Hessian Locally Linear
    Embedding analysis based on algorithm outlined in *Hessian Eigenmaps: new
    locally linear embedding techniques for high-dimensional data* by C. Grimes
    and D. Donoho, 2003.

    .. note::
      This mapper only provides forward-mapping functionality -- no reverse
      mapping is available.

    .. seealso::
      http://mdp-toolkit.sourceforge.net

Instance Methods | [hide private]

__init__(self, k, algorithm='lle', **kwargs) x.__init__(...) initializes x; see help(type(x)) for signature | source code

train(self, ds) Train the mapper. | source code

forward(self, data) Map data from the IN dataspace into OUT space. | source code

reverse(self, data) Reverse map data from OUT space into the IN space. | source code

getInSize(self) Returns the size of the entity in input space | source code

getOutSize(self) Returns the size of the entity in output space | source code

_accessNode(self) Provide access to the underlying MDP processing node. | source code

Inherited from `base.Mapper`: `__call__`, `__repr__`, `getInId`, `getMetric`, `getNeighbor`, `getNeighborIn`, `getNeighbors`, `isValidInId`, `isValidOutId`, `selectOut`, `setMetric` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]

| node = `property(fget= _accessNode)`
Inherited from `base.Mapper`: `metric`, `nfeatures`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, k, algorithm='lle', **kwargs)
(Constructor)

source code

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  - `metric` - Optional metric
Overrides: object.__init__

Parameters:

k: int
  Number of nearest neighbor to be used by the algorithm.
algorithm: 'lle' | 'hlle'
  Either use the standard LLE algorithm or Hessian Linear Local Embedding (HLLE).
**kwargs:
  Additional arguments are passed to the underlying MDP node. Most importantly this is the `output_dim` argument, that determines the number of dimensions to mapper is using as output space.

### train(self, ds)

source code

Train the mapper.

Overrides: base.Mapper.train

### forward(self, data)

source code

Map data from the IN dataspace into OUT space.

Overrides: base.Mapper.forward

### reverse(self, data)

source code

Reverse map data from OUT space into the IN space.

Overrides: base.Mapper.reverse

### getInSize(self)

source code

Returns the size of the entity in input space

Overrides: base.Mapper.getInSize

### getOutSize(self)

source code

Returns the size of the entity in output space

Overrides: base.Mapper.getOutSize

### _accessNode(self)

source code

Provide access to the underlying MDP processing node.

With some care.