Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect dimension of hyperSphere #16

Closed
catanzaromj opened this issue Dec 7, 2023 · 1 comment
Closed

Incorrect dimension of hyperSphere #16

catanzaromj opened this issue Dec 7, 2023 · 1 comment

Comments

@catanzaromj
Copy link

catanzaromj commented Dec 7, 2023

The parameter d in skdim.datasets.hyperSphere is documented to be the "Dimension of the hypersphere". However, it is actually one larger than the intrinsic dimension of the hypersphere--the parameter d is the dimension of the ambient space in which the hypersphere is embedded (extrinsic dimension).

In [1]: from skdim.datasets import hyperSphere

In [2]: X = hyperSphere(n=100,d=2)

In [3]: X.shape
Out[3]: (100, 2)

The 2-sphere (the usual sphere) can't be embedded in R^2. The dataset X above is a sampling of the circle (1-sphere) not a 2-sphere.

@j-bac
Copy link
Collaborator

j-bac commented Dec 8, 2023

Thanks for pointing this out. hyperSphere(n=100,d=1) now returns the results you had with hyperSphere(n=100,d=2).

@j-bac j-bac closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants