njs03332 / ml_study

3 stars 0 forks source link

2022/03/11 - 2022/03/15 #22

Open danbi5228 opened 2 years ago

danbi5228 commented 2 years ago

3/16 pm9:00 3/17 pm10:00 image

givitallugot commented 2 years ago

연습문제 1번

연습문제 2번

연습문제 3번

def indices_of_top_k(arr, k): return np.sort(np.argpartition(np.array(arr), -k)[-k:])

class TopFeatureSelector(BaseEstimator, TransformerMixin): def init(self, feature_importances, k): self.feature_importances = feature_importances self.k = k def fit(self, X, y=None): self.featureindices = indices_of_top_k(self.feature_importances, self.k) return self def transform(self, X): return X[:, self.featureindices]


### 연습문제 4번
- 전체 데이터 준비 과정과 예측을 하나의 파이프라인으로
```python
prepare_select_and_predict_pipeline = Pipeline([
    ('preparation', full_pipeline),
    ('feature_selection', TopFeatureSelector(feature_importances, k)),
    ('svm_reg', SVR(**rnd_search.best_params_))
])

prepare_select_and_predict_pipeline.fit(housing, housing_labels)
njs03332 commented 2 years ago

2.5 머신러닝 알고리즘을 위한 데이터 준비

사이킷런의 설계 철학

2.5.3 나만의 변환기

2.5.4 특성 스케일링 (feature scaling)

2.5.5 변환 파이프라인

2.7 모델 세부 튜닝

2.7.1 그리드 탐색

2.7.2 랜덤 탐색

2.7.3 앙상블 방법

2.7.4 최상의 모델과 오차 분석

2.7.5 테스트 세트로 시스템 평가하기

danbi5228 commented 2 years ago

2.8 론칭, 모니터링, 시스템 유지 보수