tensorflow for clustering #458
lemonysoft
started this conversation in
General
Replies: 1 comment
-
For a beginner clustering project you can simply create your own data: import tensorflow as tf
import numpy as np
points_n = 200
clusters_n = 3
points = tf.constant(np.random.uniform(0, 10, (points_n, 2)))
centroids = tf.Variable(tf.slice(tf.random_shuffle(points), [0, 0], [clusters_n, -1])) This generates random data points and assigns them to a 2D-tensor constant. Also, it randomly chooses centroids from the same generated set. There is a lot more that can be done with this like enabling element-wise subtraction between points and centroids by expanding their dimensions. 0, and 1 respectively. With this you can calculate distances between points and centroids and determine what makes a cluster. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there anyone using tensorflow for clustering? Which dataset is good for a beginner? There is no exercise in ZTM.
Beta Was this translation helpful? Give feedback.
All reactions