9951 explained code solutions for 126 technologies


python-scikit-learnHow to load Iris dataset


import numpy as np
from sklearn import datasets

X, y = datasets.load_iris(return_X_y=True)ctrl + c
from sklearn import

import module from scikit-learn

import numpy

import Numpy module

X, y

loaded features data (X) and target variable (y) values

datasets

predefined datasets to play with

load_iris

loads Iris dataset