sk才是大成者,深度学习中 还能屹立不倒
Published on Aug. 22, 2023, 12:08 p.m.
sk才是大成者,深度学习中 还能屹立不倒
https://colab.research.google.com/drive/1_Z-tAmypFr9grcjjLpbCS4MV14J4qtwm?usp=sharing
sklearn #保存模型
What you are looking for is called Model persistence in sklearn words and it is documented in introduction and in model persistence sections.
So you have initialized your classifier and trained it for a long time with
clf = some.classifier()
clf.fit(X, y)
After this you have two options:
1) Using Pickle
import pickle
<h1>now you can save it to a file</h1>
with open('filename.pkl', 'wb') as f:
pickle.dump(clf, f)
<h1>and later you can load it</h1>
with open('filename.pkl', 'rb') as f:
clf = pickle.load(f)
<p><strong>2) Using Joblib</strong>
/usr/local/lib/python3.7/dist-packages/sklearn/externals/joblib/init.py:15: FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+. warnings.warn(msg, category=FutureWarning)</p>
<p>还是pickle吧,那个更加通用,无恼用就可以。
from sklearn.externals import joblib</p>
<h1>now you can save it to a file</h1>
joblib.dump(clf, 'filename.pkl')
<h1>and later you can load it</h1>
clf = joblib.load('filename.pkl')
https://stackoverflow.com/questions/10592605/save-classifier-to-disk-in-scikit-learn
scikit-learn自带的参数优化
https://scikit-learn.org/stable/modules/grid_search.html
* Machine-learning
================
机器学习怎么能不关注呢?
https://github.com/topics/machine-learning
* auto-sklearn
============
auto-sklearn¶
auto-sklearn is an automated machine learning toolkit and a drop-in replacement for a scikit-learn estimator:
https://automl.github.io/auto-sklearn/master/
《 #动手学深度学习 》:面向中文读者、能运行、可讨论。中英文版被全球175所大学采用教学。
MXNet 框架
亚马逊团队搞得
https://github.com/d2l-ai/d2l-zh
+ - NLP各种示例最新实现方案合集
用于跟踪自然语言处理 (NLP) 进展的存储库,包括数据集和最常见 NLP 任务的当前最新技术。
nlpprogress.com/
https://github.com/sebastianruder/NLP-progress