geomstats package#
Subpackages#
- geomstats.datasets package
- Submodules
- geomstats.datasets.prepare_emg_data module
TimeSeriesCovarianceTimeSeriesCovariance.label_mapTimeSeriesCovariance.data_dictTimeSeriesCovariance.n_stepsTimeSeriesCovariance.n_timeseriesTimeSeriesCovariance.batchesTimeSeriesCovariance.marginTimeSeriesCovariance.covsTimeSeriesCovariance.labelsTimeSeriesCovariance.covecTimeSeriesCovariance.diagsTimeSeriesCovariance.transform()
- geomstats.datasets.prepare_graph_data module
- geomstats.datasets.utils module
- Module contents
- geomstats.distributions package
- geomstats.geometry package
- Subpackages
- geomstats.geometry.stratified package
- Submodules
- geomstats.geometry.stratified.bhv_space module
- geomstats.geometry.stratified.graph_space module
- geomstats.geometry.stratified.point_set module
- geomstats.geometry.stratified.quotient module
- geomstats.geometry.stratified.spider module
- geomstats.geometry.stratified.trees module
- geomstats.geometry.stratified.vectorization module
- geomstats.geometry.stratified.wald_space module
- Module contents
- geomstats.geometry.stratified package
- Submodules
- geomstats.geometry.base module
- geomstats.geometry.complex_manifold module
- geomstats.geometry.complex_matrices module
ComplexMatricesComplexMatrices.belongs()ComplexMatrices.congruent()ComplexMatrices.default_metric()ComplexMatrices.frobenius_product()ComplexMatrices.is_hermitian()ComplexMatrices.is_hpd()ComplexMatrices.is_skew_hermitian()ComplexMatrices.random_point()ComplexMatrices.to_hermitian()ComplexMatrices.to_skew_hermitian()ComplexMatrices.transconjugate()
ComplexMatricesMetric
- geomstats.geometry.complex_poincare_disk module
- geomstats.geometry.complex_riemannian_metric module
- geomstats.geometry.connection module
ConnectionConnection.christoffels()Connection.curvature()Connection.curvature_derivative()Connection.directional_curvature()Connection.directional_curvature_derivative()Connection.exp()Connection.geodesic()Connection.geodesic_equation()Connection.injectivity_radius()Connection.ladder_parallel_transport()Connection.log()Connection.parallel_transport()Connection.ricci_tensor()Connection.riemann_tensor()
- geomstats.geometry.diffeo module
- geomstats.geometry.discrete_curves module
DiscreteCurvesDiscreteCurvesStartingAtOriginDiscreteCurvesStartingAtOrigin.ambient_manifoldDiscreteCurvesStartingAtOrigin.default_metric()DiscreteCurvesStartingAtOrigin.discrete_curves_with_l2DiscreteCurvesStartingAtOrigin.insert_origin()DiscreteCurvesStartingAtOrigin.interpolate()DiscreteCurvesStartingAtOrigin.k_sampling_pointsDiscreteCurvesStartingAtOrigin.length()DiscreteCurvesStartingAtOrigin.new()DiscreteCurvesStartingAtOrigin.normalize()DiscreteCurvesStartingAtOrigin.projection()DiscreteCurvesStartingAtOrigin.random_point()
DynamicProgrammingAlignerElasticMetricFTransformIterativeHorizontalGeodesicAlignerL2CurvesMetricReparametrizationBundleRotationBundleSRVMetricSRVTransforminsert_zeros()
- geomstats.geometry.discrete_surfaces module
DiscreteSurfacesDiscreteSurfaces.belongs()DiscreteSurfaces.default_metric()DiscreteSurfaces.face_areas()DiscreteSurfaces.is_tangent()DiscreteSurfaces.laplacian()DiscreteSurfaces.new()DiscreteSurfaces.normals()DiscreteSurfaces.projection()DiscreteSurfaces.random_point()DiscreteSurfaces.surface_metric_matrices()DiscreteSurfaces.surface_metric_matrices_from_one_forms()DiscreteSurfaces.surface_one_forms()DiscreteSurfaces.to_tangent()DiscreteSurfaces.vertex_areas()
DiscreteSurfacesExpSolverElasticMetricL2SurfacesMetricRelaxedPathStraighteningReparametrizationBundle
- geomstats.geometry.euclidean module
- geomstats.geometry.fiber_bundle module
AlignerAlgorithmAlternatingAlignerDistanceMinimizingAlignerFiberBundleFiberBundle.align()FiberBundle.horizontal_lift()FiberBundle.horizontal_projection()FiberBundle.integrability_tensor()FiberBundle.integrability_tensor_derivative()FiberBundle.is_horizontal()FiberBundle.is_vertical()FiberBundle.lift()FiberBundle.riemannian_submersion()FiberBundle.tangent_riemannian_submersion()FiberBundle.vertical_projection()
- geomstats.geometry.full_rank_correlation_matrices module
CorrelationMatricesBundleEuclideanCholeskyDiffeoEuclideanCholeskyMetricFullRankCorrelationAffineQuotientMetricFullRankCorrelationMatricesFullRankCorrelationMatrices.default_metric()FullRankCorrelationMatrices.diag_action()FullRankCorrelationMatrices.from_covariance()FullRankCorrelationMatrices.projection()FullRankCorrelationMatrices.random_point()FullRankCorrelationMatrices.submersion()FullRankCorrelationMatrices.tangent_submersion()FullRankCorrelationMatrices.to_tangent()
LogEuclideanCholeskyDiffeoLogEuclideanCholeskyMetricLogScaledMetricLogScalingDiffeoOffLogDiffeoOffLogMetricPolyHyperbolicCholeskyMetricSPDScalingFinderUniqueDiagonalMatrixAlgorithmcorr_map()off_map()tangent_corr_map()
- geomstats.geometry.full_rank_matrices module
- geomstats.geometry.functions module
- geomstats.geometry.general_linear module
- geomstats.geometry.grassmannian module
GrassmannianGrassmannianCanonicalMetricGrassmannianCanonicalMetric.exp()GrassmannianCanonicalMetric.injectivity_radius()GrassmannianCanonicalMetric.inner_product()GrassmannianCanonicalMetric.log()GrassmannianCanonicalMetric.norm()GrassmannianCanonicalMetric.parallel_transport()GrassmannianCanonicalMetric.squared_dist()GrassmannianCanonicalMetric.squared_norm()
- geomstats.geometry.group_action module
- geomstats.geometry.heisenberg module
HeisenbergVectorsHeisenbergVectors.compose()HeisenbergVectors.exp_from_identity()HeisenbergVectors.identityHeisenbergVectors.inverse()HeisenbergVectors.jacobian_translation()HeisenbergVectors.lie_bracket()HeisenbergVectors.log_from_identity()HeisenbergVectors.upper_triangular_matrix_from_vector()HeisenbergVectors.vector_from_upper_triangular_matrix()
- geomstats.geometry.hermitian module
- geomstats.geometry.hermitian_matrices module
- geomstats.geometry.hpd_matrices module
- geomstats.geometry.hyperbolic module
- geomstats.geometry.hyperboloid module
- geomstats.geometry.hypersphere module
HypersphereHypersphereMetricHypersphereMetric.christoffels()HypersphereMetric.curvature()HypersphereMetric.curvature_derivative()HypersphereMetric.dist()HypersphereMetric.exp()HypersphereMetric.injectivity_radius()HypersphereMetric.inner_product()HypersphereMetric.log()HypersphereMetric.metric_matrix()HypersphereMetric.norm_factor_gradient()HypersphereMetric.normalization_factor()HypersphereMetric.parallel_transport()HypersphereMetric.squared_dist()HypersphereMetric.squared_norm()
- geomstats.geometry.invariant_metric module
- geomstats.geometry.klein_bottle module
- geomstats.geometry.landmarks module
- geomstats.geometry.lie_algebra module
- geomstats.geometry.lie_group module
LieGroupLieGroup.lie_algebraLieGroup.compose()LieGroup.default_metric()LieGroup.exp()LieGroup.exp_from_identity()LieGroup.exp_not_from_identity()LieGroup.identityLieGroup.inverse()LieGroup.is_tangent()LieGroup.jacobian_translation()LieGroup.lie_bracket()LieGroup.log()LieGroup.log_from_identity()LieGroup.log_not_from_identity()LieGroup.tangent_translation_map()LieGroup.to_tangent()
MatrixLieGroup
- geomstats.geometry.lower_triangular_matrices module
- geomstats.geometry.manifold module
- geomstats.geometry.matrices module
BasisRepresentationDiffeoFlattenDiffeoMatricesMatrices.align_matrices()Matrices.basis_representation()Matrices.bracket()Matrices.congruent()Matrices.default_metric()Matrices.diagonal()Matrices.equal()Matrices.flatten()Matrices.frobenius_product()Matrices.is_diagonal()Matrices.is_lower_triangular()Matrices.is_pd()Matrices.is_skew_symmetric()Matrices.is_spd()Matrices.is_square()Matrices.is_strictly_lower_triangular()Matrices.is_strictly_upper_triangular()Matrices.is_symmetric()Matrices.is_upper_triangular()Matrices.mul()Matrices.random_point()Matrices.reshape()Matrices.to_diagonal()Matrices.to_lower_triangular()Matrices.to_lower_triangular_diagonal_scaled()Matrices.to_skew_symmetric()Matrices.to_strictly_lower_triangular()Matrices.to_strictly_upper_triangular()Matrices.to_symmetric()Matrices.to_upper_triangular()Matrices.trace_product()Matrices.transpose()
MatricesDiagMetricMatricesMetricmatrix_matrix_transpose()tangent_matrix_matrix_transpose()
- geomstats.geometry.minkowski module
- geomstats.geometry.nfold_manifold module
- geomstats.geometry.open_hemisphere module
- geomstats.geometry.poincare_ball module
PoincareBallPoincareBallMetricPoincareBallMetric.dist()PoincareBallMetric.exp()PoincareBallMetric.injectivity_radius()PoincareBallMetric.log()PoincareBallMetric.metric_matrix()PoincareBallMetric.mobius_add()PoincareBallMetric.norm_factor_gradient()PoincareBallMetric.normalization_factor()PoincareBallMetric.retraction()PoincareBallMetric.squared_dist()
- geomstats.geometry.poincare_half_space module
- geomstats.geometry.poincare_polydisk module
- geomstats.geometry.positive_lower_triangular_matrices module
- geomstats.geometry.positive_reals module
- geomstats.geometry.pre_shape module
KendallShapeMetricPreShapeBundlePreShapeBundle.align()PreShapeBundle.integrability_tensor()PreShapeBundle.integrability_tensor_derivative()PreShapeBundle.integrability_tensor_derivative_parallel()PreShapeBundle.is_horizontal()PreShapeBundle.iterated_integrability_tensor_derivative_parallel()PreShapeBundle.vertical_projection()
PreShapeMetricPreShapeSpace
- geomstats.geometry.product_hpd_and_siegel_disks module
- geomstats.geometry.product_manifold module
ProductManifoldProductRiemannianMetricProductRiemannianMetric.dist()ProductRiemannianMetric.exp()ProductRiemannianMetric.geodesic()ProductRiemannianMetric.inner_product()ProductRiemannianMetric.log()ProductRiemannianMetric.metric_matrix()ProductRiemannianMetric.point_ndimProductRiemannianMetric.shapeProductRiemannianMetric.squared_norm()
- geomstats.geometry.product_positive_reals_and_poincare_disks module
- geomstats.geometry.pullback_metric module
PullbackDiffeoMetricPullbackDiffeoMetric.curvature()PullbackDiffeoMetric.dist()PullbackDiffeoMetric.exp()PullbackDiffeoMetric.geodesic()PullbackDiffeoMetric.inner_product()PullbackDiffeoMetric.log()PullbackDiffeoMetric.metric_matrix()PullbackDiffeoMetric.norm()PullbackDiffeoMetric.parallel_transport()PullbackDiffeoMetric.squared_dist()PullbackDiffeoMetric.squared_norm()
PullbackMetric
- geomstats.geometry.quotient_metric module
- geomstats.geometry.rank_k_psd_matrices module
- geomstats.geometry.riemannian_metric module
RiemannianMetricRiemannianMetric.christoffels()RiemannianMetric.closest_neighbor_index()RiemannianMetric.cometric_matrix()RiemannianMetric.covariant_riemann_tensor()RiemannianMetric.diameter()RiemannianMetric.dist()RiemannianMetric.dist_broadcast()RiemannianMetric.dist_pairwise()RiemannianMetric.hamiltonian()RiemannianMetric.inner_coproduct()RiemannianMetric.inner_product()RiemannianMetric.inner_product_derivative_matrix()RiemannianMetric.metric_matrix()RiemannianMetric.norm()RiemannianMetric.normal_basis()RiemannianMetric.normalize()RiemannianMetric.random_unit_tangent_vec()RiemannianMetric.scalar_curvature()RiemannianMetric.sectional_curvature()RiemannianMetric.squared_dist()RiemannianMetric.squared_norm()
- geomstats.geometry.sasaki_metric module
- geomstats.geometry.scalar_product_metric module
- geomstats.geometry.siegel module
SiegelSiegelMetricSiegelMetric.exp()SiegelMetric.exp_at_zero()SiegelMetric.inner_product()SiegelMetric.isometry()SiegelMetric.log()SiegelMetric.log_at_zero()SiegelMetric.sectional_curvature()SiegelMetric.sectional_curvature_at_zero()SiegelMetric.squared_dist()SiegelMetric.tangent_vec_from_base_point_to_zero()SiegelMetric.tangent_vec_from_zero_to_base_point()
- geomstats.geometry.skew_symmetric_matrices module
- geomstats.geometry.spd_matrices module
- geomstats.geometry.special_euclidean module
SpecialEuclideanSpecialEuclideanMatricesCanonicalLeftMetricSpecialEuclideanMatricesCanonicalLeftMetric.exp()SpecialEuclideanMatricesCanonicalLeftMetric.geodesic()SpecialEuclideanMatricesCanonicalLeftMetric.injectivity_radius()SpecialEuclideanMatricesCanonicalLeftMetric.inner_product()SpecialEuclideanMatricesCanonicalLeftMetric.log()SpecialEuclideanMatricesCanonicalLeftMetric.parallel_transport()SpecialEuclideanMatricesCanonicalLeftMetric.squared_dist()
SpecialEuclideanMatricesLieAlgebrahomogeneous_representation()
- geomstats.geometry.special_orthogonal module
- geomstats.geometry.stiefel module
- geomstats.geometry.sub_riemannian_metric module
- geomstats.geometry.symmetric_matrices module
- Module contents
- Subpackages
- geomstats.information_geometry package
- Submodules
- geomstats.information_geometry.base module
- geomstats.information_geometry.beta module
- geomstats.information_geometry.binomial module
- geomstats.information_geometry.categorical module
- geomstats.information_geometry.dirichlet module
- geomstats.information_geometry.exponential module
- geomstats.information_geometry.fisher_rao_metric module
- geomstats.information_geometry.gamma module
- geomstats.information_geometry.geometric module
- geomstats.information_geometry.multinomial module
MultinomialDistributionsMultinomialDistributions.dimMultinomialDistributions.embedding_manifoldMultinomialDistributions.default_metric()MultinomialDistributions.point_to_pdf()MultinomialDistributions.projection()MultinomialDistributions.random_point()MultinomialDistributions.sample()MultinomialDistributions.submersion()MultinomialDistributions.tangent_submersion()MultinomialDistributions.to_tangent()
MultinomialMetricMultinomialRandomVariableSimplexToPositiveHypersphere
- geomstats.information_geometry.normal module
CenteredNormalDistributionsCenteredNormalMetricDiagonalNormalDistributionsDiagonalNormalDistributionsRandomVariableDiagonalNormalMetricGeneralNormalDistributionsMultivariateNormalDistributionsRandomVariableNormalDistributionsSharedMeanNormalDistributionsRandomVariableUnivariateNormalDistributionsUnivariateNormalDistributionsRandomVariableUnivariateNormalMetricUnivariateNormalToPoincareHalfSpaceDiffeo
- geomstats.information_geometry.poisson module
- Module contents
- geomstats.learning package
- Submodules
- geomstats.learning.aac module
- geomstats.learning.agglomerative_hierarchical_clustering module
- geomstats.learning.expectation_maximization module
- geomstats.learning.exponential_barycenter module
- geomstats.learning.frechet_mean module
- geomstats.learning.geodesic_regression module
- geomstats.learning.geometric_median module
- geomstats.learning.incremental_frechet_mean module
- geomstats.learning.kalman_filter module
KalmanFilterLocalizationLocalization.adjoint_map()Localization.get_measurement_noise_cov()Localization.innovation()Localization.noise_jacobian()Localization.observation_jacobian()Localization.observation_model()Localization.preprocess_input()Localization.propagate()Localization.propagation_jacobian()Localization.regularize_angle()Localization.rotation_matrix()
LocalizationLinear
- geomstats.learning.kernel_density_estimation_classifier module
- geomstats.learning.kmeans module
- geomstats.learning.kmedoids module
- geomstats.learning.knn module
- geomstats.learning.mdm module
RiemannianMinimumDistanceToMeanRiemannianMinimumDistanceToMean.classes_RiemannianMinimumDistanceToMean.mean_estimates_RiemannianMinimumDistanceToMean.fit()RiemannianMinimumDistanceToMean.n_classes_RiemannianMinimumDistanceToMean.predict()RiemannianMinimumDistanceToMean.predict_proba()RiemannianMinimumDistanceToMean.set_fit_request()RiemannianMinimumDistanceToMean.set_score_request()RiemannianMinimumDistanceToMean.transform()
- geomstats.learning.online_kmeans module
- geomstats.learning.pca module
- geomstats.learning.preprocessing module
- geomstats.learning.radial_kernel_functions module
biweight_radial_kernel()bump_radial_kernel()cosine_radial_kernel()gaussian_radial_kernel()inverse_multiquadric_radial_kernel()inverse_quadratic_radial_kernel()laplacian_radial_kernel()logistic_radial_kernel()parabolic_radial_kernel()sigmoid_radial_kernel()triangular_radial_kernel()tricube_radial_kernel()triweight_radial_kernel()uniform_radial_kernel()
- geomstats.learning.riemannian_mean_shift module
- geomstats.learning.wrapped_gaussian_process module
- Module contents
- geomstats.numerics package
- Subpackages
- Submodules
- geomstats.numerics.bvp module
- geomstats.numerics.finite_differences module
- geomstats.numerics.geodesic module
- geomstats.numerics.interpolation module
- geomstats.numerics.ivp module
- geomstats.numerics.path module
- Module contents
- geomstats.test package
- Submodules
- geomstats.test.conf module
- geomstats.test.data module
TestDataTestData.N_RANDOM_POINTSTestData.N_SHAPE_POINTSTestData.N_TIME_POINTSTestData.N_VEC_REPSTestData.fail_for_autodiff_exceptionsTestData.fail_for_not_implemented_errorsTestData.generate_random_data()TestData.generate_random_data_with_time()TestData.generate_shape_data()TestData.generate_tests()TestData.generate_vec_data()TestData.generate_vec_data_with_time()TestData.skip_allTestData.skip_vecTestData.skipsTestData.tolerancesTestData.trialsTestData.xfails
- geomstats.test.parametrizers module
- geomstats.test.random module
DiffeoBasedRandomDataGeneratorEmbeddedSpaceRandomDataGeneratorGammaRandomDataGeneratorHeisenbergVectorsRandomDataGeneratorHypersphereIntrinsicRandomDataGeneratorKendalShapeRandomDataGeneratorLieGroupVectorRandomDataGeneratorMatrixVectorSpaceRandomDataGeneratorNFoldManifoldRandomDataGeneratorRandomDataGeneratorRankKPSDMatricesRandomDataGeneratorShapeBundleRandomDataGeneratorVectorSpaceRandomDataGeneratorget_random_quaternion()get_random_times()
- geomstats.test.test_case module
- geomstats.test.utils module
- geomstats.test.vectorization module
- Module contents
- geomstats.test_cases package
- Subpackages
- geomstats.test_cases.backend package
- geomstats.test_cases.datasets package
- geomstats.test_cases.distributions package
- geomstats.test_cases.geometry package
- Subpackages
- Submodules
- geomstats.test_cases.geometry.base module
- geomstats.test_cases.geometry.complex_manifold module
- geomstats.test_cases.geometry.complex_matrices module
- geomstats.test_cases.geometry.complex_riemannian_metric module
- geomstats.test_cases.geometry.connection module
- geomstats.test_cases.geometry.diffeo module
- geomstats.test_cases.geometry.discrete_curves module
- geomstats.test_cases.geometry.discrete_surfaces module
- geomstats.test_cases.geometry.euclidean module
- geomstats.test_cases.geometry.fiber_bundle module
- geomstats.test_cases.geometry.full_rank_correlation_matrices module
- geomstats.test_cases.geometry.general_linear module
- geomstats.test_cases.geometry.group_action module
- geomstats.test_cases.geometry.heisenberg module
- geomstats.test_cases.geometry.hermitian module
- geomstats.test_cases.geometry.hypersphere module
- geomstats.test_cases.geometry.invariant_metric module
- geomstats.test_cases.geometry.lie_algebra module
- geomstats.test_cases.geometry.lie_group module
- geomstats.test_cases.geometry.manifold module
- geomstats.test_cases.geometry.matrices module
- geomstats.test_cases.geometry.mixins module
- geomstats.test_cases.geometry.nfold_manifold module
- geomstats.test_cases.geometry.poincare_ball module
- geomstats.test_cases.geometry.poincare_half_space module
- geomstats.test_cases.geometry.positive_lower_triangular_matrices module
- geomstats.test_cases.geometry.pre_shape module
- geomstats.test_cases.geometry.product_manifold module
- geomstats.test_cases.geometry.pullback_metric module
- geomstats.test_cases.geometry.quotient_metric module
- geomstats.test_cases.geometry.riemannian_metric module
- geomstats.test_cases.geometry.sasaki_metric module
- geomstats.test_cases.geometry.scalar_product_metric module
- geomstats.test_cases.geometry.siegel module
- geomstats.test_cases.geometry.skew_symmetric_matrices module
- geomstats.test_cases.geometry.spd_matrices module
- geomstats.test_cases.geometry.special_euclidean module
- geomstats.test_cases.geometry.special_orthogonal module
- geomstats.test_cases.geometry.stiefel module
- geomstats.test_cases.geometry.sub_riemannian_metric module
- Module contents
- geomstats.test_cases.information_geometry package
- Submodules
- geomstats.test_cases.information_geometry.base module
- geomstats.test_cases.information_geometry.beta module
- geomstats.test_cases.information_geometry.binomial module
- geomstats.test_cases.information_geometry.dirichlet module
- geomstats.test_cases.information_geometry.exponential module
- geomstats.test_cases.information_geometry.gamma module
- geomstats.test_cases.information_geometry.geometric module
- geomstats.test_cases.information_geometry.multinomial module
- geomstats.test_cases.information_geometry.normal module
- geomstats.test_cases.information_geometry.poisson module
- Module contents
- geomstats.test_cases.learning package
- Submodules
- geomstats.test_cases.learning.agglomerative_hierarchical_clustering module
- geomstats.test_cases.learning.expectation_maximization module
- geomstats.test_cases.learning.exponential_barycenter module
- geomstats.test_cases.learning.frechet_mean module
- geomstats.test_cases.learning.geodesic_regression module
- geomstats.test_cases.learning.incremental_frechet_mean module
- geomstats.test_cases.learning.kalman_filter module
- geomstats.test_cases.learning.kernel_density_estimation_classifier module
- geomstats.test_cases.learning.kmeans module
- geomstats.test_cases.learning.knn module
- geomstats.test_cases.learning.mdm module
- geomstats.test_cases.learning.pca module
- geomstats.test_cases.learning.preprocessing module
- geomstats.test_cases.learning.radial_kernel_functions module
- geomstats.test_cases.learning.wrapped_gaussian_process module
- Module contents
- geomstats.test_cases.numerics package
- Submodules
- geomstats.test_cases.algebra_utils module
- geomstats.test_cases.varifold module
- Module contents
- Subpackages
- geomstats.visualization package
- Submodules
- geomstats.visualization.hyperbolic module
- geomstats.visualization.hypersphere module
- geomstats.visualization.poincare_polydisk module
- geomstats.visualization.pre_shape module
KendallDiskKendallDisk.pointsKendallDisk.coords_typeKendallDisk.poleKendallDisk.centreKendallDisk.uaKendallDisk.ubKendallDisk.naKendallDisk.add_points()KendallDisk.clear_points()KendallDisk.convert_to_planar_coordinates()KendallDisk.convert_to_polar_coordinates()KendallDisk.draw()KendallDisk.draw_curve()KendallDisk.draw_points()KendallDisk.draw_triangle()KendallDisk.draw_vector()KendallDisk.set_ax()
KendallSphereKendallSphere.pointsKendallSphere.coords_typeKendallSphere.poleKendallSphere.uaKendallSphere.ubKendallSphere.naKendallSphere.add_points()KendallSphere.clear_points()KendallSphere.convert_to_polar_coordinates()KendallSphere.convert_to_spherical_coordinates()KendallSphere.draw()KendallSphere.draw_curve()KendallSphere.draw_points()KendallSphere.draw_triangle()KendallSphere.draw_vector()KendallSphere.rotation()KendallSphere.set_ax()KendallSphere.set_view()
- geomstats.visualization.spd_matrices module
- geomstats.visualization.special_euclidean module
- geomstats.visualization.special_orthogonal module
- Module contents
Submodules#
geomstats.algebra_utils module#
Utility module of reusable algebra routines.
- geomstats.algebra_utils.columnwise_scaling(vec, mat)[source]#
Column-wise scaling.
Equivalent to \(AD\), where \(D\) is a diagonal matrix.
- Parameters:
vec (array-like, shape=[…, k]) – Vector of scalings.
mat (array-like, shape=[…, n, k]) – Matrix.
- Returns:
column_scaled_mat (array-like, shape=[…, n, k])
- geomstats.algebra_utils.flip_determinant(matrix, det)[source]#
Change sign of the determinant if it is negative.
For a batch of matrices, multiply the matrices which have negative determinant by a diagonal matrix \(diag(1,...,1,-1)\) from the right. This changes the sign of the last column of the matrix.
- Parameters:
matrix (array-like, shape=[…, n , m]) – Matrix to transform.
det (array-like, shape=[…]) – Determinant of matrix, or any other scalar to use as threshold to determine whether to change the sign of the last column of matrix.
- Returns:
matrix_flipped (array-like, shape=[…, n, m]) – Matrix with the sign of last column changed if det < 0.
- geomstats.algebra_utils.from_vector_to_diagonal_matrix(vector, num_diag=0)[source]#
Create diagonal matrices from rows of a matrix.
- Parameters:
vector (array-like, shape=[m, n])
num_diag (int) – number of diagonal in result matrix. If 0, the result matrix is a diagonal matrix; if positive, the result matrix has an upper-right non-zero diagonal; if negative, the result matrix has a lower-left non-zero diagonal. Optional, Default: 0.
- Returns:
diagonals (array-like, shape=[m, n, n]) – 3-dimensional array where the i-th n-by-n array diagonals[i, :, :] is a diagonal matrix containing the i-th row of vector.
- geomstats.algebra_utils.rotate_points(points, end_point)[source]#
Apply to points the rotation from north_pole to end_point.
A QR decomposition is used to find the rotation that maps the north pole (1, 0,…,0) to the end_point, then this rotation is applied to the input points.
- Parameters:
points (array-like, shape=[…, n]) – Points to rotate.
end_point (array-like, shape=[n, ]) – Point to parametrise the rotation.
- Returns:
rotated_points (array-like, shape=[…, n]) – Points after the rotation.
- geomstats.algebra_utils.rowwise_scaling(vec, mat)[source]#
Row-wise scaling.
Equivalent to \(DA\), where \(D\) is a diagonal matrix.
- Parameters:
vec (array-like, shape=[…, n]) – Vector of scalings.
mat (array-like, shape=[…, n, k]) – Matrix.
- Returns:
row_scaled_mat (array-like, shape=[…, n, k])
- geomstats.algebra_utils.taylor_exp_even_func(point, taylor_function, order=5, tol=1e-06)[source]#
Taylor Approximation of an even function around zero.
- Parameters:
point (array-like) – Argument of the function to approximate.
taylor_function (dict with following keys) –
- functioncallable
Even function to approximate around zero.
- coefficientslist
Taylor coefficients of even order at zero.
order (int) – Order of the Taylor approximation. Optional, Default: 5.
tol (float) – Threshold to use the approximation instead of the function’s value. Where abs(point) <= tol, the approximation is returned.
- Returns:
function_value (array-like) – Value of the function at point.
geomstats.errors module#
Checks and associated errors.
- exception geomstats.errors.ShapeError[source]#
Bases:
ValueErrorRaised when there is an incompatibility between shapes.
- geomstats.errors.check_belongs(point, manifold, atol=1e-08)[source]#
Raise an error if point does not belong to the input manifold.
- Parameters:
point (array-like) – Point to be tested.
manifold (Manifold) – Manifold to which the point should belong.
manifold_name (string) – Name of the manifold for the error message.
- geomstats.errors.check_integer(n, n_name)[source]#
Raise an error if n is not a > 0 integer.
- Parameters:
n (unspecified) – Parameter to be tested.
n_name (string) – Name of the parameter.
- geomstats.errors.check_parameter_accepted_values(param, param_name, accepted_values)[source]#
Raise an error if parameter does not belong to a set of values.
- Parameters:
param (unspecified) – Parameter to be tested.
param_name (string) – Name of the parameter.
accepted_values (list) – Accepted values that the parameter can take.
- geomstats.errors.check_point_shape(point, manifold, suppress_error=False)[source]#
Check if the shape of point does not match the shape of a manifold or metric.
If the final elements of the shape of point do not match the shape of manifold (which may be any object with a shape attribute, such as a Riemannian metric) then point cannot be an array of points on the manifold (or similar) and a ValueError is raised. The error can be suppressed by setting suppress_error to True.
- Parameters:
point (array-like) – The point to check the shape of.
manifold ({Manifold, RiemannianMetric}) – The object to check the point against
suppress_error (bool) – Whether to suppress the ShapeError if the shapes do not match. Optional, default is False.
- Returns:
shapes_match (bool) – Whether the shape of the point matches the shape of the manifold or metric.
- Raises:
ValueError – If the final dimensions of point are not equal to the final dimensions of manifold.
geomstats.exceptions module#
Geomstats custom exceptions.
- exception geomstats.exceptions.AutodiffNotImplementedError[source]#
Bases:
RuntimeErrorRaised when autodiff is not implemented.
geomstats.integrator module#
Integrator functions used when no closed forms are available.
Lead author: Nicolas Guigui.
These are designed for first order systems of ODEs written as a spatial variable \(x\) and a time variable \(t\):
where \(x\) is called the state variable. It may represent many variables by stacking arrays, e.g. position and velocity in a geodesic equation.
- geomstats.integrator.euler_step(force, state, time, dt)[source]#
Compute one step of the euler approximation.
- Parameters:
force (callable) – Vector field that is being integrated.
state (array-like, shape=[…, n, dim]) – State at time t, corresponds to position and velocity variables at time t.
time (float) – Time variable.
dt (float) – Time-step in the integration.
- Returns:
point_new (array-like, shape=[…, n, dim]) – Variables at time t + dt.
- geomstats.integrator.integrate(function, initial_state, end_time=1.0, n_steps=10, step='euler')[source]#
Compute the flow under the vector field using symplectic euler.
Integration function to compute flows of vector fields on a regular grid between 0 and a finite time from an initial state.
- Parameters:
function (callable) – Vector field to integrate.
initial_state (tuple of arrays) – Initial position and speed.
end_time (float) – Final integration time. Optional, default : 1.
n_steps (int) – Number of integration steps to use. Optional, default : 10.
step (str, {‘euler’, ‘rk4’, ‘group_rk2’, ‘group_rk4’}) – Numerical scheme to use for elementary integration steps. Optional, default : ‘euler’.
- Returns:
final_state (tuple) – sequences of solutions every end_time / n_steps. The shape of each element of the sequence is the same as the vectors passed in initial_state.
- geomstats.integrator.leapfrog_step(force, state, time, dt)[source]#
Compute one step of the leapfrog approximation.
- Parameters:
state (array-like, shape=[…, 2, dim]) – State at time t, corresponds to position and velocity variables at time t.
force (callable) – Vector field that is being integrated.
time (float) – Time variable.
dt (float) – Time-step in the integration.
- Returns:
state_new (array-like, shape=[…, 2, dim]) – State at time t + dt, corresponds to position and velocity variables at time t + dt.
References
- geomstats.integrator.rk2_step(force, state, time, dt)[source]#
Compute one step of the rk2 approximation.
- Parameters:
force (callable) – Vector field that is being integrated.
state (array-like, shape=[…, n, dim]) – State at time t, corresponds to position and velocity variables at time t.
time (float) – Time variable.
dt (float) – Time-step in the integration.
- Returns:
point_new (array-like, shape=[…, n, dim]) – Variables at time t + dt.
References
[1] https://en.wikipedia.org/wiki/Runge–Kutta_methods
- geomstats.integrator.rk4_step(force, state, time, dt)[source]#
Compute one step of the rk4 approximation.
- Parameters:
force (callable) – Vector field that is being integrated.
state (array-like, shape=[…, n, dim]) – State at time t, corresponds to position and velocity variables at time t.
time (float) – Time variable.
dt (float) – Time-step in the integration.
- Returns:
point_new (array-like, shape=[…, n, dim]) – Variables at time t + dt.
References
[1] https://en.wikipedia.org/wiki/Runge–Kutta_methods
- geomstats.integrator.symplectic_euler_step(force, state, time, dt)[source]#
Compute one step of the symplectic euler approximation.
- Parameters:
state (array-like, shape=[…, 2, dim]) – State at time t, corresponds to position and velocity variables at time t.
force (callable) – Vector field that is being integrated.
time (float) – Time variable.
dt (float) – Time-step in the integration.
- Returns:
point_new (array-like, shape=[…, 1, dim]) – Position variable at time t + dt.
vector_new (array-like, shape=[…, 1, dim]) – Velocity variable at time t + dt.
geomstats.varifold module#
(Oriented) varifolds related machinery.
General framework is introduced in [KCC2017]. See [CCGGR2020] for details about kernels. Implementation is based in pykeops (https://www.kernel-operations.io/keops/). In particular, see https://www.kernel-operations.io/keops/_auto_tutorials/surface_registration/plot_LDDMM_Surface.html#data-attachment-term # noqa for implementation details.
References
Irene Kaltenmark, Benjamin Charlier, and Nicolas Charon. “A General Framework for Curve and Surface Comparison and Registration With Oriented Varifolds,” 3346–55, 2017. https://openaccess.thecvf.com/content_cvpr_2017/html/Kaltenmark_A_General_Framework_CVPR_2017_paper.html.
Nicolas Charon, Benjamin Charlier, Joan Glaunès, Pietro Gori, and Pierre Roussillon. “Fidelity Metrics between Curves and Surfaces: Currents, Varifolds, and Normal Cycles.” In Riemannian Geometric Statistics in Medical Image Analysis, edited by Xavier Pennec, Stefan Sommer, and Tom Fletcher, 441–77. Academic Press, 2020. https://doi.org/10.1016/B978-0-12-814725-2.00021-2
- geomstats.varifold.BinetKernel(init_index=0, dim=3)[source]#
Binet kernel.
\[K(u, v) = \langle u, v \rangle^2\]Generates the expression: Square((u|v)).
- Parameters:
init_index (int) – Index of first symbolic variable.
dim (int) – Ambient dimension.
- geomstats.varifold.CauchyKernel(sigma=1.0, init_index=0, dim=3)[source]#
Cauchy kernel.
\[K(x, y)=\frac{1}{1+\|x-y\|^2 / \sigma^2}\]Generates the expression: IntCst(1)/(IntCst(1)+SqDist(x,y)*a).
- Parameters:
sigma (float) – Kernel parameter.
init_index (int) – Index of first symbolic variable.
dim (int) – Ambient dimension.
- geomstats.varifold.GaussianKernel(sigma=1.0, init_index=0, dim=3)[source]#
Gaussian kernel.
\[K(x, y)=e^{-\|x-y\|^2 / \sigma^2}\]Generates the expression: Exp(-SqDist(x,y)*a).
- Parameters:
sigma (float) – Kernel parameter.
init_index (int) – Index of first symbolic variable.
dim (int) – Ambient dimension.
- geomstats.varifold.LinearKernel(init_index=0, dim=3)[source]#
Linear kernel.
\[K(u, v) = \langle u, v \rangle\]Generates the expression: (u|v).
- Parameters:
init_index (int) – Index of first symbolic variable.
dim (int) – Ambient dimension.
- geomstats.varifold.RestrictedGaussianKernel(sigma=1.0, oriented=False, init_index=0, dim=3)[source]#
Gaussian kernel restricted to the hypersphere.
If unoriented:
\[K(u, v)=e^{2 (\langle u, v \rangle ^2 - 1) / \sigma^2 }\]If oriented:
\[K(u, v)=e^{2 (\langle u, v \rangle / - 1) - 1}\]Generates the expression:
oriented: Exp(IntCst(2)*a*((u|v)-IntCst(1)))
unoriented: Exp(IntCst(2)*a*(Square((u|v))-IntCst(1)))
- Parameters:
sigma (float) – Kernel parameter.
oriented (bool) – If False, uses squared inner product.
init_index (int) – Index of first symbolic variable.
dim (int) – Ambient dimension.
- class geomstats.varifold.SurfacesKernel(position_kernel=None, tangent_kernel=None, signal_kernel=None)[source]#
Bases:
objectA kernel on surfaces.
- Parameters:
position_kernel (pykeops.LazyTensor)
tangent_kernel (pykeops.LazyTensor)
signal_kernel (pykeops.LazyTensor)
- class geomstats.varifold.VarifoldMetric(kernel=None)[source]#
Bases:
objectVarifold metric.
- Parameters:
kernel (callable)
- dist(point_a, point_b)[source]#
Squared distance.
- Parameters:
point_a (Surface) – A point.
point_b (Surface) – A point.
- Returns:
scalar (float)
- loss(target_point, target_faces=None)[source]#
Loss with respected to target point.
- Parameters:
point_a (Surface) – A point.
target_faces (array-like, shape=[n_faces, 3]) – Combinatorial structure of target mesh.
- Returns:
squared_dist (callable) – f(vertices) -> scalar. Measures squared varifold distance between a point with vertices given wrt target_faces against target_point.
geomstats.vectorization module#
Decorator to handle vectorization.
This abstracts the backend type.
- geomstats.vectorization.broadcast_to_multibatch(batch_shape_a, batch_shape_b, array_a, *array_b)[source]#
Broadcast to multibatch.
Gives to both arrays batch shape batch_shape_b + batch_shape_a.
Does nothing if one of the batch shapes is empty.
- Parameters:
batch_shape_a (tuple) – Batch shape of array_a.
batch_shape_b (tuple) – Batch shape of array_b.
array_a (array)
array_b (array)
- geomstats.vectorization.check_is_batch(point_ndim, *point)[source]#
Check if inputs are batch.
- Parameters:
point_ndim (int) – Point number of array dimensions.
point (array-like) – Point belonging to the space.
- Returns:
is_batch (bool) – Returns True if point contains several points.
- geomstats.vectorization.get_batch_shape(point_ndim, *point)[source]#
Get batch shape.
- Parameters:
point_ndim (int) – Point number of array dimensions.
point (array-like or None) – Point belonging to the space.
- Returns:
batch_shape (tuple) – Returns the shape related with batch. () if only one point.
- geomstats.vectorization.get_n_points(point_ndim, *point)[source]#
Compute the number of points.
- Parameters:
point_ndim (int) – Point number of array dimensions.
point (array-like) – Point belonging to the space.
- Returns:
n_points (int) – Number of points.
- geomstats.vectorization.repeat_out(point_ndim, out, *point, out_shape=())[source]#
Repeat out shape after finding batch shape.
- Parameters:
point_ndim (int) – Point number of array dimensions.
out (array-like) – Output to be repeated
point (array-like or None) – Point belonging to the space.
out_shape (tuple) – Indicates out shape for no batch computations.
- Returns:
out (array-like) – If no batch, then input is returned. Otherwise it is broadcasted.
- geomstats.vectorization.repeat_out_multiple_ndim(out, point_ndim_1, points_1, point_ndim_2, points_2, out_ndim=0)[source]#
Repeat out after finding batch shape.
Differs from repeat_out by accepting two sets of point_ndim arrays.
- Parameters:
out (array-like) – Output to be repeated
point_ndim_1 (int) – Point number of array dimensions.
points_1 (tuple[array-like or None]) – Arrays of dimension point_ndim_1 or higher.
point_ndim_2 (int) – Point number of array dimensions.
points_2 (tuple[array-like or None]) – Arrays of dimension point_ndim_2 or higher.
out_ndim (int) – Out number of array dimensions.
- Returns:
out (array-like) – If no batch, then input is returned. Otherwise it is broadcasted.
- geomstats.vectorization.repeat_point(point, n_reps=2, expand=False)[source]#
Repeat point.
- Parameters:
point (array-like) – Point of a space.
n_reps (int) – Number of times the point should be repeated.
expand (bool) – Repeat even if n_reps == 1.
- Returns:
rep_point (array-like) – point repeated n_reps times.
Module contents#
Import main modules.