0
votes

Is there any method to build the classification boundary with all the iris feature instead of only using 2 features? Thank you.

Here is the code of KNN with classification boundary with all the 2 iris feature: http://scikit-learn.org/stable/auto_examples/neighbors/plot_classification.html#example-neighbors-plot-classification-py Can I include all the features?

1
Please provide some example code or explain in more details. - Farseer
I have added more details. Thanks for your reply. - clockspeed

1 Answers

0
votes

replace

X = iris.data[:, :2]  # we only take the first two features. We could
                      # avoid this ugly slicing by using a two-dim dataset

with X = iris.data

Also put in comment all code that responsible for plotting 2 dimensional graph. If you want to draw it any way, use some kind of dimension reduction technique like PCA.