iuri / regressionml

Regression algorithms with machine learning
GNU General Public License v3.0
0 stars 0 forks source link

TypeError: unhashable type: 'numpy.ndarray' #1

Open iuri opened 1 year ago

iuri commented 1 year ago

Replacing Salary dataframe by currency dataframe, it returns the folllwing error


TypeError Traceback (most recent call last) in 2 3 plt.figure() ----> 4 plt.scatter(X_train, y_train, color='blue', label="True Value") 5 plt.plot(X_train, y_train_pred, color='black', linewidth=2, label="Prediction") 6 plt.xlabel("Years of Experiences")

9 frames /usr/local/lib/python3.8/dist-packages/matplotlib/category.py in update(self, data) 208 # check if convertible to number: 209 convertible = True --> 210 for val in OrderedDict.fromkeys(data): 211 # OrderedDict just iterates over unique values in data. 212 cbook._check_isinstance((str, bytes), value=val)

TypeError: unhashable type: 'numpy.ndarray'

Screen Shot 2023-02-02 at 10 33 54 PM

iuri commented 1 year ago

To access the Colab notebook, visit the link https://colab.research.google.com/drive/1auNrUeY6cZLaYBKnP0LW9z5WZ0AjqB-e#scrollTo=Pj9Cd-xeFji3