Dataset at a Glance

Machine Learning in CodeEasy+10 XP+10

Dataset at a Glance

Before training anything, it helps to know how big a dataset is and how many answers it can have.

Task: write describe_dataset(name). name is one of "iris", "wine" or "breast_cancer".

  • Load that built-in dataset with scikit-learn as X and y.
  • Return a list of three whole numbers: [number of rows, number of feature columns, number of different labels in y].

Examples

name = "iris"
returns [150, 4, 3]
name = "wine"
returns [178, 13, 3]

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run