
谷歌的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
机器学习解决实际问题的核心关键:从业务到落地的全流程解析 在人工智能技术落地的浪潮中,机器学习作为核心工具,已广泛应用于 ...
2025-09-09SPSS 编码状态区域中 Unicode 的功能与价值解析 在 SPSS(Statistical Product and Service Solutions,统计产品与服务解决方案 ...
2025-09-09CDA 数据分析师:驾驭商业数据分析流程的核心力量 在商业决策从 “经验驱动” 向 “数据驱动” 转型的过程中,商业数据分析总体 ...
2025-09-09R 语言:数据科学与科研领域的核心工具及优势解析 一、引言 在数据驱动决策的时代,无论是科研人员验证实验假设(如前文中的 T ...
2025-09-08T 检验在假设检验中的应用与实践 一、引言 在科研数据分析、医学实验验证、经济指标对比等领域,常常需要判断 “样本间的差异是 ...
2025-09-08在商业竞争日益激烈的当下,“用数据说话” 已从企业的 “加分项” 变为 “生存必需”。然而,零散的数据分析无法持续为业务赋能 ...
2025-09-08随机森林算法的核心特点:原理、优势与应用解析 在机器学习领域,随机森林(Random Forest)作为集成学习(Ensemble Learning) ...
2025-09-05Excel 区域名定义:从基础到进阶的高效应用指南 在 Excel 数据处理中,频繁引用单元格区域(如A2:A100、B3:D20)不仅容易出错, ...
2025-09-05CDA 数据分析师:以六大分析方法构建数据驱动业务的核心能力 在数据驱动决策成为企业共识的当下,CDA(Certified Data Analyst) ...
2025-09-05SQL 日期截取:从基础方法到业务实战的全维度解析 在数据处理与业务分析中,日期数据是连接 “业务行为” 与 “时间维度” 的核 ...
2025-09-04在卷积神经网络(CNN)的发展历程中,解决 “梯度消失”“特征复用不足”“模型参数冗余” 一直是核心命题。2017 年提出的密集连 ...
2025-09-04CDA 数据分析师:驾驭数据范式,释放数据价值 在数字化转型浪潮席卷全球的当下,数据已成为企业核心生产要素。而 CDA(Certified ...
2025-09-04K-Means 聚类:无监督学习中数据分群的核心算法 在数据分析领域,当我们面对海量无标签数据(如用户行为记录、商品属性数据、图 ...
2025-09-03特征值、特征向量与主成分:数据降维背后的线性代数逻辑 在机器学习、数据分析与信号处理领域,“降维” 是破解高维数据复杂性的 ...
2025-09-03CDA 数据分析师与数据分析:解锁数据价值的关键 在数字经济高速发展的今天,数据已成为企业核心资产与社会发展的重要驱动力。无 ...
2025-09-03解析 loss.backward ():深度学习中梯度汇总与同步的自动触发核心 在深度学习模型训练流程中,loss.backward()是连接 “前向计算 ...
2025-09-02要解答 “画 K-S 图时横轴是等距还是等频” 的问题,需先明确 K-S 图的核心用途(检验样本分布与理论分布的一致性),再结合横轴 ...
2025-09-02CDA 数据分析师:助力企业破解数据需求与数据分析需求难题 在数字化浪潮席卷全球的当下,数据已成为企业核心战略资产。无论是市 ...
2025-09-02Power BI 度量值实战:基于每月收入与税金占比计算累计税金分摊金额 在企业财务分析中,税金分摊是成本核算与利润统计的核心环节 ...
2025-09-01巧用 ALTER TABLE rent ADD INDEX:租房系统数据库性能优化实践 在租房管理系统中,rent表是核心业务表之一,通常存储租赁订单信 ...
2025-09-01