multipers.ml package

Submodules

multipers.ml.accuracies module

multipers.ml.accuracies.accuracy_to_csv(X, Y, cl, k: float = 10, dataset: str = '', shuffle=True, verbose: bool = True, **more_columns)

multipers.ml.convolutions module

class multipers.ml.convolutions.DTM(masses=[0.1], metric: str = 'euclidean', **_kdtree_kwargs)

Bases: object

Distance To Measure

fit(X, sample_weights=None, y=None)
score_samples(Y, X=None)

Returns the kernel density estimates of each point in Y.

Parameters

Ytensor (m, d)

m points with d dimensions for which the probability density will be calculated

Returns

the DTMs of Y, for each mass in masses.

score_samples_diff(Y)

Returns the kernel density estimates of each point in Y.

Parameters

Ytensor (m, d)

m points with d dimensions for which the probability density will be calculated

Xtensor (n, d), optional

n points with d dimensions to which KDE will be fit. Provided to allow batch calculations in log_prob. By default, X is None and all points used to initialize KernelDensityEstimator are included.

Returns

log_probstensor (m)

log probability densities for each of the queried points in Y

class multipers.ml.convolutions.KDE(bandwidth: Any = 1, kernel: Literal['m_gaussian', 'gaussian', 'exponential'] | Callable = 'gaussian', return_log=False)

Bases: object

Fast, scikit-style, and differentiable kernel density estimation, using PyKeops.

static exponential_kernel(x_i, y_j, bandwidth)
fit(X, sample_weights=None, y=None)
static gaussian_kernel(x_i, y_j, bandwidth)
static multivariate_gaussian_kernel(x_i, y_j, covariance_matrix_inverse)
score_samples(Y, X=None, return_kernel=False)

Returns the kernel density estimates of each point in Y.

Parameters

Ytensor (m, d)

m points with d dimensions for which the probability density will be calculated

Xtensor (n, d), optional

n points with d dimensions to which KDE will be fit. Provided to allow batch calculations in log_prob. By default, X is None and all points used to initialize KernelDensityEstimator are included.

Returns

log_probstensor (m)

log probability densities for each of the queried points in Y

static to_lazy(X, Y, x_weights)
multipers.ml.convolutions.batch_signed_measure_convolutions(signed_measures, x, bandwidth, kernel)

Input

  • signed_measures: unragged, of shape (num_data, num_pts, D+1) where last coord is weights, (0 for dummy points)

  • x : the points to convolve (num_x,D)

  • bandwidth : the bandwidths or covariance matrix inverse or … of the kernel

  • kernel : “gaussian”, “multivariate_gaussian”, “exponential”, or Callable (x_i, y_i, bandwidth)->float

Output

