Data Analyticsㅤ/ㅤMachine Learningㅤ

파이프라인 (make_pipeline)

Pipeline

- 우리가 해야하는 task들을 지정하여 차례대로 수행한다

- (Eg) scaling 하고 모델 학습 하기

 

from sklearn.pipeline import make_pipeline

# 새로운 변수로 넣어주기
elasticnet_pipeline = make_pipeline(
    StandardScaler(), # Task 1: 스케일링
    ElasticNet(alpha=0.1, l1_ratio=0.2) # Task 2: 모델학습
)