마스터 상태:
개발 상태:
패키지 정보:
TPOT2( 알파 )를 사용해 보려면 여기로 이동하세요!
TPOT는 트리 기반 파이프 라인 최적화 도구 를 나타냅니다. 데이터 과학 보조원 TPOT를 고려하십시오. TPOT은 유전자 프로그래밍을 사용하여 기계 학습 파이프라인을 최적화하는 Python 자동화 기계 학습 도구입니다.
TPOT은 수천 개의 가능한 파이프라인을 지능적으로 탐색하여 데이터에 가장 적합한 파이프라인을 찾아 기계 학습의 가장 지루한 부분을 자동화합니다.
머신러닝 파이프라인 예시
TPOT가 검색을 마치면(또는 기다리기에 지치면) 찾은 최상의 파이프라인에 대한 Python 코드를 제공하므로 거기에서 파이프라인을 조작할 수 있습니다.
TPOT은 scikit-learn을 기반으로 구축되었으므로 생성되는 모든 코드는 친숙해 보일 것입니다. 어쨌든 scikit-learn에 익숙하다면 말이죠.
TPOT은 아직 활발하게 개발 중이므로 정기적으로 이 저장소에서 업데이트를 확인하는 것이 좋습니다.
TPOT에 대한 자세한 내용은 프로젝트 설명서를 참조하세요.
TPOT의 라이선스 및 사용 정보는 저장소 라이선스를 참조하세요.
일반적으로 우리는 TPOT를 최대한 널리 사용할 수 있도록 라이센스를 부여했습니다.
우리는 문서에서 TPOT 설치 지침을 유지합니다. TPOT을 사용하려면 Python이 제대로 설치되어 있어야 합니다.
TPOT은 명령줄이나 Python 코드에서 사용할 수 있습니다.
설명서에서 TPOT 사용에 대한 자세한 내용을 보려면 해당 링크를 클릭하세요.
다음은 손으로 쓴 숫자 데이터 세트를 광학적으로 인식하는 최소한의 작업 예입니다.
from tpot import TPOTClassifier
from sklearn . datasets import load_digits
from sklearn . model_selection import train_test_split
digits = load_digits ()
X_train , X_test , y_train , y_test = train_test_split ( digits . data , digits . target ,
train_size = 0.75 , test_size = 0.25 , random_state = 42 )
tpot = TPOTClassifier ( generations = 5 , population_size = 50 , verbosity = 2 , random_state = 42 )
tpot . fit ( X_train , y_train )
print ( tpot . score ( X_test , y_test ))
tpot . export ( 'tpot_digits_pipeline.py' )
이 코드를 실행하면 약 98%의 테스트 정확도를 달성하는 파이프라인을 발견해야 하며, 해당 Python 코드를 tpot_digits_pipeline.py
파일로 내보내고 다음과 유사해야 합니다.
import numpy as np
import pandas as pd
from sklearn . ensemble import RandomForestClassifier
from sklearn . linear_model import LogisticRegression
from sklearn . model_selection import train_test_split
from sklearn . pipeline import make_pipeline , make_union
from sklearn . preprocessing import PolynomialFeatures
from tpot . builtins import StackingEstimator
from tpot . export_utils import set_param_recursive
# NOTE: Make sure that the outcome column is labeled 'target' in the data file
tpot_data = pd . read_csv ( 'PATH/TO/DATA/FILE' , sep = 'COLUMN_SEPARATOR' , dtype = np . float64 )
features = tpot_data . drop ( 'target' , axis = 1 )
training_features , testing_features , training_target , testing_target =
train_test_split ( features , tpot_data [ 'target' ], random_state = 42 )
# Average CV score on the training set was: 0.9799428471757372
exported_pipeline = make_pipeline (
PolynomialFeatures ( degree = 2 , include_bias = False , interaction_only = False ),
StackingEstimator ( estimator = LogisticRegression ( C = 0.1 , dual = False , penalty = "l1" )),
RandomForestClassifier ( bootstrap = True , criterion = "entropy" , max_features = 0.35000000000000003 , min_samples_leaf = 20 , min_samples_split = 19 , n_estimators = 100 )
)
# Fix random state for all the steps in exported pipeline
set_param_recursive ( exported_pipeline . steps , 'random_state' , 42 )
exported_pipeline . fit ( training_features , training_target )
results = exported_pipeline . predict ( testing_features )
마찬가지로 TPOT은 회귀 문제에 대해 파이프라인을 최적화할 수 있습니다. 다음은 보스턴 주택 가격 실습 데이터 세트를 사용한 최소한의 작업 예입니다.
from tpot import TPOTRegressor
from sklearn . datasets import load_boston
from sklearn . model_selection import train_test_split
housing = load_boston ()
X_train , X_test , y_train , y_test = train_test_split ( housing . data , housing . target ,
train_size = 0.75 , test_size = 0.25 , random_state = 42 )
tpot = TPOTRegressor ( generations = 5 , population_size = 50 , verbosity = 2 , random_state = 42 )
tpot . fit ( X_train , y_train )
print ( tpot . score ( X_test , y_test ))
tpot . export ( 'tpot_boston_pipeline.py' )
그러면 약 12.77 평균 제곱 오차(MSE)를 달성하는 파이프라인이 생성되고 tpot_boston_pipeline.py
의 Python 코드는 다음과 유사해야 합니다.
import numpy as np
import pandas as pd
from sklearn . ensemble import ExtraTreesRegressor
from sklearn . model_selection import train_test_split
from sklearn . pipeline import make_pipeline
from sklearn . preprocessing import PolynomialFeatures
from tpot . export_utils import set_param_recursive
# NOTE: Make sure that the outcome column is labeled 'target' in the data file
tpot_data = pd . read_csv ( 'PATH/TO/DATA/FILE' , sep = 'COLUMN_SEPARATOR' , dtype = np . float64 )
features = tpot_data . drop ( 'target' , axis = 1 )
training_features , testing_features , training_target , testing_target =
train_test_split ( features , tpot_data [ 'target' ], random_state = 42 )
# Average CV score on the training set was: -10.812040755234403
exported_pipeline = make_pipeline (
PolynomialFeatures ( degree = 2 , include_bias = False , interaction_only = False ),
ExtraTreesRegressor ( bootstrap = False , max_features = 0.5 , min_samples_leaf = 2 , min_samples_split = 3 , n_estimators = 100 )
)
# Fix random state for all the steps in exported pipeline
set_param_recursive ( exported_pipeline . steps , 'random_state' , 42 )
exported_pipeline . fit ( training_features , training_target )
results = exported_pipeline . predict ( testing_features )
더 많은 예제와 튜토리얼을 보려면 설명서를 확인하세요.
기존 문제에서 해결해야 할 버그나 개선 사항을 확인하시기 바랍니다. TPOT 확장에 대한 아이디어가 있는 경우 논의할 수 있도록 새 문제를 제출해 주세요.
기여를 제출하기 전에 기여 지침을 검토하시기 바랍니다.
귀하의 문제가 이미 처리되었는지 확인하려면 기존 공개 및 종료 문제를 확인하세요. 그렇지 않은 경우 이 저장소에 새 문제를 제출하면 문제를 검토할 수 있습니다.
과학 출판물에서 TPOT를 사용하는 경우 다음 논문 중 하나 이상을 인용하는 것을 고려해 보십시오.
Trang T. Le, Weixuan Fu 및 Jason H. Moore(2020). 기능 세트 선택기를 사용하여 트리 기반 자동화된 기계 학습을 생물 의학 빅 데이터로 확장합니다. 생물정보학 .36(1): 250-256.
BibTeX 항목:
@article { le2020scaling ,
title = { Scaling tree-based automated machine learning to biomedical big data with a feature set selector } ,
author = { Le, Trang T and Fu, Weixuan and Moore, Jason H } ,
journal = { Bioinformatics } ,
volume = { 36 } ,
number = { 1 } ,
pages = { 250--256 } ,
year = { 2020 } ,
publisher = { Oxford University Press }
}
Randal S. Olson, Ryan J. Urbanowicz, Peter C. Andrews, Nicole A. Lavender, La Creis Kidd 및 Jason H. Moore(2016). 트리 기반 파이프라인 최적화를 통해 생의학 데이터 과학을 자동화합니다. 진화 계산의 응용 , 123-137페이지.
BibTeX 항목:
@inbook { Olson2016EvoBio ,
author = { Olson, Randal S. and Urbanowicz, Ryan J. and Andrews, Peter C. and Lavender, Nicole A. and Kidd, La Creis and Moore, Jason H. } ,
editor = { Squillero, Giovanni and Burelli, Paolo } ,
chapter = { Automating Biomedical Data Science Through Tree-Based Pipeline Optimization } ,
title = { Applications of Evolutionary Computation: 19th European Conference, EvoApplications 2016, Porto, Portugal, March 30 -- April 1, 2016, Proceedings, Part I } ,
year = { 2016 } ,
publisher = { Springer International Publishing } ,
pages = { 123--137 } ,
isbn = { 978-3-319-31204-0 } ,
doi = { 10.1007/978-3-319-31204-0_9 } ,
url = { http://dx.doi.org/10.1007/978-3-319-31204-0_9 }
}
Randal S. Olson, Nathan Bartley, Ryan J. Urbanowicz 및 Jason H. Moore(2016). 데이터 과학 자동화를 위한 트리 기반 파이프라인 최적화 도구 평가. GECCO 2016 간행물 , 페이지 485-492.
BibTeX 항목:
@inproceedings { OlsonGECCO2016 ,
author = { Olson, Randal S. and Bartley, Nathan and Urbanowicz, Ryan J. and Moore, Jason H. } ,
title = { Evaluation of a Tree-based Pipeline Optimization Tool for Automating Data Science } ,
booktitle = { Proceedings of the Genetic and Evolutionary Computation Conference 2016 } ,
series = { GECCO '16 } ,
year = { 2016 } ,
isbn = { 978-1-4503-4206-3 } ,
location = { Denver, Colorado, USA } ,
pages = { 485--492 } ,
numpages = { 8 } ,
url = { http://doi.acm.org/10.1145/2908812.2908918 } ,
doi = { 10.1145/2908812.2908918 } ,
acmid = { 2908918 } ,
publisher = { ACM } ,
address = { New York, NY, USA } ,
}
또는 다음 DOI를 사용하여 저장소를 직접 인용할 수 있습니다.
TPOT는 보조금 R01 AI117694에 따라 NIH의 자금 지원을 받아 펜실베이니아 대학의 계산 유전학 연구소에서 개발되었습니다. 이 프로젝트를 개발하는 동안 NIH와 펜실베니아 대학교의 지원에 진심으로 감사드립니다.
TPOT 로고는 프로젝트에 자신의 시간을 아낌없이 기부한 Todd Newmuis가 디자인했습니다.