geomfum.descriptor package#

Submodules#

geomfum.descriptor.learned module#

Implementation of the learned descriptor.

The learned descriptor is a descriptor that uses a neural network to compute features.

class geomfum.descriptor.learned.BaseFeatureExtractor[source]#

Bases: ABC

Base class for feature extractor.

load_from_path(path)[source]#

Load model parameters from the provided file path.

Parameters:

path (str) – Path to the saved model parameters

save(path)[source]#

Save model parameters to the specified file path.

Parameters:

path (str) – Path to the saved model parameters

class geomfum.descriptor.learned.FeatureExtractor(*args, **kwargs)[source]#

Bases: WhichRegistryMixins

Feature extractor.

class geomfum.descriptor.learned.LearnedDescriptor(feature_extractor=None)[source]#

Bases: Descriptor, ABC, Module

Learned descriptor.

Parameters:

feature_extractor (Feature Extractor) – Feature extractor to use.

forward(shape)[source]#

Compute descriptor.

Parameters:

shape (Shape.) – Shape.

Returns:

features (array-like, shape=[…, n_features, n_vertices]) – Descriptors of the shape, where n_features is the number of features extracted by the feature extractor.

geomfum.descriptor.pipeline module#

Descriptor pipeline.

class geomfum.descriptor.pipeline.ArangeSubsampler(subsample_step=1, axis=0)[source]#

Bases: Subsampler

Subsampler based on arange method.

Parameters:
  • subsample_step (int) – Arange step.

  • axis (int) – Axis from which to subsample.

class geomfum.descriptor.pipeline.DescriptorPipeline(steps)[source]#

Bases: object

Descriptor pipeline.

Parameters:

steps (list or tuple) – Steps to apply. Include: descriptor, subsampler, normalizer.

apply(shape)[source]#

Apply descriptor pipeline.

Parameters:

shape (Shape) – Shape to apply pipeline to.

Returns:

descr (array-like, shape=[…, n]) – Descriptor.

class geomfum.descriptor.pipeline.L2InnerNormalizer[source]#

Bases: Normalizer

L2 inner normalizer.

class geomfum.descriptor.pipeline.Normalizer[source]#

Bases: ABC

Normalizer.

class geomfum.descriptor.pipeline.Subsampler[source]#

Bases: ABC

Subsampler.

geomfum.descriptor.spectral module#

Spectral descriptors.

class geomfum.descriptor.spectral.HeatKernelSignature(scale=True, n_domain=3, domain=None)[source]#

Bases: WhichRegistryMixins, SpectralDescriptor

Heat kernel signature.

Parameters:
  • scale (bool) – Whether to scale weights to sum to one.

  • n_domain (int) – Number of domain points. Ignored if domain is not None.

  • domain (callable or array-like, shape=[n_domain]) – Method to compute domain points (f(shape)) or domain points.

class geomfum.descriptor.spectral.WaveKernelSignature(scale=True, sigma=None, n_domain=3, domain=None)[source]#

Bases: WhichRegistryMixins, SpectralDescriptor

Wave kernel signature.

class geomfum.descriptor.spectral.WksDefaultDomain(n_domain, sigma=None, n_overlap=7, n_trans=2)[source]#

Bases: object

Compute WKS domain.

Parameters:
  • shape (Shape.) – Shape with basis.

  • n_domain (int) – Number of energy points to use.

  • n_overlap (int) – Controls Gaussian overlap. Ignored if sigma is not None.

  • n_trans (int) – Number of standard deviations to translate energy bound by.

geomfum.descriptor.spectral.hks_default_domain(shape, n_domain)[source]#

Compute HKS default domain.

Parameters:
  • shape (Shape.) – Shape with basis.

  • n_domain (int) – Number of time points.

Returns:

domain (array-like, shape=[n_domain]) – Time points.

Module contents#