Tag Info

New answers tagged

3

This is based on mfvonh’s answer. I thought I would flush out the full answer for posterity. Let’s cluster the data based on Sepal Length and Sepal Width sample = irisData[[All, {1, 2}]] -> irisData; clusters = {cluster1, cluster2, cluster3} = FindClusters[sample, 3]; Let’s plot the various characteristics of the clusters: {ListPlot[({#1, #2} ...


3

You should use one of the syntax options for FindClusters involving rules. When clustering your dataset, transform it to {data to cluster} -> {data to return} format at the level of either individual elements or the whole list. The details are explained in the documentation. For example, to cluster on columns 1 (sepal length) and 4 (petal width): ...


1

Is this what you want? pLabels = {"Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Type"}; IrisPlot[x_, y_] := ListPlot[FindClusters[irisData[[All, {x, y}]], 3], AspectRatio -> 1, ImageSize -> 400, Frame -> True, FrameLabel -> pLabels[[{x, y}]]] IrisPlot[2, 3]



Top 50 recent answers are included