I have 16 features in my dataset:['age','job', 'marital', 'education', 'default','balance','housing','loan','contact','day','month','duration','campaign','pdays','previous','poutcome']. And result as : 'y'{0,1}:

Standardize Data looks like:

enter image description here

I did k-means on this Standardize Data, x.

kmean1 = KMeans(n_clusters=2).fit(x)

pca = PCA(n_components=2) principalComponents = pca.fit_transform(x)

How do plot scatter plot for this Standardize Data (x)? I did plot the scatter plot for PC1 vs. PC2, but I am not sure if its correct, to associate PCA points for k-means graph. Can I even draw a scatter plot for more than 2 features, like in my case 16 features? How will I color it based on values of 'y'.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.