不均衡なデータセットのバランスをとるために、imblearn over_sampling SMOTE 手法を使用しています。
ここに私のサンプルコードがあります
import pandas as pd
dataset=pd.read_csv('E://IOT_Netlume//hourly_data.csv')
features= dataset.iloc[:,[1,2,3,4]]
target= dataset.iloc[:,[5]]
from imblearn.over_sampling import SMOTE
# applying SMOTE to our data and checking the class counts
resampled, yresampled = SMOTE(random_state=42).fit_resample(features, target)
そのため、SMOTE モデルに適合させようとすると、属性エラーが表示されます。AttributeError: 'DataFrame' object has no attribute 'name' .この問題に関して誰か助けてくれますか?
また、ライブラリをpipでインストールしました
Windows-10-10.0.15063-SP0 Python 3.6.5 |Anaconda, Inc.| (デフォルト、2018 年 3 月 29 日 13:32:41) [MSC v.1900 64 ビット (AMD64)] NumPy 1.17.4 SciPy 1.3.2 Scikit-Learn 0.22 上記がインストールされているバージョンです。