NNSOM.utils.spread_positions

NNSOM.utils.spread_positions(position, positionMean, positionBasis)[source]

Map normalized neuron positions into data space using a basis.

Applies the affine transform positionMean + positionBasis @ position to project unit-square positions into the principal-component subspace of the training data.

Parameters:
  • position (np.ndarray, shape (2, N)) – Normalized neuron positions.

  • positionMean (np.ndarray, shape (R, 1)) – Mean of the training data (column vector), used as the translation.

  • positionBasis (np.ndarray, shape (R, 2)) – Basis matrix (two principal components) used for the linear map.

Returns:

position1 – Neuron positions expressed in data space.

Return type:

np.ndarray, shape (R, N)