机器学习流程
文章來源:
https://blog.csdn.net/han_xiaoyang/article/details/50469334
https://blog.csdn.net/han_xiaoyang/article/details/52910022
1. 常用算法
(from 七月在線-kaggle競賽視頻)。
2. 流程
3. 知識點(diǎn)
1. 樣本不均衡時,如正負(fù)樣本10:100,解決辦法。
(樣本不均衡的壞處,如1:100,把數(shù)據(jù)都判斷為負(fù)類,在訓(xùn)練時數(shù)據(jù)誤差很低,但是預(yù)測時很不準(zhǔn)確)
1)將正樣本上采樣(正樣本重復(fù)若干次)
2)損失函數(shù)(加大正樣本的loss)
3)把負(fù)樣本分成10分,分別與正樣本去訓(xùn)練。如bagging去投票
2. 工具
pandas:數(shù)據(jù)量大的時候,一個特征維度的去做。
hive sql / spark sql
3. 缺省
缺省很小:填充
缺省很大:舍去
缺省適中:把缺省當(dāng)作一個特征
4. 數(shù)據(jù)域
當(dāng)前數(shù)據(jù)域分布沒有規(guī)律,可以變換到log域、指數(shù)域----可能數(shù)據(jù)會呈現(xiàn)一定的規(guī)律
時間類數(shù)據(jù):間隔、與其他特征組合、離散型、時間段
文本型數(shù)據(jù):n-gram、bag of words、TF-IDF、wordvec
統(tǒng)計型特征:min、max、中位數(shù)
5. 主要用的兩個模塊(sklearn)?https://scikit-learn.org/stable/index.html
preprocessing 以及 feature_extraction
https://scikit-learn.org/stable/modules/preprocessing.html
https://scikit-learn.org/stable/modules/classes.html#module-sklearn.feature%20extraction
6. 模型融合
blending
bagging
?
stacking
使用不同的分類器,產(chǎn)生不同的分類結(jié)果。將這些結(jié)果作為輸入,
如果使用這些結(jié)果的的linear取加權(quán)平均。就是blending方法。(沒有再sklearn中封裝)
boosting
Adaboost: 調(diào)樣本的權(quán)重
xgboost / lightgbm
7. 繪制學(xué)習(xí)曲線(模型狀態(tài)評估)
https://www.zybuluo.com/hanxiaoyang/note/545131
8. xgboost的調(diào)參?
?https://github.com/dmlc/xgboost? 有一些xgboost的demo
9. 可視化
http://seaborn.pydata.org/
https://scikit-learn.org/stable/auto_examples/manifold/plot_lle_digits.html#example-manifold-plot-lle-digits-py
?
轉(zhuǎn)載于:https://www.cnblogs.com/GuoXinxin/p/10686887.html
總結(jié)
- 上一篇: 标注2.0:数据标注员如何进行从业选择?
- 下一篇: UAP环境搭建