
谷歌的AI击败了一位围棋大师,是一种衡量人工智能突然的快速发展的方式,也揭示了这些技术如何发展而来和将来可以如何发展。
人工智能是一种未来性的技术,目前正在致力于研究自己的一套工具。一系列的进展在过去的几年中发生了:无事故驾驶超过300000英里并在三个州合法行驶迎来了自动驾驶的一个里程碑;IBM Waston击败了Jeopardy两届冠军;统计学习技术从对消费者兴趣到以万亿记的图像的复杂数据集进行模式识别。这些发展必然提高了科学家和巨匠们对人工智能的兴趣,这也使得开发者们了解创建人工智能应用的真实本质。开发这些需要注意的第一件事是:
哪一种编程语言适合人工智能?
你所熟练掌握的每一种编程语言都可以是人工智能的开发语言。
人工智能程序可以使用几乎所有的编程语言实现,最常见的有:Lisp,Prolog,C/C++,近来又有Java,最近还有Python.
LISP
像LISP这样的高级语言在人工智能中备受青睐,因为在各高校多年的研究后选择了快速原型而舍弃了快速执行。垃圾收集,动态类型,数据函数,统一的语法,交互式环境和可扩展性等一些特性使得LIST非常适合人工智能编程。
PROLOG
这种语言有着LISP高层和传统优势有效结合,这对AI是非常有用的。它的优势是解决“基于逻辑的问题”。Prolog提供了针对于逻辑相关问题的解决方案,或者说它的解决方案有着简洁的逻辑特征。它的主要缺点(恕我直言)是学起来很难。
C/C++
就像猎豹一样,C/C++主要用于对执行速度要求很高的时候。它主要用于简单程序,统计人工智能,如神经网络就是一个常见的例子。Backpropagation 只用了几页的C/C++代码,但是要求速度,哪怕程序员只能提升一点点速度也是好的。
JAVA
新来者,Java使用了LISP中的几个理念,最明显的是垃圾收集。它的可移植性使它可以适用于任何程序,它还有一套内置类型。Java没有LISP和Prolog高级,又没有C那样快,但如果要求可移植性那它是最好的。
PYTHON
Python是一种用LISP和JAVA编译的语言。按照Norvig文章中对Lips和Python的比较,这两种语言彼此非常相似,仅有一些细小的差别。还有JPthon,提供了访问Java图像用户界面的途径。这是PeterNorvig选择用JPyhton翻译他人工智能书籍中程序的的原因。JPython可以让他使用可移植的GUI演示,和可移植的http/ftp/html库。因此,它非常适合作为人工智能语言的。
在人工智能上使用Python比其他编程语言的好处
优质的文档
平台无关,可以在现在每一个*nix版本上使用
和其他面向对象编程语言比学习更加简单快速
Python有许多图像加强库像Python Imaging Libary,VTK和Maya 3D可视化工具包,Numeric Python, Scientific Python和其他很多可用工具可以于数值和科学应用。
Python的设计非常好,快速,坚固,可移植,可扩展。很明显这些对于人工智能应用来说都是非常重要的因素。
对于科学用途的广泛编程任务都很有用,无论从小的shell脚本还是整个网站应用。
最后,它是开源的。可以得到相同的社区支持。
AI的Python库
总体的AI库
AIMA:Python实现了从Russell到Norvigs的“人工智能:一种现代的方法”的算法
pyDatalog:Python中的逻辑编程引擎
SimpleAI:Python实现在“人工智能:一种现代的方法”这本书中描述过的人工智能的算法。它专注于提供一个易于使用,有良好文档和测试的库。
EasyAI:一个双人AI游戏的python引擎(负极大值,置换表、游戏解决)
机器学习库
PyBrain 一个灵活,简单而有效的针对机器学习任务的算法,它是模块化的Python机器学习库。它也提供了多种预定义好的环境来测试和比较你的算法。
PyML 一个用Python写的双边框架,重点研究SVM和其他内核方法。它支持Linux和Mac OS X。
scikit-learn旨在提供简单而强大的解决方案,可以在不同的上下文中重用:机器学习作为科学和工程的一个多功能工具。它是python的一个模块,集成了经典的机器学习的算法,这些算法是和python科学包(numpy,scipy.matplotlib)紧密联系在一起的。
MDP-Toolkit这是一个Python数据处理的框架,可以很容易的进行扩展。它海收集了有监管和没有监管的学习算饭和其他数据处理单元,可以组合成数据处理序列或者更复杂的前馈网络结构。新算法的实现是简单和直观的。可用的算法是在不断的稳定增加的,包括信号处理方法(主成分分析、独立成分分析、慢特征分析),流型学习方法(局部线性嵌入),集中分类,概率方法(因子分析,RBM),数据预处理方法等等。
自然语言和文本处理库
NLTK 开源的Python模块,语言学数据和文档,用来研究和开发自然语言处理和文本分析。有windows,Mac OSX和Linux版本。
案例
做了一个实验,一个使用人工智能和物联网做员工行为分析的软件。该软件通过员工情绪和行为的分心提供了一个有用的反馈给员工,从而提高了管理和工作习惯。
使用Python机器学习库,opencv和haarcascading概念来培训。建立了样品POC来检测通过安置在不同地点的无线摄像头传递回来基础情感像幸福,生气,悲伤,厌恶,怀疑,蔑视,讥讽和惊喜。收集到的数据会集中到云数据库中,甚至整个办公室都可以通过在Android设备或桌面点击一个按钮来取回。
开发者在深入分析脸部情感上复杂点和挖掘更多的细节中取得进步。在深入学习算法和机器学习的帮助下,可以帮助分析员工个人绩效和适当的员工/团队反馈。
结论
python因为提供像 scikit-learn的好的框架,在人工智能方面扮演了一个重要的角色:Python中的机器学习,实现了这一领域中大多的需求。D3.js JS中数据驱动文档时可视化最强大和易于使用的工具之一。处理框架,它的快速原型制造使得它成为一门不可忽视的重要语言。AI需要大量的研究,因此没有必要要求一个500KB的Java样板代码去测试新的假说。python中几乎每一个想法都可以迅速通过20-30行代码来实现(JS和LISP也是一样)。因此,它对于人工智能是一门非常有用的语言。
【英文原版】
Role of Python in Artificial Intelligence
Google’s AI Beating a Go Grandmaster is a way of judging the suddenly rapid progress of artificial intelligence that may show how far these technologies have come—and how far they may go.
Artificial intelligence is a futuristic technology that is working on its set of tools at present. A slew of advances has been observed in last few years: Self-driving cars that have achieved a milestone by logging over 300,000 accident-free miles and becoming officially legal in three states; IBM Watson which beat two champions of Jeopardy!; and statistical learning techniques are conducting pattern recognition on complex data sets from consumer interests to trillions of images. These developments certainly raised the number of scientists or giants taking interest in AI, which has made it essential for developers to understand the ground realities of building AI applications. The first thing that strikes developers is,
Which programming language is good for AI?
Every programming language is a AI language if you are adept in it!
AI programs are written in almost all the programming languages, the most common are: Lisp, Prolog, C/C++, recently Java, and even more recently, Python.
LISP
High-level languages like LISP are favored in AI because after many years of research in various universities fast prototyping was chosen over fast execution. Garbage collection, dynamic typing, functions as data, uniform syntax, interactive environment, and extensibility are some of its feature that makes the language suitable for AI programming.
PROLOG
This language comes with an effective combination of the high-level and traditional advantages of Lisp with a built-in unifier, which is particularly useful in AI. It’s strength is ‘logic based problems’. Prolog gives good solutions for problems in which logic is intimately involved, or whose solutions have a succinct logical characterization. Its major drawback (IMHO) is that it’s hard to learn.
C/C++
Cheetah of the bunch, C/C++ is mostly used when the speed of execution is most important. It is used mostly when the program is simple, statistical AI techniques such as neural networks are common examples of this. Backpropagation is only a couple of pages of C/C++ code, and needs every ounce of speed that the programmer can muster.
JAVA
The newcomer, Java uses several ideas from Lisp, most notably garbage collection. Its portability makes it desirable for just about any application, and it has a decent set of built in types. Java is still not as high-level as Lisp or Prolog, and not as fast as C, making it best when portability is paramount.
PYTHON
Python is a language with the best compilation of Lisp and Java both.According to Norvig is his text comparing Lisp to Python, these two languages are very similar to each other with some minor differences. There also exists JPython, giving access to the Java GUIs. This is the reason behind Peter Norvig choosing JPython to translate his programs from his AI book. As JPython allowed him to have portable GUI demos, and portable http/ftp/html libraries. Therefore, it is very good to use as AI language.
Benefits of Using Python over the Other Programming Languages for AI
1.Good quality documentation.
2.Platform agnostic, and present in virtually every *nix distribution.
3.Easy and fast to learn in comparison to any other OOP language.
4.Python has many image intensive libraries like Python Imaging Library, VTK and Maya 3D Visualization Toolkits, Numeric Python, Scientific Python and many other tools available for numeric and scientific applications.
5.Python is very well designed, fast, robust, portable, and scalable. These are evidently the most important factors for AI applications.
6.Useful for a really broad range of programming tasks from little shell scripts to enterprise web applications to scientific uses.
7.Last but not the least, it is Open Source! Good community support available for the same.
Python Libraries for AI
Libraries for General AI
1.AIMA – Python implementation of algorithms from Russell and Norvig’s ‘Artificial Intelligence: A Modern Approach’
2.pyDatalog – Logic Programming engine in Python
3.SimpleAI – Python implementation of many of the artificial intelligence algorithms described on the book “Artificial Intelligence, a Modern Approach”. It focuses on providing an easy to use, well documented and tested library.
4.EasyAI – Simple Python engine for two-players games with AI (Negamax, transposition tables, game solving).
Libraries for ML
1.PyBrain – It is a flexible, simple yet effective algorithms for ML tasks, it is a modular Machine Learning Library for Python. It also provides a variety of predefined environments to test and compare your algorithms.
2.PyML – A bilateral framework written in Python that focuses on SVMs and other kernel methods. It is supported on Linux and Mac OS X.
3.scikit-learn – It aims to provide easy and powerful solutions reusable in various contexts: machine-learning as a versatile tool for science and engineering. It is a Python module that integrates the classic classic machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib).
4.MDP-Toolkit – It is a Python data processing framework that can be easily expanded, it also has a collection of supervised and unsupervised learning algorithms and other data processing units that can be combined into data processing sequences and more complex feed-forward network architectures. The implementation of new algorithms is easy and intuitive. The base of available algorithms is steadily increasing and includes signal processing methods (Principal Component Analysis, Independent Component Analysis, Slow Feature Analysis), manifold learning methods ([Hessian] Locally Linear Embedding), several classifiers, probabilistic methods (Factor Analysis, RBM), data pre-processing methods, and many others.
Libraries for Natural Language & Text Processing
NLTK – Open source Python modules, linguistic data and documentation for research and development in natural language processing and text analytics, with distributions for Windows, Mac OSX and Linux.
Case Study
An experiment to bring AI to use with Internet of Things was done to make a software for employee behavioral analytics. The software provides useful feedback to the employees through employee emotions and behaviour analysis, thus enhancing positive changes in management and work habits.
Using python machine learning libraries, opencv and haarcascading concepts for application training, a sample POC was built to detect basic emotions like happiness, anger, sadness, disgust, suspicion, contempt, sarcasm and surprise through wireless cameras attached at various bay points. The data collected was feeded to a centralized cloud database where daily emotional quotient within the bay, or even the entire office could be retrieved at the click of a button either through android device or desktop.
Developers are making gradual progress in analyzing further complex points on facial emotions and mine more details with the help of deep learning algorithms and machine learning which can help analyze individual employee performance and help in proper employee/team feedback.
Conclusion
Python plays an important role in Artificial Intelligence by providing it with good frameworks like scikit-learn: machine learning in Python, which fulfills almost every need in this field and D3.js – Data-Driven Documents in JS, which is one of the most powerful and easy-to-use tools for visualization. Other than frameworks, it’s fast prototyping makes it an important language not to be ignored. AI needs a lot of research and hence it is necessary not to require a 500 KB boilerplate code in Java to test a new hypothesis, which will never finish the project. In Python almost every idea can be quickly validated through 20-30 lines of code (same for JS with libs). Therefore, it is a pretty useful language for the sake of AI.
数据分析咨询请扫描二维码
若不方便扫码,搜微信号:CDAshujufenxi
Excel 导入数据含缺失值?详解 dropna 函数的功能与实战应用 在用 Python(如 pandas 库)处理 Excel 数据时,“缺失值” 是高频 ...
2025-09-16深入解析卡方检验与 t 检验:差异、适用场景与实践应用 在数据分析与统计学领域,假设检验是验证研究假设、判断数据差异是否 “ ...
2025-09-16CDA 数据分析师:掌控表格结构数据全功能周期的专业操盘手 表格结构数据(以 “行 - 列” 存储的结构化数据,如 Excel 表、数据 ...
2025-09-16MySQL 执行计划中 rows 数量的准确性解析:原理、影响因素与优化 在 MySQL SQL 调优中,EXPLAIN执行计划是核心工具,而其中的row ...
2025-09-15解析 Python 中 Response 对象的 text 与 content:区别、场景与实践指南 在 Python 进行 HTTP 网络请求开发时(如使用requests ...
2025-09-15CDA 数据分析师:激活表格结构数据价值的核心操盘手 表格结构数据(如 Excel 表格、数据库表)是企业最基础、最核心的数据形态 ...
2025-09-15Python HTTP 请求工具对比:urllib.request 与 requests 的核心差异与选择指南 在 Python 处理 HTTP 请求(如接口调用、数据爬取 ...
2025-09-12解决 pd.read_csv 读取长浮点数据的科学计数法问题 为帮助 Python 数据从业者解决pd.read_csv读取长浮点数据时的科学计数法问题 ...
2025-09-12CDA 数据分析师:业务数据分析步骤的落地者与价值优化者 业务数据分析是企业解决日常运营问题、提升执行效率的核心手段,其价值 ...
2025-09-12用 SQL 验证业务逻辑:从规则拆解到数据把关的实战指南 在业务系统落地过程中,“业务逻辑” 是连接 “需求设计” 与 “用户体验 ...
2025-09-11塔吉特百货孕妇营销案例:数据驱动下的精准零售革命与启示 在零售行业 “流量红利见顶” 的当下,精准营销成为企业突围的核心方 ...
2025-09-11CDA 数据分析师与战略 / 业务数据分析:概念辨析与协同价值 在数据驱动决策的体系中,“战略数据分析”“业务数据分析” 是企业 ...
2025-09-11Excel 数据聚类分析:从操作实践到业务价值挖掘 在数据分析场景中,聚类分析作为 “无监督分组” 的核心工具,能从杂乱数据中挖 ...
2025-09-10统计模型的核心目的:从数据解读到决策支撑的价值导向 统计模型作为数据分析的核心工具,并非简单的 “公式堆砌”,而是围绕特定 ...
2025-09-10CDA 数据分析师:商业数据分析实践的落地者与价值创造者 商业数据分析的价值,最终要在 “实践” 中体现 —— 脱离业务场景的分 ...
2025-09-10机器学习解决实际问题的核心关键:从业务到落地的全流程解析 在人工智能技术落地的浪潮中,机器学习作为核心工具,已广泛应用于 ...
2025-09-09SPSS 编码状态区域中 Unicode 的功能与价值解析 在 SPSS(Statistical Product and Service Solutions,统计产品与服务解决方案 ...
2025-09-09CDA 数据分析师:驾驭商业数据分析流程的核心力量 在商业决策从 “经验驱动” 向 “数据驱动” 转型的过程中,商业数据分析总体 ...
2025-09-09R 语言:数据科学与科研领域的核心工具及优势解析 一、引言 在数据驱动决策的时代,无论是科研人员验证实验假设(如前文中的 T ...
2025-09-08T 检验在假设检验中的应用与实践 一、引言 在科研数据分析、医学实验验证、经济指标对比等领域,常常需要判断 “样本间的差异是 ...
2025-09-08