工欲善其事必先利其器(配置平台)

2017-03-18  本文已影响0人  JasonJe

工欲善其事必先利其器(配置平台)

在本文开始之前,我们来看下这一段偈语:

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

这段话是Tim Peters根据Python的发明者Guido van Rossum确定的Python的指导原则而写的(在Python命令行下输入import this就可以看到)。这也是为什么笔者一接触Python就喜欢上了这种编程语言的原因。

Python为什么比其它编程语言在科学计算上更具有优势,不仅仅是因为它的简洁易读、优雅美丽的代码,更多是因为它拥有一个巨大而活跃的科学计算的社区。诸如NumPy、SciPy、pandas、matplotlib等这些程序库为Python科学计算助力。它们让Python成为科学计算的最佳选择。这也是为什么它会成为现在AI的头牌语言。

下文是笔者在机器学习的道路上经历过的东西,提供给广大读者,教大家打造一个Python机器学习的平台。

Anaconda

Anaconda是用于科学计算的Python发行版,支持Linux、Mac、Windows平台。它集成了丰富的科学计算包,诸如NumPy、SciPy、pandas、matplotlib、scikit-learn等常见的数据分析、机器学习的包都有集成,安装配置也是十分简便快捷,当然还拥有pip和conda这两个强大的包管理器,这也是为什么笔者推荐给大家的原因。

可以从Anaconda的官网 https://www.continuum.io/downloads/ 下载(现在已经更新到了Anaconda 4.3.1)。

Anaconda的安装十分简便

这里点Next即可

选择可以使用的用户(一般默认就行)

设置安装路径


这里是Anaconda系统环境变量和系统其他Python IDE默认Python设置,两个选项根据需要勾选。最后点击Install随着安装进程结束即可。

Anaconda的程序目录如图:

Anaconda中各个环境和组件的使用还需读者朋友们去发现。值得一说的是,Anaconda是十分便捷且易于使用的一个平台。通过它,笔者开始了后面的机器学习之路。

当然我们还可以从Python官网下载需要的Python版本,安装需要的科学计算库等个性化的操作,这里不再进行赘述,更多的需要读者朋友们去发现。

上一篇 下一篇

猜你喜欢

热点阅读