chihyun49252795
@chihyun49252795
Reviews Written
-
Average Rating
-
The introduction is empty
Posts
Q&A
Concat ์ฌ์ฉ ๊ธฐ์ค
ํน์ for col in cols: le = LabelEncoder()train[col] = le.fit_transform(train[col])test[col] = le.transform(test[col])ํ๊ฒ ๋๋ฉด train์ผ๋ก ํ์ตํ๊ณ ๋ผ๋ฒจ์ธ์ฝ๋ฉ ํ๊ฑธ test์ ์ง์ด๋ฃ์ผ๋๊น ๊ตณ์ด concatํด์ ํตํฉ ์ธ์ฝ๋ฉ ํ๋ ๊ฒ๊ณผ ๊ฐ์ด ๊ด์ฐฎ์๊ฑฐ ์๋๊ฐํด์์..
- 0
- 3
- 115
Q&A
Encoders require their input argument must be uniformly strings or numbers. Got ['int', 'str'] ๋ผ๋ ์ค๋ฅ๊ฐ ๋ด์ต๋๋ค.
print(cols)๋class 'list'> Index(['workclass', 'education', 'marital.status', 'occupation', 'relationship', 'race', 'sex', 'native.country'], dtype='object')์ด๋ ๊ฒ ๋์๊ตฌ์. X_train.head()๋ ์๋์ ๊ฐ์ต๋๋ค..(์ฌ์ง)
- 0
- 3
- 137




