auto-sklearn¶
auto-sklearn 是一个自动化机器学习工具包,可直接替代 scikit-learn 估计器。
import autosklearn.classification
cls = autosklearn.classification.AutoSklearnClassifier()
cls.fit(X_train, y_train)
predictions = cls.predict(X_test)
auto-sklearn 使机器学习用户摆脱了算法选择和超参数调优的困扰。它利用了贝叶斯优化、元学习和集成构建方面的最新进展。通过阅读我们发表在 NeurIPS 2015 上的论文,了解更多关于 auto-sklearn 背后的技术。
新功能:文本特征支持
Auto-sklearn 现在支持文本特征,请查看我们的新示例:文本预处理
示例¶
import autosklearn.classification
import sklearn.model_selection
import sklearn.datasets
import sklearn.metrics
if __name__ == "__main__":
X, y = sklearn.datasets.load_digits(return_X_y=True)
X_train, X_test, y_train, y_test = \
sklearn.model_selection.train_test_split(X, y, random_state=1)
automl = autosklearn.classification.AutoSklearnClassifier()
automl.fit(X_train, y_train)
y_hat = automl.predict(X_test)
print("Accuracy score", sklearn.metrics.accuracy_score(y_test, y_hat))
这将运行一小时,并且准确率应达到 0.98 以上。
补充材料¶
我们在此提供讲座和教程的幻灯片和笔记本:auto-sklearn-talks
许可证¶
auto-sklearn 的许可方式与 scikit-learn 相同,即 3 条款 BSD 许可证。
引用 auto-sklearn¶
如果您在学术出版物中使用 auto-sklearn,我们非常感谢您引用以下论文:
高效且鲁棒的自动化机器学习, Feurer 等人, Advances in Neural Information Processing Systems 28 (NIPS 2015)。
Bibtex 条目
@inproceedings{feurer-neurips15a, title = {Efficient and Robust Automated Machine Learning}, author = {Feurer, Matthias and Klein, Aaron and Eggensperger, Katharina and Springenberg, Jost and Blum, Manuel and Hutter, Frank}, booktitle = {Advances in Neural Information Processing Systems 28 (2015)}, pages = {2962--2970}, year = {2015} }
如果您使用 Auto-sklearn 2.0,也请引用:
Auto-Sklearn 2.0:通过元学习实现无需人工干预的 AutoML, Feurer 等人, (arXiv, 2020)。
Bibtex 条目
@article{feurer-arxiv20a, title = {Auto-Sklearn 2.0: Hands-free AutoML via Meta-Learning}, author = {Feurer, Matthias and Eggensperger, Katharina and Falkner, Stefan and Lindauer, Marius and Hutter, Frank}, journal = {arXiv:2007.04074 [cs.LG]}, year = {2020}, }
贡献¶
我们感谢对 auto-sklearn 的所有贡献,无论是错误报告、文档还是新功能。如果您想为代码做出贡献,可以从问题跟踪器中选择一个议题。
如果您想了解更多信息,请查看我们的GitHub 贡献指南!我们为新手和经验丰富的贡献者都提供了指导。
注意
为避免重复工作或开发不太可能合并的功能,强烈建议您在开始工作之前,通过提交GitHub 议题与开发者联系。