我正在尝试从编码数据中检索我参考的原始数据 How to Retrieve Original Variables After Scikit Model Run w/OneHotEncoding
credentials.getAddress()
但收到错误
ohe = OneHotEncoder(categorical_features = cat, sparse=False )
X_ohe = ohe.fit_transform(fit)
recovered_X = np.array([ohe.active_features_[col] for col in X_ohe.sorted_indices().indices]).reshape(284807, 30) - ohe.feature_indices_[:-1]
** fit有284807行和30列,而第29列为分类