They have 3 features that they can use to cluster.
(他们具有3个可用于集群的功能。)
Usually they will just take the euclidean distance of all the features to get the distance from cluster to cluster. (通常,它们只是采用所有要素的欧式距离来获得簇之间的距离。)
This is very easy to visualize in two dimensions.
(这在二维上非常容易可视化。)
Take two points and the distance between them is the hypotenuse of a triangle. (取两个点,它们之间的距离是三角形的斜边。)
In three dimensions, it's a little harder to visualize. (在三个维度上,它很难可视化。)
The author is simply using 2 dimensions so she can plot it later. (作者只是使用2维,所以她以后可以绘制它。)
However, to use all three dimensions you would simply modify the code to: (但是,要使用所有三个维度,您只需将代码修改为:)
X = dataset.iloc[:,[1:3]].values
and that will use age,income and spending score in the algorithm
(这将在算法中使用年龄,收入和支出得分)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…