evomap.mapping.evomap#

Submodules#

Classes#

EvoMDS

EvoMap Interface. Implements default functions shared by all

EvoTSNE

EvoMap Interface. Implements default functions shared by all

EvoSammon

EvoMap Interface. Implements default functions shared by all

Package Contents#

class evomap.mapping.evomap.EvoMDS(alpha=0, p=1, n_dims=2, n_iter=2000, n_iter_check=50, init=None, mds_type='absolute', verbose=0, input_type='distance', max_halves=5, tol=0.001, n_inits=1, step_size=1, max_tries=5)[source]#

Bases: evomap.mapping.evomap._core.EvoMap

EvoMap Interface. Implements default functions shared by all implementation in its child classes.

n_dims = 2#
n_iter = 2000#
n_iter_check = 50#
init = None#
verbose = 0#
mds_type = 'absolute'#
input_type = 'distance'#
max_halves = 5#
tol = 0.001#
n_inits = 1#
step_size = 1#
max_tries = 5#
method_str = 'EvoMDS'#
__str__()[source]#

Return a string representation of the EvoMDS instance with key parameters and user-modified values.

fit(Xs, inclusions=None)[source]#

Fit the EvoMDS model to the input data over multiple periods.

Parameters:
  • Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

  • inclusions (np.ndarray, optional) – Binary array indicating which points are included in the calculation, by default None.

Returns:

self – Returns the instance of the EvoMDS class with the configuration matrix Ys_ stored as an attribute.

Return type:

object

fit_transform(Xs, inclusions=None)[source]#

Fit the EvoMDS model and return the transformed coordinates.

Parameters:
  • Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

  • inclusions (np.ndarray, optional) – Binary array indicating which points are included in the calculation, by default None.

Returns:

The transformed coordinates for each period, stored as a list of matrices.

Return type:

list of np.ndarray

Raises:

ValueError – If the input_type is not ‘distance’ or ‘vector’.

class evomap.mapping.evomap.EvoTSNE(alpha=0, p=1, n_dims=2, perplexity=15, stop_lying_iter=250, early_exaggeration=4, eta='auto', initial_momentum=0.5, final_momentum=0.8, n_iter=2000, n_iter_check=50, init=None, verbose=0, input_type='distance', max_halves=5, tol=0.001, n_inits=1, max_tries=5)[source]#

Bases: evomap.mapping.evomap._core.EvoMap

EvoMap Interface. Implements default functions shared by all implementation in its child classes.

n_dims = 2#
perplexity = 15#
stop_lying_iter = 250#
early_exaggeration = 4#
eta = 'auto'#
initial_momentum = 0.5#
final_momentum = 0.8#
n_iter = 2000#
n_iter_check = 50#
init = None#
verbose = 0#
input_type = 'distance'#
max_halves = 5#
tol = 0.001#
n_inits = 1#
max_tries = 5#
method_str = 'EvoTSNE'#
__str__()[source]#

Return a string representation of the EvoTSNE instance with alpha, p, perplexity, and user-modified parameters.

fit(Xs)[source]#

Fit EvoTSNE to the input data over multiple periods.

Parameters:

Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

Returns:

self – Returns the instance of the EvoTSNE class with the configuration matrix Ys_ stored as an attribute.

Return type:

object

fit_transform(Xs, inclusions=None)[source]#

Fit EvoTSNE and return the transformed coordinates.

Parameters:
  • Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

  • inclusions (np.ndarray, optional) – Binary array indicating which points are included in the calculation, by default None.

Returns:

The transformed coordinates for each period, stored as a list of matrices.

Return type:

list of np.ndarray

Raises:

ValueError – If the input_type is not ‘distance’ or ‘vector’.

class evomap.mapping.evomap.EvoSammon(alpha=0, p=1, n_dims=2, n_iter=2000, n_iter_check=50, init=None, verbose=0, input_type='distance', max_halves=5, tol=0.001, n_inits=1, step_size=1, max_tries=5)[source]#

Bases: evomap.mapping.evomap._core.EvoMap

EvoMap Interface. Implements default functions shared by all implementation in its child classes.

n_dims = 2#
n_iter = 2000#
n_iter_check = 50#
init = None#
verbose = 0#
input_type = 'distance'#
max_halves = 5#
tol = 0.001#
n_inits = 1#
step_size = 1#
max_tries = 5#
method_str = 'EvoSammon'#
__str__()[source]#

Return a string representation of the EvoSammon instance with alpha, p, and user-modified parameters.

fit(Xs)[source]#

Fit EvoSammon to the input data over multiple periods.

Parameters:

Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

Returns:

self – Returns the instance of the EvoSammon class with the configuration matrix Ys_ stored as an attribute.

Return type:

object

fit_transform(Xs, inclusions=None)[source]#

Fit the EvoSammon model and return the transformed coordinates.

Parameters:
  • Xs (list of np.ndarray) – A list of input matrices, where each matrix corresponds to one period. The input matrices can either be feature vectors or distance matrices, depending on the input_type.

  • inclusions (np.ndarray, optional) – Binary array indicating which points are included in the calculation, by default None.

Returns:

The transformed coordinates for each period, stored as a list of matrices.

Return type:

list of np.ndarray

Raises:

ValueError – If the input_type is not ‘distance’ or ‘vector’.