Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 아주 작은 습관의 힘
- 진심
- 완결 웹툰
- 빅데이터 분석기사
- 웹툰
- 습관
- 네이버 웹툰
- 이범선
- QGIS
- 애니메이션
- 커피
- 제임스 클리어
- 서귀포
- 가족
- 영화
- geopandas
- 제주도
- 빅데이터 분석기사 필기
- 만화 영화
- 넷플릭스
- 로맨스
- 네이버
- 액션
- 이기적 출판사
- 네이버 완결 웹툰
- 산책
- pandas
- 완결
- python
- 사랑
Archives
- Today
- Total
JuJuKwakKwak
Python) 학습과 테스트 나눌 때 본문
from sklearn.model_selection import train_test_split
x = liver[liver.columns.difference(['Dataset'])]
y = liver['Dataset']
train_x, test_x, train_y, test_y = train_test_split(x, y, stratify=y, train_size=0.7, random_state=1)
print(train_x.shape, test_x.shape, train_y.shape, test_y.shape)
'Data Science > 코드 관련 모음' 카테고리의 다른 글
python) 시간대별 명사 추출하고 개수 세기 (0) | 2022.08.22 |
---|---|
python) 특정 유형만 추출하기 (0) | 2022.08.22 |
Python) 빈 데이터프레임에 반복해서 채워넣기 (0) | 2022.08.04 |
jupyter notebook 글씨 예쁘게 바꾸기 (0) | 2022.07.29 |
데이터 전처리 (0) | 2022.07.27 |