-2
$\begingroup$

I am trying to balance my data set and using imblearn library for this but After performing fit operation when i try to see the data count in dependent variable its showing me below error


AttributeError Traceback (most recent call last) in ----> 1 y_rus.plot(kind='bar',title='QUALITY COUNT')

AttributeError: 'numpy.ndarray' object has no attribute 'plot'

Please find the code below.enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

There is nothing wrong with your data, your main mistake is that you need to pay attention to the plot function used. This link tells you how to plot your data. https://matplotlib.org/tutorials/introductory/pyplot.html

However I would change the last line to something like:

import matplotlib.pyplot as plt
plt.plot(y_rus)
plt.show()

or something like:

plt.scatter(y_rus)
plt.show()

In general is a bit difficult to understand what exactly you want or the format of the data, so I hope this works. Follow the tutorial it will help you understand what you really need to continue.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.