Python 如何保存TPOTClassifier以在安装后继续安装?

Python 如何保存TPOTClassifier以在安装后继续安装?,python,classification,genetic-programming,tpot,Python,Classification,Genetic Programming,Tpot,我正在安装TPOTClassifier,目前需要相当长的时间。是否有可能存储所有“总体”以及加载后继续培训所需的所有设置?我在中读到的内容只允许使用export方法存储最佳的“进化”管道: tpot = TPOTClassifier(generations=5, population_size=50, verbosity=2) tpot.fit(X_train, y_train) print(tpot.score(X_test, y_test)) tpot.export('tpot_best_p

我正在安装
TPOTClassifier
,目前需要相当长的时间。是否有可能存储所有“总体”以及加载后继续培训所需的所有设置?我在中读到的内容只允许使用
export
方法存储最佳的“进化”管道:

tpot = TPOTClassifier(generations=5, population_size=50, verbosity=2)
tpot.fit(X_train, y_train)
print(tpot.score(X_test, y_test))
tpot.export('tpot_best_pipeline.py') # export the best pipeline among the population

同样,我可以通过在
TPOTClassifier
构造函数中传递
generations
参数来限制生成的次数,但是如何持久化分类器?

您是否尝试过pickle TPOTClassifier实例?特别是当与
warm_start
功能结合使用时,您应该能够中途暂停运行,对其进行pickle处理,然后通过pickle将其加载回,并从您停止的地方重新开始。