GAA-UAM / scikit-fda

Functional Data Analysis Python package
https://fda.readthedocs.io
BSD 3-Clause "New" or "Revised" License
287 stars 51 forks source link

Default `random_state` for `KMeans` and `FuzzyCMeans` should be `None` #603

Open vnmabus opened 3 months ago

vnmabus commented 3 months ago

Bug description summary

The default behavior of KMeans and FuzzyCMeans when no random_state is passed should be to not use a fixed seed, as it is done in scikit-learn. Somehow, the current behavior is having a fixed seed (0).

Code to reproduce the bug

from skfda.ml.clustering import KMeans

clusterer = KMeans()
print(clusterer.random_state)

Expected result

None should be printed.

Actual result

A fixed seed of 0 is printed.

Traceback (if an exception is raised)

No response

Software versions

scikit-fda version: 0.9.2.dev0

Additional context

No response