Array of shape (num_convolutions, (num_axis), num_data, Array of shape (num_convolutions, (num_axis), num_data, max_x_size)

multipers.ml.convolutions.convolution_signed_measures(iterable_of_signed_measures, filtrations, bandwidth, flatten: bool = True, n_jobs: int = 1, backend='pykeops', kernel='gaussian', **kwargs)

Evaluates the convolution of the signed measures Iterable(pts, weights) with a gaussian measure of bandwidth bandwidth, on a grid given by the filtrations

Parameters

  • iterable_of_signed_measures : (num_signed_measure) x [ (npts) x (num_parameters), (npts)]

  • filtrations : (num_parameter) x (filtration values)

  • flatten : bool

  • n_jobs : int

Outputs

The concatenated images, for each signed measure (num_signed_measures) x (len(f) for f in filtration_values)

multipers.ml.convolutions.exponential_kernel(x_i, y_j, bandwidth)
multipers.ml.convolutions.gaussian_kernel(x_i, y_j, bandwidth)
multipers.ml.convolutions.multivariate_gaussian_kernel(x_i, y_j, covariance_matrix_inverse)

multipers.ml.invariants_with_persistable module

multipers.ml.invariants_with_persistable.hf_degree_rips(distance_matrix, min_rips_value, max_rips_value, max_normalized_degree, min_normalized_degree, grid_granularity, max_homological_dimension, subsample_size=None)
multipers.ml.invariants_with_persistable.hf_h0_degree_rips(point_cloud, min_rips_value, max_rips_value, max_normalized_degree, min_normalized_degree, grid_granularity)
multipers.ml.invariants_with_persistable.ri_h0_degree_rips(point_cloud, min_rips_value, max_rips_value, max_normalized_degree, min_normalized_degree, grid_granularity)

multipers.ml.kernels module

class multipers.ml.kernels.DistanceList2DistanceMatrix

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.kernels.DistanceMatrices2DistancesList

Bases: BaseEstimator, TransformerMixin

Input (degree) x (distance matrix) or (axis) x (degree) x (distance matrix D) Output _ (D1) x opt (axis) x (degree) x (D2, , with indices first)

fit(X, y=None)
predict(X)
transform(X)
class multipers.ml.kernels.DistanceMatrix2DistanceList

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.kernels.DistanceMatrix2Kernel(sigma: float | Iterable[float] = 1, axis: int | None = None, weights: Iterable[float] | float = 1)

Bases: BaseEstimator, TransformerMixin

Input : (degree) x (distance matrix) or (axis) x (degree) x (distance matrix) in the second case, axis HAS to be specified (meant for cross validation) Output : kernel of the same shape of distance matrix

fit(X, y=None)
transform(X) ndarray
class multipers.ml.kernels.DistancesLists2DistanceMatrices

Bases: BaseEstimator, TransformerMixin

Input (D1) x opt (axis) x (degree) x (D2 with indices first) Output opt (axis) x (degree) x (distance matrix (D1,D2))

fit(X: ndarray, y=None)
transform(X)

multipers.ml.mma module

class multipers.ml.mma.MMA2IMG(degrees: list, bandwidth: float = 0.1, power: float = 1, normalize: bool = False, resolution: list | int = 50, plot: bool = False, box=None, n_jobs=-1, flatten=False, progress=False, grid_strategy='regular', kernel='linear', signed: bool = False)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.mma.MMA2Landscape(resolution=[100, 100], degrees: list[int] | None = [0, 1], ks: ~typing.Iterable[int] = range(0, 5), phi: ~typing.Callable = <function sum>, box=None, plot: bool = False, n_jobs=-1, filtration_quantile: float = 0.01)

Bases: BaseEstimator, TransformerMixin

Turns a list of MMA approximations into Landscapes vectorisations

fit(X, y=None)
transform(X) list[ndarray]
class multipers.ml.mma.MMAFormatter(degrees: list = [0, 1], axis=None, verbose: bool = False, normalize: bool = False, weights=None, quantiles=None, dump=False, from_dump=False)

Bases: BaseEstimator, TransformerMixin

static copy_transform(mod, degrees, translation, rescale_factors, new_box)
fit(X_in, y=None)
set_fit_request(*, X_in: bool | None | str = '$UNCHANGED$') MMAFormatter

Request metadata passed to the fit method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config()). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to fit if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to fit.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Note

This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a Pipeline. Otherwise it has no effect.

Parameters

X_instr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED

Metadata routing for X_in parameter in fit.

Returns

selfobject

The updated object.

set_transform_request(*, X_in: bool | None | str = '$UNCHANGED$') MMAFormatter

Request metadata passed to the transform method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config()). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

  • True: metadata is requested, and passed to transform if provided. The request is ignored if metadata is not provided.

  • False: metadata is not requested and the meta-estimator will not pass it to transform.

  • None: metadata is not requested, and the meta-estimator will raise an error if the user provides it.

  • str: metadata should be passed to the meta-estimator with this given alias instead of the original name.

The default (sklearn.utils.metadata_routing.UNCHANGED) retains the existing request. This allows you to change the request for some parameters and not others.

Added in version 1.3.

Note

This method is only relevant if this estimator is used as a sub-estimator of a meta-estimator, e.g. used inside a Pipeline. Otherwise it has no effect.

Parameters

X_instr, True, False, or None, default=sklearn.utils.metadata_routing.UNCHANGED

