TPOT(1)
โจ NAME โจ
tpot โ the Automated Machine Learning tool, bestie ๐
๐ DESCRIPTION ๐
okay so first things first, here's the vibe of how you actually call this thing:
usage: tpot [-h] [-is INPUT_SEPARATOR] [-target TARGET_NAME]
[-mode {classification,regression}] [-o OUTPUT_FILE] [-g
GENERATIONS] [-p POPULATION_SIZE] [-os OFFSPRING_SIZE] [-mr
MUTATION_RATE] [-xr CROSSOVER_RATE] [-scoring SCORING_FN] [-cv
NUM_CV_FOLDS] [-sub SUBSAMPLE] [-njobs NUM_JOBS] [-maxtime
MAX_TIME_MINS] [-maxeval MAX_EVAL_MINS] [-s RANDOM_STATE]
[-config CONFIG_FILE] [-template TEMPLATE] [-memory MEMORY] [-cf
CHECKPOINT_FOLDER] [-es EARLY_STOP] [-v {0,1,2,3}] [-log LOG]
[--version] INPUT_FILE
so tpot is a Python tool that automatically creates and optimizes machine learning pipelines using genetic programming. it's giving "let the algorithm do your homework" and honestly? iconic. ๐งฌโจ
๐ซถ positional arguments
INPUT_FILEโ the data file you're running through the TPOT optimization process. heads up: make sure the class label column is labeled as"class". no cap, that one trips people up.
๐ optional arguments
-h,--helpโ show this help message and dip. โ๏ธ-is INPUT_SEPARATORโ the character used to separate columns in the input file.-target TARGET_NAMEโ the name of the target column in the input file.-mode {classification,regression}โ whether TPOT is being used for a supervised classification or regression problem.-o OUTPUT_FILEโ the file you want the code for the final optimized pipeline exported to. ๐-g GENERATIONSโ number of iterations to run the pipeline optimization process. it must be a positive number orNone. if it'sNone, then the parametermax_time_minsmust be defined as the runtime limit. generally, TPOT works better when you give it more generations (and therefore more time) to optimize the pipeline. for the math girlies: TPOT will evaluatePOPULATION_SIZE + GENERATIONS x OFFSPRING_SIZEpipelines in total. ๐ฏ-p POPULATION_SIZEโ number of individuals to retain in the GP population every generation. generally, TPOT works better when you give it more individuals (and therefore more time) to optimize the pipeline. same formula as above, she's consistent: TPOT will evaluatePOPULATION_SIZE + GENERATIONS x OFFSPRING_SIZEpipelines in total.-os OFFSPRING_SIZEโ number of offspring to produce in each GP generation. by default,OFFSPRING_SIZE = POPULATION_SIZE. ๐ฃ-mr MUTATION_RATEโ GP mutation rate in the range[0.0, 1.0]. this tells the GP algorithm how many pipelines to apply random changes to every generation. we recommend using the default parameter unless you genuinely understand how the mutation rate affects GP algorithms. like, respectfully, don't freestyle this one.-xr CROSSOVER_RATEโ GP crossover rate in the range[0.0, 1.0]. this tells the GP algorithm how many pipelines to "breed" every generation. again: we recommend using the default parameter unless you actually understand how the crossover rate affects GP algorithms. ๐-scoring SCORING_FNโ the function used to evaluate the quality of a given pipeline for the problem. by default, accuracy is used for classification problems and mean squared error (mse) is used for regression problems. note: if you wrote your own function, set this argument tomymodule.myfunctionand TPOT will import your module and take the function from there. TPOT will assume the module can be imported from the current workdir. TPOT also assumes that any function with"error"or"loss"in the name is meant to be minimized, whereas any other functions will be maximized. offers the same options ascross_val_score:accuracy,adjusted_rand_score,average_precision,f1,f1_macro,f1_micro,f1_samples,f1_weighted,neg_log_loss,neg_mean_absolute_error,neg_mean_squared_error,neg_median_absolute_error,precision,precision_macro,precision_micro,precision_samples,precision_weighted,r2,recall,recall_macro,recall_micro,recall_samples,recall_weighted,roc_auc. yes that's the whole list, we don't gatekeep. ๐-cv NUM_CV_FOLDSโ number of folds to evaluate each pipeline over in stratified k-fold cross-validation during the TPOT optimization process.-sub SUBSAMPLEโ subsample ratio of the training instance. setting it to0.5means TPOT will use a random subsample of half of the training data for the pipeline optimization process.-njobs NUM_JOBSโ number of CPUs for evaluating pipelines in parallel during the TPOT optimization process. assign it to-1and it'll use as many cores as available on the computer. forn_jobsbelow-1,(n_cpus + 1 + n_jobs)are used. so forn_jobs = -2, all CPUs but one are used. parallel queen energy. โก-maxtime MAX_TIME_MINSโ how many minutes TPOT has to optimize the pipeline. if notNone, this setting lets TPOT run untilmax_time_minsminutes have elapsed and then stop. TPOT will stop earlier ifgenerationsis set and all generations are already evaluated. โฐ-maxeval MAX_EVAL_MINSโ how many minutes TPOT has to evaluate a single pipeline. setting this parameter to higher values will let TPOT explore more complex pipelines, but it will also let TPOT run longer. tradeoffs, babe.-s RANDOM_STATEโ random number generator seed for reproducibility. set this seed if you want your TPOT run to be reproducible with the same seed and data set in the future. future you says thank you. ๐ซถ-config CONFIG_FILEโ configuration file for customizing the operators and parameters that TPOT uses in the optimization process. must be a Python module containing a dict export named"tpot_config"or the name of a built-in configuration.-template TEMPLATEโ template of predefined pipeline structure. this option is for specifying a desired structure for the machine learning pipeline evaluated in TPOT. so far this option only supports linear pipeline structure. each step in the pipeline should be a main class of operators (Selector,Transformer,ClassifierorRegressor) or a specific operator (e.g.SelectPercentile) defined in the TPOT operator configuration. if one step is a main class, TPOT will randomly assign all subclass operators (subclasses ofSelectorMixin,TransformerMixin,ClassifierMixinorRegressorMixinin scikit-learn) to that step. steps in the template are delimited by"-", e.g."SelectPercentile-Transformer-Classifier". by default the value of template isNone, and TPOT generates a tree-based pipeline randomly. ๐ณ-memory MEMORYโ path of a directory for pipeline caching, or"auto"for using a temporary caching directory during the optimization process. if supplied, pipelines will cache each transformer after fitting them. this feature is used to avoid repeated computation by transformers within a pipeline if the parameters and input data are identical with another fitted pipeline during the optimization process. she remembers so you don't have to. ๐ง-cf CHECKPOINT_FOLDERโ if supplied, a folder in which tpot will periodically save the best pipeline so far while optimizing. this is useful in multiple cases: sudden death before tpot could save an optimized pipeline, progress tracking, grabbing a pipeline while it's still optimizing, etc. basically a save point. ๐ฎ-es EARLY_STOPโ how many generations TPOT checks whether there is no improvement in the optimization process. ends the optimization process if there is no improvement in the set number of generations. if she's not growing, she's going. ๐-v {0,1,2,3}โ how much information TPOT communicates while it's running:0= none,1= minimal,2= high,3= all. a setting of2or higher will add a progress bar during the optimization procedure. ๐-log LOGโ save progress content to a file.--versionโ show the TPOT version number and exit.
fr fr reminder: every flag above does exactly what it says and nothing more. don't invent extra behaviour for them, bestie, the manual said what it said. ๐
and that's the whole page, mwah. this was tpot version 0.11.7+dfsg, dated January 2021, page TPOT(1) of the User Commands manual โ thanks for reading to the end, you ate that. ๐โจ๐๐ฆ
๐ฆ where this page comes from
- ubuntu jammy: python3-tpot 0.11.7+dfsg-1 ยท LGPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms