- implemented KMeans
- fixed non seeded rng
- fixed display exception with NoTargets
- added basic test cases to app
This commit is contained in:
2024-08-12 22:09:41 +02:00
parent 7739878a2c
commit 8e8e0b2d51
4 changed files with 83 additions and 5 deletions

View File

@@ -83,7 +83,8 @@ class Dataset:
splitted = [data[ data[:,0] == k ] for k in classes ]
total_each = np.average([len(x) for x in splitted]).astype(int)
rng = np.random.default_rng()
seed = np.random.randint(0, 4294967295)
rng = np.random.default_rng(seed)
data = []
for x in splitted:
samples = rng.choice(x, size=total_each, replace=True, shuffle=False)