Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
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
Archives
Today
Total
관리 메뉴

파이썬 하는 파이리

Auto ML 본문

프로그래밍/머신러닝, 딥러닝

Auto ML

gunnwu 2023. 5. 29. 23:09

Auto ML copysheet / 개념은 추후 정리해서 업로드 예정

! pip install tpot

import pandas as pd
from tpot import TPOTClassifier
from sklearn.model_selection import train_test_split

# load and prepare the data
## 학습데이터와 검증데이터는 모두 준비가 되었다고 가정
# train and test the model using TPOT


tpot = TPOTClassifier(generations=5, population_size=20, verbosity=2)
tpot.fit(s_x_train, s_y_train)
score = tpot.score(x_test, y_test)
print('Accuracy:', score)

# evaluate the model performance
predictions = tpot.predict(x_test)
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score
print('Accuracy:', accuracy_score(y_test, predictions))
print('Precision:', precision_score(y_test, predictions))
print('Recall:', recall_score(y_test, predictions))
print('F1 Score:', f1_score(y_test, predictions))

'프로그래밍 > 머신러닝, 딥러닝' 카테고리의 다른 글

Random Search_  (0) 2023.05.29
ML정리본  (0) 2023.05.29
CNN  (0) 2023.04.15
Comments