Skip to content
CampusEduX

Problem 2: Generate and Explore a Synthetic Dataset

Easypython
Learn the Concept: Scikit-learn

Problem Description

Write a Python program that uses make_classification to generate a synthetic dataset with 200 samples and 5 features, then prints its shape and class distribution.

Input

Parameters for make_classification (samples, features).

Output

The shape of the generated data and the count of each class.

Constraints

  • None specific.

Example Input

text
n_samples=200, n_features=5

Example Output

text
X shape: (200, 5) Class distribution: [100 100]

Concepts Covered

make_classification, np.bincount().

Related Problems

  • Problem 1: Build a Basic Pipeline
    Easy · python
    Solve Problem
  • Problem 3: Build a Pipeline with Imputation, Scaling, and Modeling
    Easy · python
    Solve Problem
  • Problem 4: Combine a Pipeline with GridSearchCV
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...