일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ML
- 딥러닝
- 이코테
- pytorch
- SQL
- Deep Learning Specialization
- 데이터 분석
- IRIS
- ADsP
- 코딩테스트
- 데이터분석준전문가
- 태블로
- 데이터분석
- 파이썬
- 데이터 전처리
- 이것이 코딩테스트다
- 자격증
- r
- Google ML Bootcamp
- 시각화
- pandas
- 회귀분석
- scikit learn
- 머신러닝
- Python
- tableau
- sklearn
- 통계
- matplotlib
- SQLD
- Today
- Total
목록사이킷런 (2)
함께하는 데이터 분석
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/cIlez2/btrKQShL6hQ/EyiqTLGcGd7k9kTXEnMMKk/img.png)
주성분 분석(Principal Component Analysis) 차원을 축소하는 알고리즘 중 가장 인기 있는 알고리즘 사이킷런 import numpy as np np.random.seed(4) m = 60 w1, w2 = 0.1, 0.3 noise = 0.1 angles = np.random.rand(m) * 3 * np.pi / 2 - 0.5 X = np.empty((m, 3)) X[:, 0] = np.cos(angles) + np.sin(angles)/2 + noise * np.random.randn(m) / 2 X[:, 1] = np.sin(angles) * 0.7 + noise * np.random.randn(m) / 2 X[:, 2] = X[:, 0] * w1 + X[:, 1] * w2 + n..
![](http://i1.daumcdn.net/thumb/C150x150.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/CULgR/btrKIreHnRy/po9PjTIMktunEwaIcMmMp0/img.png)
랜덤 포레스트(Random Forest) 배깅 방식을 적용한 의사결정 나무(Decision Tree)의 앙상블 따라서 사이킷런의 BaggingClassifier에 DecisionTreeClassifier를 넣어 만들거나 RandomForestClassifier를 사용 사이킷런 from sklearn.model_selection import train_test_split from sklearn.datasets import make_moons X, y = make_moons(n_samples=500, noise=0.3, random_state=42) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=42) 사이킷런의 moons 데이..