evomap.transform#

Useful transformations after maps have been generated.

Module Contents#

Functions#

align_maps(Xs, X_ref)

Align a sequence of maps to a reference map via Orthogonal

align_map(X, X_ref)

Align a map to a reference map via Orthogonal Procrustes Analysis.

PCA(X, num_components)

rotate_map(Y_2D)

rotate_maps(Y, inclusions)

Rotate a map (or sequence of maps) such that the x-axis corresponds to

evomap.transform.align_maps(Xs, X_ref)[source]#

Align a sequence of maps to a reference map via Orthogonal Procrustes Analysis.

Parameters
  • Xs (list of ndarrays, each of shape (n_samples, n_dims)) – List of map coordinates

  • X_ref (ndarray, shape (n_samples, n_dims)) – Reference map to which all other maps should be aligned to

Returns

List of aligned map coordinates

Return type

list of ndarrays, each of shape (n_samples, n_dims)

evomap.transform.align_map(X, X_ref)[source]#

Align a map to a reference map via Orthogonal Procrustes Analysis.

Parameters
  • X (ndarray of shape (n_samples, n_dims)) – Map coordinates

  • X_ref (ndarray of shape (n_samples, n_dims)) – Reference map

Returns

Aligned map

Return type

ndarray, of shape (n_samples, n_dims)

evomap.transform.PCA(X, num_components)[source]#
evomap.transform.rotate_map(Y_2D)[source]#
evomap.transform.rotate_maps(Y, inclusions)[source]#

Rotate a map (or sequence of maps) such that the x-axis corresponds to the direction of maximum variance.

Parameters

Y (_type_) – _description_