NAME
lpca -- perform local pca
PROTOTYPE
unitptr lpca( int iDim, int iNodes, unitptr uHost)
ARGUMENTS
- int iDim
- dimension of embedding space
- int iNodes
- max nr of available nodes
- unitptr uHost
- host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
DESCRIPTION:
Performs local PCA on a data set, given as a long vector of concatenated
records. The data are defined by a call to named subunit
set_data and specifying the data records in the form of a long
vector given at the single dynamic input field of set_data
(the nr of data elements is then inferred from the dimension
of the input vector).
This unit has one named subunit for each of the following methods
of base class local_pca_t:
container:set_sigma to set sigma parameter of local_pca_t
container:def_dist to define distance measure of local_pca_t
container:num_nodes to get nr of nodes of local_pca_t
container:get_node to get data at a particular node of local_pca_t
container:exec to map a single data point
container:adapt to adapt data of all nodes
where container denotes the name that is given to the created unit
after return from this constructor function.
EXECUTION:
Execution of the created unit does nothing. However, execution of
any of its named subunits (via a use_named unit) invokes the
corresponding C class method. The interface of each named
subunit provides inputs and outputs for the corresponding method.
INTERFACE OF NAMED SUBUNITS:
Subunit container:set_sigma (invokes element function set_sigma of local_pca_t):
- X_in[0]:
- (input field 0) sigma value to use
Subunit container:def_dist (invokes element function def_dist of local_pca_t):
- X_in[0]:
- (input field 0) Distance factor f.
Distance is computed as D=f*d*d + (1-f)*dvert*dvert
Subunit container:num_nodes (invokes element function num_nodes of local_pca_t):
- X_out[]:
- (output field 0) return nr of nodes
Subunit container:get_node (invokes element function get_node of local_pca_t):
- X_out[]:
- (packed output field 0) center vector
- Y_out[]:
- (packed output field 1) matrix
- Z_out[]:
- (packed output field 2) dimension
Subunit container:set_data (invokes element function set_data of local_pca_t):
- X_inp[]:
- (var input field 0) data set. Dimension specifies nr of
data records.
Subunit container:exec (invokes element function exec of local_pca_t):
- X_in[]:
- (packed input field 0) single data vector to classify
- X_out[]:
- (packed output field 0)
- Y_out[]:
- (packed output field 1)
- Z_out[]:
- (packed output field 2)
Subunit container:adapt (invokes element function adapt of local_pca_t):
- X_in[]:
- (input field 1) sigma to use
- X_out[]:
- (output field 0) avg distance to data set
SEE ALSO:
FILE
/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_lpca.c