pytutorial/scikit-learn/kmeans
David Rotermund 903d4a4b6c
Add files via upload
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
2023-12-19 14:09:35 +01:00
..
image0.png Add files via upload 2023-12-19 14:09:35 +01:00
README.md Create README.md 2023-12-19 14:09:12 +01:00

KMeans

{:.no_toc}

* TOC {:toc}

The goal

Questions to David Rotermund

Test data

import numpy as np
import matplotlib.pyplot as plt

rng = np.random.default_rng()

a_x = rng.normal(1.5, 1.0, size=(1000))
a_y = rng.normal(3.0, 1.0, size=(1000))

b_x = rng.normal(0.0, 1.0, size=(1000))
b_y = rng.normal(0.0, 1.0, size=(1000))

plt.plot(a_x, a_y, "c.")
plt.plot(b_x, b_y, "m.")
plt.show()

image0