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 | 31 |
Tags
- 정제
- 아나콘다
- 전처리
- concat
- 오류
- 이전날짜제거
- vlookup
- 에러
- 외부접속허용
- putty
- 맵차트
- 파이썬
- Tableau
- 살려줘
- mysql
- split
- SQL
- 함수
- Join
- safe mode 해제
- 태블로
- 북마크
- D2E8DA72
- Def
- Delete
- TabPy
- 데이터전처리
- trim
- 태블로퍼블릭
- random.uniform
Archives
- Today
- Total
무던히 하다보면 느는
[파이썬/Python] 파이프라인(2) 본문
from sklearn.model_selection import GridSearchCV
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC
pipe_svc = Pipeline([('scl', StandardScaler()), ('clf', SVC(random_state=1))])
param_range = [0.03,0.05,10]
param_grid = [
{'clf__C': param_range, 'clf__kernel': ['linear']},
{'clf__C': param_range, 'clf__gamma': param_range, 'clf__kernel': ['rbf']}]
gs = GridSearchCV(estimator=pipe_svc, param_grid=param_grid,
scoring='accuracy', cv=10, n_jobs=1)
%time gs = gs.fit(X_train, y_train)
앞 파이프라인과 비교하여 커널이 linear와 rbf, 민맥스에서 스탠다드로 cv도 10으로 .,
CPU times: user 10min 4s, sys: 2.43 s, total: 10min 7s Wall time: 10min 5s
모형 최적화 — 데이터 사이언스 스쿨
.ipynb .pdf to have style consistency -->
datascienceschool.net
'파이썬' 카테고리의 다른 글
[파이썬/Python] (0) | 2022.07.12 |
---|---|
[파이썬/Python] (0) | 2022.07.12 |
[파이썬/Python] 파이프라인 (0) | 2022.07.12 |
[파이썬/Python] 리샘플링 (Resampling) (0) | 2022.07.10 |
[파이썬/Python] numpy array와 list 차이점 (0) | 2022.07.10 |