728x90
반응형
"Machine learning with AutoGluon,
an open source AutoML library"
파이토치에서 자연어 처리를 공부하면 Auto Model로 모델을 찾는 경우가 많습니다.
예측 모델의 경우 어떻게 하는지 몰라서 모델 여러개를 생성한다음 best_model을 선택하는 방향으로 모델을 선택했는데 AutoGluon을 통해 다양한 모델을 알았고 자동으로 찾아주는 것을 알았습니다.
그럼 바로 사용법을 알아보겠습니다!
- 설치 단계
- 라이브러리 호출
- 사용
train_data = TabularDataset("https://autogluon.s3.amazonaws.com/datasets/Inc/train.csv")
hyperparameters = {
'GBM': [
{'ag_args_fit': {'num_gpus': 0}}, # Train with CPU
{'ag_args_fit': {'num_gpus': 1}} # Train with GPU 설치가 안된 것들은 GPU에서 돌릴 수 없음
]
}
predictor = TabularPredictor(label="class").fit(train_data,hyperparameters=hyperparameters)
test_data = TabularDataset("https://autogluon.s3.amazonaws.com/datasets/Inc/test.csv")
y_pred = predictor.predict(test_data)
test_acc = predictor.evaluate(test_data) # valid_score
공식문서
https://auto.gluon.ai/scoredebugweight/api/autogluon.task.html
AutoGluon Predictors — AutoGluon Documentation 0.1.1 documentation
auto.gluon.ai
728x90
반응형
'머신러닝' 카테고리의 다른 글
[ML_Basic] Naive Bayes Classifier (0) | 2023.01.04 |
---|---|
[ML_Basic] Decision Boundary (0) | 2023.01.01 |
[ML_Basic] Decision Tree (의사 결정 나무) (0) | 2023.01.01 |
[ML_Basic] Rule_based machine learning (규칙 기반 기계학습) (0) | 2022.12.31 |
[ML_Basic] 베이지안 확률론 (0) | 2022.12.30 |
댓글