谷歌的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
最近我发现一个绝招,用DeepSeek AI处理Excel数据简直太爽了!处理速度嘎嘎快! 平常一整天的表格处理工作,现在只要三步就能搞 ...
2025-04-01你是否被统计学复杂的理论和晦涩的公式劝退过?别担心,“山有木兮:统计学极简入门(Python)” 将为你一一化解这些难题。课程 ...
2025-03-31在电商、零售、甚至内容付费业务中,你真的了解你的客户吗? 有些客户下了一两次单就消失了,有些人每个月都回购,有些人曾经是 ...
2025-03-31在数字化浪潮中,数据驱动决策已成为企业发展的核心竞争力,数据分析人才的需求持续飙升。世界经济论坛发布的《未来就业报告》, ...
2025-03-28你有没有遇到过这样的情况?流量进来了,转化率却不高,辛辛苦苦拉来的用户,最后大部分都悄无声息地离开了,这时候漏斗分析就非 ...
2025-03-27TensorFlow Datasets(TFDS)是一个用于下载、管理和预处理机器学习数据集的库。它提供了易于使用的API,允许用户从现有集合中 ...
2025-03-26"不谋全局者,不足谋一域。"在数据驱动的商业时代,战略级数据分析能力已成为职场核心竞争力。《CDA二级教材:商业策略数据分析 ...
2025-03-26当你在某宝刷到【猜你喜欢】时,当抖音精准推来你的梦中情猫时,当美团外卖弹窗刚好是你想吃的火锅店…… 恭喜你,你正在被用户 ...
2025-03-26当面试官问起随机森林时,他到底在考察什么? ""请解释随机森林的原理""——这是数据分析岗位面试中的经典问题。但你可能不知道 ...
2025-03-25在数字化浪潮席卷的当下,数据俨然成为企业的命脉,贯穿于业务运作的各个环节。从线上到线下,从平台的交易数据,到门店的运营 ...
2025-03-25在互联网和移动应用领域,DAU(日活跃用户数)是一个耳熟能详的指标。无论是产品经理、运营,还是数据分析师,DAU都是衡量产品 ...
2025-03-24ABtest做的好,产品优化效果差不了!可见ABtest在评估优化策略的效果方面地位还是很高的,那么如何在业务中应用ABtest? 结合企业 ...
2025-03-21在企业数据分析中,指标体系是至关重要的工具。不仅帮助企业统一数据标准、提升数据质量,还能为业务决策提供有力支持。本文将围 ...
2025-03-20解锁数据分析师高薪密码,CDA 脱产就业班助你逆袭! 在数字化浪潮中,数据驱动决策已成为企业发展的核心竞争力,数据分析人才的 ...
2025-03-19在 MySQL 数据库中,查询一张表但是不包含某个字段可以通过以下两种方法实现:使用 SELECT 子句以明确指定想要的字段,或者使 ...
2025-03-17在当今数字化时代,数据成为企业发展的关键驱动力,而用户画像作为数据分析的重要成果,改变了企业理解用户、开展业务的方式。无 ...
2025-03-172025年是智能体(AI Agent)的元年,大模型和智能体的发展比较迅猛。感觉年初的deepseek刚火没多久,这几天Manus又成为媒体头条 ...
2025-03-14以下的文章内容来源于柯家媛老师的专栏,如果您想阅读专栏《小白必备的数据思维课》,点击下方链接 https://edu.cda.cn/goods/sh ...
2025-03-13以下的文章内容来源于刘静老师的专栏,如果您想阅读专栏《10大业务分析模型突破业务瓶颈》,点击下方链接 https://edu.cda.cn/go ...
2025-03-12以下的文章内容来源于柯家媛老师的专栏,如果您想阅读专栏《小白必备的数据思维课》,点击下方链接 https://edu.cda.cn/goods/sh ...
2025-03-11