How to convert this onehotencoder so it can run on scikitlearn 0.22.1 import numpy as np import
Fantastic news! We've Found the answer you've been seeking!
Question:
How to convert this onehotencoder so it can run on scikitlearn 0.22.1
import numpy as np
import pandas as pd
from sklearn.metrics import confusion_matrix, accuracy_score
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_absolute_error
from sklearn.metrics import r2_score
dataset = pd.read_csv(‘heart.csv’)
X = dataset.iloc[:,:-1].values
y = dataset.iloc[:,-1].values
because the new version of sklearn onehotencoder doesnt have categorical_features attribute please help
Related Book For
Posted Date: