
machine-learn
文章平均质量分 64
somilong
这个作者很懒,什么都没留下…
展开
-
安装pip
转: http://blog.youkuaiyun.com/jobschen/article/details/49559023mac 已经自带python,自带python版本是2.7.10.sudo easy_install pip … … …此处省略N行… … … Installed /Library/Python/2.7/site-packages/p转载 2018-01-01 18:08:45 · 254 阅读 · 0 评论 -
pip安装依赖six-1.4.1失败解决方案
$sudo pip install matplotlib --upgrade在安装matplotlib包的时候,遇到如下报错:Installing collected packages: six, python-dateutil, pyparsing, numpy, pytz, backports.functools-lru-cache, cycler, subprocess32, matplot...原创 2018-02-28 13:21:48 · 4901 阅读 · 0 评论 -
矩阵求导公式总结
如下A'表示矩阵的转置基本公式:Y = A * X --> DY/DX = A'Y = X * A --> DY/DX = AY = A' * X * B --> DY/DX = A * B'Y = A' * X' * B --> DY/DX = B * A'1. 矩阵Y对标量x求导:相当于每个元素求导数后转置一下,注意M×N矩阵求导后变成N×M了Y = [y(ij)] -...转载 2018-02-11 17:14:16 · 1478 阅读 · 0 评论 -
numpy数组操作
import numpy as np0. 生成等差数列np.arange(0, 10, 1, dtype=int) = [0 1 2 3 4 5 6 7 8 9] #大于等于0, 小于10,步长为1的等差数列np.arange(10) = [0 1 2 3 4 5 6 7 8 9] #默认大于等于0, 小于10,步长为1的等差数列1. 生成多维数组,并批量初始化元素1.1生成2*3初始值为...原创 2018-01-15 18:50:47 · 3351 阅读 · 0 评论 -
numpy.meshgrid函数使用解释
官方解释:Return coordinate matrices from coordinate vectors.用向量生成坐标矩阵,参数的个数不限制,如下以两个向量入参为例:如: 向量X,YX=[1 2]Y=[3 4 5]xx, yy = np.meshgrid(X, Y)xx=[[1 2] [1 2] [1 2]]原创 2018-01-02 16:14:22 · 2908 阅读 · 0 评论 -
虚拟目录中下载requirments依赖包
(首选确保正确安装virtualenv和virtualenvwrapper)1. 创建虚拟目录$mkvirtualenv venv12. 列出已存在的虚拟目录$workonvenv1venv23. 激活venv1$ workon venv1(venv1) machinename:~ username$其中(venv1)表示你已经原创 2018-01-02 13:01:54 · 419 阅读 · 0 评论 -
python虚拟环境virtualenv/virtualenvwrapper
$ sudo pip install virtualenvThe directory '/Users/jimmy.wj/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permis转载 2018-01-01 21:26:29 · 427 阅读 · 0 评论 -
安装scikit-learn
jimmywjdeMacBook-Pro:~ jimmy.wj$ sudo pip install -U scikit-learnThe directory '/Users/jimmy.wj/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has be原创 2018-01-01 18:11:08 · 681 阅读 · 0 评论 -
报错:No module named mpl_toolkits解决方案
明明有这个库的代码,但是依然报错找不到module:尝试更新matplotlib库,还真解决了这个问题:$sudo pip install matplotlib --upgrade如果更新的时候遇到uninstall six库报错,那么可以修改命令如下,跳过six的更新,详见另一篇博文http://blog.youkuaiyun.com/somilong/article/details/79399248$su...原创 2018-02-28 13:29:10 · 44011 阅读 · 5 评论