dymad.numerics.manifold

Functions

Classes

DimensionEstimator([data, Knn, tree, ...])

Estimate the intrinsic dimension of a point cloud using kernel method.

Manifold(data, d[, K, g, T, iforit, extT])

ManifoldAltTree(data, d[, K, g, T, iforit, ...])

The only difference from Manifold is that a KDTree on a different set of points is used to find the kNN points for GMLS.

ManifoldAnalytical(data, d[, K, g, fT])

class dymad.numerics.manifold.DimensionEstimator(data=None, Knn=None, tree=None, bracket=None, tol=0.2)

Bases: object

Estimate the intrinsic dimension of a point cloud using kernel method.

Based on https://doi.org/10.1016/j.acha.2015.01.001 See Fig. 6

In implementation, we analytically evaluate

d(log(S(e)))/d(log(e))

There are three operation modes:

  • Given data only, Knn=None: use all pairwise distances

  • Given data and Knn=int: use kNN distances, a KDTree will be built

  • Given tree and Knn=int: use kNN distances from the tree, data will not be used

Parameters:
  • data – Input data, shape (N, d).

  • Knn – Number of nearest neighbors to use. If None, use all pairwise distances.

  • tree – A precomputed KDTree instance. If given, data is not used.

  • bracket – Bracket for the scalar minimization

  • tol – Tolerance for biased rounding of fractional dimension

plot(N=20, fig=None, sty='b-')
sanity_check(K=None, ifref=True, ifnrm=True)
class dymad.numerics.manifold.Manifold(data, d, K=None, g=None, T=None, iforit=False, extT=None)

Bases: object

classmethod from_tensors(t)
gmls(x, Y, ret_der=False)
plot2d(N, scl=1)
plot3d(N, scl=1)
precompute()
to_tensors()
class dymad.numerics.manifold.ManifoldAltTree(data, d, K=None, g=None, T=None, iforit=False, extT=None, tree_data=None, tree_transform=None)

Bases: Manifold

The only difference from Manifold is that a KDTree on a different set of points is used to find the kNN points for GMLS.

Specifically, instead of finding kNN points of x from the original data X, we first transform x to z using a given transform function, and then find the kNN points of z from a given set of points Z (with a KDTree built on Z).

The rest is still the same as Manifold.

class dymad.numerics.manifold.ManifoldAnalytical(data, d, K=None, g=None, fT=None)

Bases: Manifold

precompute()
dymad.numerics.manifold.tangent_1circle(x)
dymad.numerics.manifold.tangent_2torus(x, R)