Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing in

  Enroll Now

Visualizing the class Imbalance

Let us visualize the class-imbalance using Seaborn countplot.


  • sns.countplot shows the counts of observations in each categorical bin using bars.
  • Mention the colors of the bars to be displayed for each class in the count plot.

    colors = ['blue','red']
  • Use sns.countplot and pass 'Class', data=data and palette=colors as input arguments.

    << your code comes here >>('Class', data=data, palette=colors)

    We observe that the classes are highly imbalanced with most of the transactions are non-fraud.

No hints are availble for this assesment

Answer is not availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...