[Python]机器学习库scikit-learn实践
原文地址https://blog.csdn.net/zouxy09/article/details/48903179,但里面使用Python2 写的,有些库在Python3已经不能用了,做了稍微的改变 1.Python3 没有cPickle import cPickle as pickle 改成 import pickle 2. Python3,默认的编码格式是utf-8, sys . setdefaultencoding 不存在了, 所以移除 reload(sys) sys.setdefaultencoding( ' utf8 ' ) 3. 把 train, val, test = pickle.load(f) 改成 train, val, test = pickle.load(f,encoding= ' bytes ' ) 否则会出现这样的错误 UnicodeDecodeError: ' ascii ' codec can ' t decode byte 0x90 in position 614: ordinal not in range(128) 安装 一、概述 机器学习算法在近几年大数据点燃的热火熏陶下已经变得被人所“熟知”,就算不懂得其中各算法理论,叫你喊上一两个著名算法的名字,你也能昂首挺胸脱口而出。当然了,算法之林虽大,但能者还是有限