4.2. Compute Mapper Graph of a Point Cloud
The computeMapper module provides functionality to compute the Maper graph of a point cloud.
- cereeberus.compute.computemapper.computeMapper(pointcloud, lensfunction, cover, clusteralgorithm)[source]
Computes the mapper graph of an input function.
The point cloud should be given as a list of tuples or as a numpy array.
The lens function should be given as either a list of numbers with the same length as the number of points; or as a callable function where \(f(point) = ext{value}\) so long as the function can be determined from the coordinate values of the point.
The cover should be given as a list of intervals. This can be done, for example, using the ‘cereeberus.cover’ function in this module, which takes in a minimum, maximum, number of covers, and percentage of overlap to create a cover.
The clustering algorithm should be given as a callable that takes in a point cloud and outputs cluster labels (for example, sklearn.cluster.DBSCAN(min_samples=2,eps=0.3).fit).
- Parameters:
pointcloud (A)
function (A lens)
cover (A)
algorithm (A clustering)
- Returns:
A MapperGraph object representing the mapper graph of the input data and lens function.
- cereeberus.compute.computemapper.cover(min=-1, max=1, numcovers=10, percentoverlap=0.5)[source]
Creates a cover to be used for inputs in the computeMapper function
- Parameters:
min – the minimum for the range of the covering sets
max – the maximum for the range of the covering sets
numcovers – number of covers to create
percentoverlap – percentage (from 0 to 1) of overlap between covers
- Returns:
An array of intervals