Metadata routing for X_in parameter in transform.

Returns

selfobject

The updated object.

transform(X_in)
class multipers.ml.mma.SimplexTree2MMA(n_jobs: int = 1, expand_dim: int | None = None, prune_degrees_above: int | None = None, progress=False, **persistence_kwargs)

Bases: BaseEstimator, TransformerMixin

Turns a list of simplextrees to MMA approximations

fit(X, y=None)
transform(X)

multipers.ml.one module

class multipers.ml.one.Dgm2Histogram(quantile: float = 0.0, bins: int = 100, n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Dgms2Image(bandwidth: float = 1, resolution: tuple[int, int] = (20, 20), n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Dgms2Landscapes(num: int = 5, resolution: int = 100, n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Dgms2SWK(num_directions: int = 10, bandwidth: float = 1.0, n_jobs: int = 1, distance_matrix_path: str | None = None, progress: bool = False)

Bases: BaseEstimator, TransformerMixin

fit(X: list[list[ndarray]], y=None)
transform(X) ndarray
class multipers.ml.one.Dgms2SignedMeasureDistance(n_jobs: int = 1, distance_matrix_path: str | None = None, progress: bool = False)

Bases: BaseEstimator, TransformerMixin

static OSWdistance(mu: list[ndarray], nu: list[ndarray], dim: int) float
fit(X: list[ndarray], y=None)
transform(X)
static wasserstein_1(a: ndarray, b: ndarray) float
class multipers.ml.one.Dgms2SignedMeasureHistogram(ranges: None | list[tuple[float, float]] = None, bins: int = 100, quantile: float = 0)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Dgms2SignedMeasureImage(ranges: None | Iterable[Iterable[float]] = None, resolution: int = 100, quantile: float = 0, bandwidth: float = 1, kernel: str = 'gaussian')

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Dgms2SlicedWassersteinDistanceMatrices(num_directions: int = 10, n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X: list[list[ndarray]], y=None)
transform(X)
class multipers.ml.one.DiagramShuffle

Bases: BaseEstimator, TransformerMixin

fit(X: list[list[ndarray]], y=None)
transform(X: list[list[ndarray]])
class multipers.ml.one.FilvecGetter(f: str = 'ricciCurvature', quantile: float = 0.0, bins: int = 100, n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
class multipers.ml.one.Graph2SimplexTree(f: str = 'ricciCurvature', dtype=<class 'gudhi.simplex_tree.SimplexTree'>, reverse_filtration: bool = False)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X: list[Graph])
class multipers.ml.one.PointCloud2SimplexTree(delayed: bool = False, threshold=inf)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X: list[Graph])
class multipers.ml.one.SimplexTree2Dgm(degrees: list[int] | None = None, extended: list[int] | bool = [], n_jobs=1, progress: bool = False, threshold: float = inf)

Bases: BaseEstimator, TransformerMixin

fit(X: list[SimplexTree], y=None)
transform(X: list[SimplexTree])
class multipers.ml.one.SimplexTree2Histogram(quantile: float = 0.0, bins: int = 100, n_jobs: int = 1, progress: bool = False, density: bool = True)

Bases: BaseEstimator, TransformerMixin

fit(X, y=None)
transform(X)
multipers.ml.one.dgm2pervec(dgms, range: tuple[float, float], bins: int) ndarray
multipers.ml.one.get_filtration_values(g: Graph, f: str) ndarray
multipers.ml.one.get_simplextree(x) SimplexTree
multipers.ml.one.get_simplextrees(X) Iterable[SimplexTree]
multipers.ml.one.graph2filvec(g: Graph, f: str, range: tuple, bins: int) ndarray
multipers.ml.one.simplextree2hist(simplextree, range: tuple[float, float], bins: int, density: bool) ndarray

multipers.ml.point_clouds module

class multipers.ml.point_clouds.PointCloud2SimplexTree(bandwidths=[], masses=[], threshold: float = inf, complex: Literal['alpha', 'rips', 'delaunay'] = 'rips', sparse: float | None = None, num_collapses: int | Literal['full'] = 'full', kernel: str = 'gaussian', log_density: bool = True, expand_dim: int = 1, progress: bool = False, n_jobs: int | None = None, fit_fraction: float = 1, verbose: bool = False, safe_conversion: bool = False)

Bases: BaseEstimator, TransformerMixin

fit(X: ndarray | list, y=None)
transform(X)

multipers.ml.signed_betti module

multipers.ml.signed_betti.rank_decomposition_by_rectangles(rank_invariant, threshold=False)
multipers.ml.signed_betti.signed_betti(hilbert_function, threshold=False, sparse=False)

multipers.ml.signed_measures module

class multipers.ml.signed_measures.DegreeRips2SignedMeasure(degrees: Iterable[int], min_rips_value: float, max_rips_value, max_normalized_degree: float, min_normalized_degree: float, grid_granularity: int, progress: bool = False, n_jobs=1, sparse: bool = False, _möbius_inversion=True, fit_fraction=1)

Bases: BaseEstimator, TransformerMixin

fit(X: ndarray | list, y=None)
transform(X)
class multipers.ml.signed_measures.SignedMeasure2Convolution(filtration_grid: Iterable[ndarray] = None, kernel='gaussian', bandwidth: float | Iterable[float] = 1.0, flatten: bool = False, n_jobs: int = 1, resolution: int | None = None, grid_strategy: str = 'regular', progress: bool = False, backend: str = 'pykeops', plot: bool = False, log_density: bool = False, **kde_kwargs)

Bases: BaseEstimator, TransformerMixin

Discrete convolution of a signed measure

Input

(data) x (degree) x (signed measure)

Parameters

  • filtration_grid : Iterable[array] For each filtration, the filtration values on which to evaluate the grid

  • resolution : int or (num_parameter) : If filtration grid is not given, will infer a grid, with this resolution

  • grid_strategy : the strategy to generate the grid. Available ones are regular, quantile, exact

  • flatten : if true, the output will be flattened

  • kernel : kernel to used to convolve the images.

  • flatten : flatten the images if True

  • progress : progress bar if True

  • backend : sklearn, pykeops or numba.

  • plot : Creates a plot Figure.

Output

(data) x (concatenation of imgs of degree)

fit(X, y=None)
transform(X)
class multipers.ml.signed_measures.SignedMeasure2SlicedWassersteinDistance(n_jobs=None, num_directions: int = 10, _sliced: bool = True, epsilon=-1, ground_norm=1, progress=False, grid_reconversion=None, scales=None)

Bases: BaseEstimator, TransformerMixin

Transformer from signed measure to distance matrix.

Input

(data) x (degree) x (signed measure)

Format

  • a signed measure : tuple of array. (point position) : npts x (num_paramters) and weigths : npts

  • each data is a list of signed measure (for e.g. multiple degrees)

Output

  • (degree) x (distance matrix)

fit(X, y=None)
predict(X)
transform(X)
class multipers.ml.signed_measures.SignedMeasureFormatter(filtrations_weights: Iterable[float] | None = None, normalize=False, plot: bool = False, unsparse: bool = False, axis: int = -1, resolution: int | Iterable[int] = 50, flatten: bool = False, deep_format: bool = False, unrag: bool = True, n_jobs: int = 1, verbose: bool = False, integrate: bool = False, grid_strategy='regular')

Bases: BaseEstimator, TransformerMixin

Input

(data) x (degree) x (signed measure) or (data) x (axis) x (degree) x (signed measure)

Iterable[list[signed_measure_matrix of degree]] or Iterable[previous].

The second is meant to use multiple choices for signed measure input. An example of usage : they come from a Rips + Density with different bandwidth. It is controlled by the axis parameter.

Output

Iterable[list[(reweighted)_sparse_signed_measure of degree]]

or (deep format)

Tensor of shape (num_axis*num_degrees, data, max_num_pts, num_parameters)

static deep_format_measure(signed_measure)
fit(X, y=None)
transform(X)
unsparse_signed_measure(sparse_signed_measure)
class multipers.ml.signed_measures.SignedMeasures2SlicedWassersteinDistances(progress=False, n_jobs: int = 1, scales: Iterable[Iterable[float]] | None = None, **kwargs)

Bases: BaseEstimator, TransformerMixin

Transformer from signed measure to distance matrix. Input —– (data) x opt (axis) x (degree) x (signed measure)

Format

  • a signed measure : tuple of array. (point position) : npts x (num_paramters) and weigths : npts

  • each data is a list of signed measure (for e.g. multiple degrees)

Output

  • (axis) x (degree) x (distance matrix)

fit(X, y=None)
transform(X)
class multipers.ml.signed_measures.SimplexTree2RectangleDecomposition(filtration_grid: ndarray, degrees: Iterable[int], plot=False, reconvert_grid=True, num_collapses: int = 0)

Bases: BaseEstimator, TransformerMixin

Transformer. 2 parameter SimplexTrees to their respective rectangle decomposition.

fit(X, y=None)

TODO : infer grid from multiple simplextrees

transform(X: Iterable[SimplexTreeMulti_Fi32 | SimplexTreeMulti_KFi32 | SimplexTreeMulti_Fi64 | SimplexTreeMulti_KFi64 | SimplexTreeMulti_Ff32 | SimplexTreeMulti_KFf32 | SimplexTreeMulti_Ff64 | SimplexTreeMulti_KFf64])
class multipers.ml.signed_measures.SimplexTree2SignedMeasure(degrees: list[int | None] = [], rank_degrees: list[int] = [], filtration_grid: Iterable[ndarray] | None = None, progress=False, num_collapses: int | str = 0, n_jobs=None, resolution: Iterable[int] | int | None = None, plot: bool = False, filtration_quantile: float = 0.0, _möbius_inversion: bool = True, expand=True, normalize_filtrations: bool = False, grid_strategy: str = 'exact', seed: int = 0, fit_fraction=1, out_resolution: Iterable[int] | int | None = None, individual_grid: bool | None = None, enforce_null_mass: bool = False, flatten=True, backend='multipers')

Bases: BaseEstimator, TransformerMixin

Input

Iterable[SimplexTreeMulti]

Output

Iterable[ list[signed_measure for degree] ]

signed measure is either
  • (points : (n x num_parameters) array, weights : (n) int array ) if sparse,

  • else an integer matrix.

Parameters

  • degrees : list of degrees to compute. None correspond to the euler characteristic

  • filtration grid : the grid on which to compute.

If None, the fit will infer it from - fit_fraction : the fraction of data to consider for the fit, seed is controlled by the seed parameter - resolution : the resolution of this grid - filtration_quantile : filtrations values quantile to ignore - grid_strategy:str : ‘regular’ or ‘quantile’ or ‘exact’ - normalize filtration : if sparse, will normalize all filtrations. - expand : expands the simplextree to compute correctly the degree, for flag complexes - invariant : the topological invariant to produce the signed measure. Choices are “hilbert” or “euler”. Will add rank invariant later. - num_collapse : Either an int or “full”. Collapse the complex before doing computation. - _möbius_inversion : if False, will not do the mobius inversion. output has to be a matrix then. - enforce_null_mass : Returns a zero mass measure, by thresholding the module if True.

fit(X, y=None)
transform(X)
transform1(simplextree, filtration_grid=None, _reconversion_grid=None, thread_id: str = '')
class multipers.ml.signed_measures.SimplexTrees2SignedMeasures(**kwargs)

Bases: SimplexTree2SignedMeasure

Input

(data) x (axis, e.g. different bandwidths for simplextrees) x (simplextree)

Output

(data) x (axis) x (degree) x (signed measure)

fit(X, y=None)
transform(X)
multipers.ml.signed_measures.rescale_sparse_signed_measure(signed_measure, filtration_weights, normalize_scales=None)
multipers.ml.signed_measures.tensor_möbius_inversion(tensor, grid_conversion: Iterable[ndarray] | None = None, plot: bool = False, raw: bool = False, num_parameters: int | None = None)

multipers.ml.sliced_wasserstein module

class multipers.ml.sliced_wasserstein.SlicedWassersteinDistance(num_directions=10, scales=None, n_jobs=None)

Bases: BaseEstimator, TransformerMixin

This is a class for computing the sliced Wasserstein distance matrix from a list of signed measures. The Sliced Wasserstein distance is computed by projecting the signed measures onto lines, comparing the projections with the 1-norm, and finally integrating over all possible lines. See http://proceedings.mlr.press/v70/carriere17a.html for more details.

fit(X, y=None)

Fit the SlicedWassersteinDistance class on a list of signed measures: signed measures are projected onto the different lines. The measures themselves are then stored in numpy arrays, called measures_.

Parameters:

X (list of tuples): input signed measures. y (n x 1 array): signed measure labels (unused).

transform(X)

Compute all sliced Wasserstein distances between the signed measures that were stored after calling the fit() method, and a given list of (possibly different) signed measures.

Parameters:

X (list of tuples): input signed measures.

Returns:

numpy array of shape (number of measures in measures) x (number of measures in X): matrix of pairwise sliced Wasserstein distances.

class multipers.ml.sliced_wasserstein.WassersteinDistance(epsilon=1.0, ground_norm=1, n_jobs=None)

Bases: BaseEstimator, TransformerMixin

This is a class for computing the Wasserstein distance matrix from a list of signed measures.

fit(X, y=None)

Fit the WassersteinDistance class on a list of signed measures. The measures themselves are then stored in numpy arrays, called measures_.

Parameters:

X (list of tuples): input signed measures. y (n x 1 array): signed measure labels (unused).

transform(X)

Compute all Wasserstein distances between the signed measures that were stored after calling the fit() method, and a given list of (possibly different) signed measures.

Parameters:

X (list of tuples): input signed measures.

Returns:

numpy array of shape (number of measures in measures) x (number of measures in X): matrix of pairwise Wasserstein distances.

multipers.ml.sliced_wasserstein.pairwise_signed_measure_distances(X, Y=None, metric='sliced_wasserstein', n_jobs=None, **kwargs)

This function computes the distance matrix between two lists of signed measures given as numpy arrays of shape (nxD).

Parameters:

X (list of n tuples): first list of signed measures. Y (list of m tuples): second list of signed measures (optional). If None, pairwise distances are computed from the first list only. metric: distance to use. It can be either a string (“sliced_wasserstein”, “wasserstein”) or a function taking two tuples as inputs. If it is a function, make sure that it is symmetric and that it outputs 0 if called on the same two tuples. n_jobs (int): number of jobs to use for the computation. This uses joblib.Parallel(prefer=”threads”), so metrics that do not release the GIL may not scale unless run inside a joblib.parallel_backend block. **kwargs: optional keyword parameters. Any further parameters are passed directly to the distance function. See the docs of the various distance classes in this module.

Returns:

numpy array of shape (nxm): distance matrix

multipers.ml.tools module

class multipers.ml.tools.SimplexTreeEdgeCollapser(num_collapses: int = 0, full: bool = False, max_dimension: int | None = None, n_jobs: int = 1)

Bases: BaseEstimator, TransformerMixin

fit(X: ndarray | list, y=None)
transform(X)
multipers.ml.tools.filtration_grid_to_coordinates(F, return_resolution)
multipers.ml.tools.get_filtration_weights_grid(num_parameters: int = 2, resolution: int | ~typing.Iterable[int] = 3, *, min: float = 0, max: float = 20, dtype=<class 'float'>, remove_homothetie: bool = True, weights=None)
Provides a grid of weights, for filtration rescaling.
  • num parameter : the dimension of the grid tensor

  • resolution : the size of each coordinate

  • min : minimum weight

  • max : maximum weight

  • weights : custom weights (instead of linspace between min and max)

  • dtype : the type of the grid values (useful for int weights)

multipers.ml.tools.get_simplex_tree_from_delayed(x) SimplexTreeMulti
multipers.ml.tools.get_simplextree(x) SimplexTreeMulti

Module contents