I'm using StandardScaler to transform data before providing training dataset to clustering model.
X = StandardScaler().fit_transform(X_train)
Assume, clf is the unsupervised cluster model, I'm predicting the labels as follows:
y = clf.predict(X)
Question: How do I combine "y" and "X_train" numpy arrays? I'm not sure if StandardScaler() maintains the order within the matrix. So, will this work?
df = pd.DataFrame(np.array(X_train), np.array(y))