
谷歌的AI擊敗了一位圍棋大師,是一種衡量人工智能突然的快速發(fā)展的方式,也揭示了這些技術(shù)如何發(fā)展而來和將來可以如何發(fā)展。
人工智能是一種未來性的技術(shù),目前正在致力于研究自己的一套工具。一系列的進(jìn)展在過去的幾年中發(fā)生了:無事故駕駛超過300000英里并在三個州合法行駛迎來了自動駕駛的一個里程碑;IBM Waston擊敗了Jeopardy兩屆冠軍;統(tǒng)計學(xué)習(xí)技術(shù)從對消費者興趣到以萬億記的圖像的復(fù)雜數(shù)據(jù)集進(jìn)行模式識別。這些發(fā)展必然提高了科學(xué)家和巨匠們對人工智能的興趣,這也使得開發(fā)者們了解創(chuàng)建人工智能應(yīng)用的真實本質(zhì)。開發(fā)這些需要注意的第一件事是:
哪一種編程語言適合人工智能?
你所熟練掌握的每一種編程語言都可以是人工智能的開發(fā)語言。
人工智能程序可以使用幾乎所有的編程語言實現(xiàn),最常見的有:Lisp,Prolog,C/C++,近來又有Java,最近還有Python.
LISP
像LISP這樣的高級語言在人工智能中備受青睞,因為在各高校多年的研究后選擇了快速原型而舍棄了快速執(zhí)行。垃圾收集,動態(tài)類型,數(shù)據(jù)函數(shù),統(tǒng)一的語法,交互式環(huán)境和可擴(kuò)展性等一些特性使得LIST非常適合人工智能編程。
PROLOG
這種語言有著LISP高層和傳統(tǒng)優(yōu)勢有效結(jié)合,這對AI是非常有用的。它的優(yōu)勢是解決“基于邏輯的問題”。Prolog提供了針對于邏輯相關(guān)問題的解決方案,或者說它的解決方案有著簡潔的邏輯特征。它的主要缺點(恕我直言)是學(xué)起來很難。
C/C++
就像獵豹一樣,C/C++主要用于對執(zhí)行速度要求很高的時候。它主要用于簡單程序,統(tǒng)計人工智能,如神經(jīng)網(wǎng)絡(luò)就是一個常見的例子。Backpropagation 只用了幾頁的C/C++代碼,但是要求速度,哪怕程序員只能提升一點點速度也是好的。
JAVA
新來者,Java使用了LISP中的幾個理念,最明顯的是垃圾收集。它的可移植性使它可以適用于任何程序,它還有一套內(nèi)置類型。Java沒有LISP和Prolog高級,又沒有C那樣快,但如果要求可移植性那它是最好的。
PYTHON
Python是一種用LISP和JAVA編譯的語言。按照Norvig文章中對Lips和Python的比較,這兩種語言彼此非常相似,僅有一些細(xì)小的差別。還有JPthon,提供了訪問Java圖像用戶界面的途徑。這是PeterNorvig選擇用JPyhton翻譯他人工智能書籍中程序的的原因。JPython可以讓他使用可移植的GUI演示,和可移植的http/ftp/html庫。因此,它非常適合作為人工智能語言的。
在人工智能上使用Python比其他編程語言的好處
優(yōu)質(zhì)的文檔
平臺無關(guān),可以在現(xiàn)在每一個*nix版本上使用
和其他面向?qū)ο缶幊陶Z言比學(xué)習(xí)更加簡單快速
Python有許多圖像加強(qiáng)庫像Python Imaging Libary,VTK和Maya 3D可視化工具包,Numeric Python, Scientific Python和其他很多可用工具可以于數(shù)值和科學(xué)應(yīng)用。
Python的設(shè)計非常好,快速,堅固,可移植,可擴(kuò)展。很明顯這些對于人工智能應(yīng)用來說都是非常重要的因素。
對于科學(xué)用途的廣泛編程任務(wù)都很有用,無論從小的shell腳本還是整個網(wǎng)站應(yīng)用。
最后,它是開源的。可以得到相同的社區(qū)支持。
AI的Python庫
總體的AI庫
AIMA:Python實現(xiàn)了從Russell到Norvigs的“人工智能:一種現(xiàn)代的方法”的算法
pyDatalog:Python中的邏輯編程引擎
SimpleAI:Python實現(xiàn)在“人工智能:一種現(xiàn)代的方法”這本書中描述過的人工智能的算法。它專注于提供一個易于使用,有良好文檔和測試的庫。
EasyAI:一個雙人AI游戲的python引擎(負(fù)極大值,置換表、游戲解決)
PyBrain 一個靈活,簡單而有效的針對機(jī)器學(xué)習(xí)任務(wù)的算法,它是模塊化的Python機(jī)器學(xué)習(xí)庫。它也提供了多種預(yù)定義好的環(huán)境來測試和比較你的算法。
PyML 一個用Python寫的雙邊框架,重點研究SVM和其他內(nèi)核方法。它支持Linux和Mac OS X。
scikit-learn旨在提供簡單而強(qiáng)大的解決方案,可以在不同的上下文中重用:機(jī)器學(xué)習(xí)作為科學(xué)和工程的一個多功能工具。它是python的一個模塊,集成了經(jīng)典的機(jī)器學(xué)習(xí)的算法,這些算法是和python科學(xué)包(numpy,scipy.matplotlib)緊密聯(lián)系在一起的。
MDP-Toolkit這是一個Python數(shù)據(jù)處理的框架,可以很容易的進(jìn)行擴(kuò)展。它海收集了有監(jiān)管和沒有監(jiān)管的學(xué)習(xí)算飯和其他數(shù)據(jù)處理單元,可以組合成數(shù)據(jù)處理序列或者更復(fù)雜的前饋網(wǎng)絡(luò)結(jié)構(gòu)。新算法的實現(xiàn)是簡單和直觀的。可用的算法是在不斷的穩(wěn)定增加的,包括信號處理方法(主成分分析、獨立成分分析、慢特征分析),流型學(xué)習(xí)方法(局部線性嵌入),集中分類,概率方法(因子分析,RBM),數(shù)據(jù)預(yù)處理方法等等。
自然語言和文本處理庫
NLTK 開源的Python模塊,語言學(xué)數(shù)據(jù)和文檔,用來研究和開發(fā)自然語言處理和文本分析。有windows,Mac OSX和Linux版本。
案例
做了一個實驗,一個使用人工智能和物聯(lián)網(wǎng)做員工行為分析的軟件。該軟件通過員工情緒和行為的分心提供了一個有用的反饋給員工,從而提高了管理和工作習(xí)慣。
使用Python機(jī)器學(xué)習(xí)庫,opencv和haarcascading概念來培訓(xùn)。建立了樣品POC來檢測通過安置在不同地點的無線攝像頭傳遞回來基礎(chǔ)情感像幸福,生氣,悲傷,厭惡,懷疑,蔑視,譏諷和驚喜。收集到的數(shù)據(jù)會集中到云數(shù)據(jù)庫中,甚至整個辦公室都可以通過在Android設(shè)備或桌面點擊一個按鈕來取回。
開發(fā)者在深入分析臉部情感上復(fù)雜點和挖掘更多的細(xì)節(jié)中取得進(jìn)步。在深入學(xué)習(xí)算法和機(jī)器學(xué)習(xí)的幫助下,可以幫助分析員工個人績效和適當(dāng)?shù)膯T工/團(tuán)隊反饋。
結(jié)論
python因為提供像 scikit-learn的好的框架,在人工智能方面扮演了一個重要的角色:Python中的機(jī)器學(xué)習(xí),實現(xiàn)了這一領(lǐng)域中大多的需求。D3.js JS中數(shù)據(jù)驅(qū)動文檔時可視化最強(qiáng)大和易于使用的工具之一。處理框架,它的快速原型制造使得它成為一門不可忽視的重要語言。AI需要大量的研究,因此沒有必要要求一個500KB的Java樣板代碼去測試新的假說。python中幾乎每一個想法都可以迅速通過20-30行代碼來實現(xiàn)(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.
數(shù)據(jù)分析咨詢請掃描二維碼
若不方便掃碼,搜微信號:CDAshujufenxi
LSTM 模型輸入長度選擇技巧:提升序列建模效能的關(guān)鍵? 在循環(huán)神經(jīng)網(wǎng)絡(luò)(RNN)家族中,長短期記憶網(wǎng)絡(luò)(LSTM)憑借其解決長序列 ...
2025-07-11CDA 數(shù)據(jù)分析師報考條件詳解與準(zhǔn)備指南? ? 在數(shù)據(jù)驅(qū)動決策的時代浪潮下,CDA 數(shù)據(jù)分析師認(rèn)證愈發(fā)受到矚目,成為眾多有志投身數(shù) ...
2025-07-11數(shù)據(jù)透視表中兩列相乘合計的實用指南? 在數(shù)據(jù)分析的日常工作中,數(shù)據(jù)透視表憑借其強(qiáng)大的數(shù)據(jù)匯總和分析功能,成為了 Excel 用戶 ...
2025-07-11尊敬的考生: 您好! 我們誠摯通知您,CDA Level I和 Level II考試大綱將于 2025年7月25日 實施重大更新。 此次更新旨在確保認(rèn) ...
2025-07-10BI 大數(shù)據(jù)分析師:連接數(shù)據(jù)與業(yè)務(wù)的價值轉(zhuǎn)化者? ? 在大數(shù)據(jù)與商業(yè)智能(Business Intelligence,簡稱 BI)深度融合的時代,BI ...
2025-07-10SQL 在預(yù)測分析中的應(yīng)用:從數(shù)據(jù)查詢到趨勢預(yù)判? ? 在數(shù)據(jù)驅(qū)動決策的時代,預(yù)測分析作為挖掘數(shù)據(jù)潛在價值的核心手段,正被廣泛 ...
2025-07-10數(shù)據(jù)查詢結(jié)束后:分析師的收尾工作與價值深化? ? 在數(shù)據(jù)分析的全流程中,“query end”(查詢結(jié)束)并非工作的終點,而是將數(shù) ...
2025-07-10CDA 數(shù)據(jù)分析師考試:從報考到取證的全攻略? 在數(shù)字經(jīng)濟(jì)蓬勃發(fā)展的今天,數(shù)據(jù)分析師已成為各行業(yè)爭搶的核心人才,而 CDA(Certi ...
2025-07-09【CDA干貨】單樣本趨勢性檢驗:捕捉數(shù)據(jù)背后的時間軌跡? 在數(shù)據(jù)分析的版圖中,單樣本趨勢性檢驗如同一位耐心的偵探,專注于從單 ...
2025-07-09year_month數(shù)據(jù)類型:時間維度的精準(zhǔn)切片? ? 在數(shù)據(jù)的世界里,時間是最不可或缺的維度之一,而year_month數(shù)據(jù)類型就像一把精準(zhǔn) ...
2025-07-09CDA 備考干貨:Python 在數(shù)據(jù)分析中的核心應(yīng)用與實戰(zhàn)技巧? ? 在 CDA 數(shù)據(jù)分析師認(rèn)證考試中,Python 作為數(shù)據(jù)處理與分析的核心 ...
2025-07-08SPSS 中的 Mann-Kendall 檢驗:數(shù)據(jù)趨勢與突變分析的有力工具? ? ? 在數(shù)據(jù)分析的廣袤領(lǐng)域中,準(zhǔn)確捕捉數(shù)據(jù)的趨勢變化以及識別 ...
2025-07-08備戰(zhàn) CDA 數(shù)據(jù)分析師考試:需要多久?如何規(guī)劃? CDA(Certified Data Analyst)數(shù)據(jù)分析師認(rèn)證作為國內(nèi)權(quán)威的數(shù)據(jù)分析能力認(rèn)證 ...
2025-07-08LSTM 輸出不確定的成因、影響與應(yīng)對策略? 長短期記憶網(wǎng)絡(luò)(LSTM)作為循環(huán)神經(jīng)網(wǎng)絡(luò)(RNN)的一種變體,憑借獨特的門控機(jī)制,在 ...
2025-07-07統(tǒng)計學(xué)方法在市場調(diào)研數(shù)據(jù)中的深度應(yīng)用? 市場調(diào)研是企業(yè)洞察市場動態(tài)、了解消費者需求的重要途徑,而統(tǒng)計學(xué)方法則是市場調(diào)研數(shù) ...
2025-07-07CDA數(shù)據(jù)分析師證書考試全攻略? 在數(shù)字化浪潮席卷全球的當(dāng)下,數(shù)據(jù)已成為企業(yè)決策、行業(yè)發(fā)展的核心驅(qū)動力,數(shù)據(jù)分析師也因此成為 ...
2025-07-07剖析 CDA 數(shù)據(jù)分析師考試題型:解鎖高效備考與答題策略? CDA(Certified Data Analyst)數(shù)據(jù)分析師考試作為衡量數(shù)據(jù)專業(yè)能力的 ...
2025-07-04SQL Server 字符串截取轉(zhuǎn)日期:解鎖數(shù)據(jù)處理的關(guān)鍵技能? 在數(shù)據(jù)處理與分析工作中,數(shù)據(jù)格式的規(guī)范性是保證后續(xù)分析準(zhǔn)確性的基礎(chǔ) ...
2025-07-04CDA 數(shù)據(jù)分析師視角:從數(shù)據(jù)迷霧中探尋商業(yè)真相? 在數(shù)字化浪潮席卷全球的今天,數(shù)據(jù)已成為企業(yè)決策的核心驅(qū)動力,CDA(Certifie ...
2025-07-04CDA 數(shù)據(jù)分析師:開啟數(shù)據(jù)職業(yè)發(fā)展新征程? ? 在數(shù)據(jù)成為核心生產(chǎn)要素的今天,數(shù)據(jù)分析師的職業(yè)價值愈發(fā)凸顯。CDA(Certified D ...
2025-07-03