zen_mapper.mapper

Functions

mapper(→ zen_mapper.types.MapperResult[M])

Constructs a simplicial complex representation of the data.

Module Contents

zen_mapper.mapper.mapper(data: numpy.ndarray, projection: numpy.ndarray, cover_scheme: zen_mapper.types.CoverScheme, clusterer: zen_mapper.types.Clusterer[M], dim: int | None, min_intersection: int = 1) zen_mapper.types.MapperResult[M]

Constructs a simplicial complex representation of the data.

Parameters:
  • data (np.ndarray)

  • projection (np.ndarray) – The output of the lens/filter function on the data. Must have the same number of elements as data.

  • cover_scheme (CoverScheme) – For cover generation. Should be a callable object that takes a numpy array and returns a list of list(indices).

  • clusterer (Clusterer) – A callable object that takes in a dataset and returns an iterator of numpy arrays which contain indices for clustered points.

  • dim (int) – The highest dimension of the mapper complex to compute.

  • min_intersection (int) – The minimum intersection required between clusters to make a simplex.

Returns:

An object containing: - nodes: List of clusters where each cluster is a list of data indices. - nerve: A complete list of simplices. - cover: List of list(indices) corresponding to elements of the cover.

Return type:

MapperResult