目录
利用布鲁塞尔的creditcard数据集进行采样处理(欠采样{Nearmiss/Kmeans/TomekLinks/ENN}、过采样{SMOTE/ADASYN})同时采用LoR算法(PR和ROC评估)进行是否欺诈二分类
设计思路
输出结果
实现代码
更新……
1. F:\Program Files\Python\Python36\lib\site-packages\matplotlib\axes\_axes.py:6462: UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg. 2. warnings.warn("The 'normed' kwarg is deprecated, and has been " 3. 0 284315 4. 1 492 5. Name: Class, dtype: int64 6. Default 方法 7. Undersampling RandomUnderSampler 方法 8. F:\Program Files\Python\Python36\lib\site-packages\imblearn\under_sampling\_prototype_selection\_nearmiss.py:178: UserWarning: The number of the samples to be selected is larger than the number of samples available. The balancing ratio cannot be ensure and all samples will be returned. 9. "The number of the samples to be selected is larger" 10. Undersampling NearMissV1 方法 11. F:\Program Files\Python\Python36\lib\site-packages\sklearn\svm\_base.py:977: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations. 12. "the number of iterations.", ConvergenceWarning) 13. Undersampling NearMissV2 方法 14. Undersampling NearMissV3 方法 15. Undersampling ClusterCentroids 方法 16. Undersampling TomekLinks 方法 17. Undersampling EditedNearestNeighbours 方法 18. 数据清洗后大类样本数量 19. Original: 227451 20. After Tomek Link: 227429 21. After ENN: 227326 22. Oversampling RandomOverSampler 方法 23. Oversampling SMOTE 方法 24. Oversampling ADASYN 方法