This is the source code to go with "Machine Learning in Action" by Peter Harrington published by Manning Inc, for Python 3.X. The official page for this book can be found here: http://manning.com/pharrington/
Help is needed to convert these code examples from Python 2.X to Python 3.X. Contributors will be thanked in the second edition of the book, unless they opt out.
The source code is getting cleaned up at the same time. For example in the original code everything was imported from NumPy with: from numpy import *. I did that to save space in the source code, however it sacrificed readability. People didn't know if a method I was using came from NumPy or Python builtin function. A better approach would have been to use the statement import numpy as np. This adds three characters to every NumPy funciton but at least people will know where this function is coming from.
Converting Python 2.X to 3.X https://docs.python.org/2/library/2to3.html Setting up a virtual env with Python 3 http://www.marinamele.com/2014/07/install-python3-on-mac-os-x-and-use-virtualenv-and-virtualenvwrapper.html
You will need numpy to run the examples in this book. To install NumPy do the following: pip3 install numpy. Pip3 and Pip may be the same (they are the same in my Virtual env, so you may only need to run pip install numpy. Check the paths of with which pip and which pip3.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。