Datasets.load_iris () in Python
What does the function load_iris()
do? Also, I don't understand what datatype it contains and where to find it.
iris = datasets.load_iris()
X = iris.data
target = iris.target
names = iris.target_names
Can someone please elaborate on what this piece of code does? Thanks in advance.
load_iris
is a function of sklearn
. The link contains the documentation: ris
your code will have dict
. X
and y
will be numpy
arrays, but names
has an array of possible targets as text (not numeric values as in y
).