I am currently working on some scientific data and I am trying to perform a clustering task on it but I get a Value error due to the the format of the data. Which is two Pandas DataFrames in [170 rows x 7 columns].
#x is the y distance
x = np.empty(7, dtype = object)
x[:] = [distance_lC, distance_fC]
#y is the speed.
y = np.empty(7, dtype = object)
y[:] = [speed_lC, speed_fC]
cell_kmeans = KMeans(n_clusters = 4).fit_predict(y)
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
The output should give out the cluster. But I have the following Value Error: "ValueError: setting an array element with a sequence."