250x250
Link
๋์ GitHub Contribution ๊ทธ๋ํ
Loading data ...
Notice
Recent Posts
Recent Comments
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- dataframe
- LDA
- numpy
- ๋ฐ์ดํฐ๋ถ์
- ๋น ๋ฐ์ดํฐ๋ถ์๊ธฐ์ฌ
- ํ ์คํธ๋ถ์
- ์ฃผ์ฑ๋ถ๋ถ์
- PCA
- DBSCAN
- ์ค๋ฒ์ํ๋ง
- t-test
- ADP
- ๊ตฐ์งํ
- pandas
- ํฌ๋กค๋ง
- Python
- datascience
- opencv
- Lambda
- ๋ฐ์ดํฐ๋ถ์์ค์ ๋ฌธ๊ฐ
- iloc
- ADsP
- ๋น ๋ฐ์ดํฐ
- ํ์ด์ฌ
- ๋ฐ์ดํฐ๋ถ์์ ๋ฌธ๊ฐ
- ์๋ํด๋ผ์ฐ๋
- ๋ ๋ฆฝํ๋ณธ
- ๋์ํ๋ณธ
- ๋ฐ์ดํฐ๋ถ๊ท ํ
- ์ธ๋์ํ๋ง
Archives
Data Science LAB
[Python Error] AttributeError: 'SMOTE' object has no attribute 'fit_sample' ๋ณธ๋ฌธ
๐ Python/Python Error
[Python Error] AttributeError: 'SMOTE' object has no attribute 'fit_sample'
ใ ใ ใ ใ 2022. 3. 24. 16:42728x90
Error
์ฃผํผํฐ ๋ ธํธ๋ถ์์ SMOTE.fit_sample()๋ฅผ ์ด์ฉํด OverSampling ๋ฐ์ดํฐ ์์ฑ ์ค ๋ค์๊ณผ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ์๋ค.
AttributeError: 'SMOTE' object has no attribute 'fit_sample'
ํด๊ฒฐ ๋ฐฉ๋ฒ
๋ชจ๋์ ๋ถ๋ฌ์ฌ ๋, ๋ค์์ ์ฝ๋๋ฅผ ์ฌ์ฉํ๋ค๋ฉด
from imblearn.over_sampling import SMOTE
X_train_over, y_train_over = smote.fit_resample(X_train, y_train)
fit_resample()ํจ์๋ฅผ ์ฌ์ฉํ๋ฉด ํด๊ฒฐ๋๋ค.
728x90
'๐ Python > Python Error' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Comments