99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線電話:13121318867

登錄
首頁大數(shù)據(jù)時代Python在人工智能中的作用
Python在人工智能中的作用
2018-02-08
收藏


谷歌的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ù)極大值,置換表、游戲解決)


機(jī)器學(xué)習(xí)

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

數(shù)據(jù)分析師資訊
更多

OK
客服在線
立即咨詢
客服在線
立即咨詢
') } function initGt() { var handler = function (captchaObj) { captchaObj.appendTo('#captcha'); captchaObj.onReady(function () { $("#wait").hide(); }).onSuccess(function(){ $('.getcheckcode').removeClass('dis'); $('.getcheckcode').trigger('click'); }); window.captchaObj = captchaObj; }; $('#captcha').show(); $.ajax({ url: "/login/gtstart?t=" + (new Date()).getTime(), // 加隨機(jī)數(shù)防止緩存 type: "get", dataType: "json", success: function (data) { $('#text').hide(); $('#wait').show(); // 調(diào)用 initGeetest 進(jìn)行初始化 // 參數(shù)1:配置參數(shù) // 參數(shù)2:回調(diào),回調(diào)的第一個參數(shù)驗證碼對象,之后可以使用它調(diào)用相應(yīng)的接口 initGeetest({ // 以下 4 個配置參數(shù)為必須,不能缺少 gt: data.gt, challenge: data.challenge, offline: !data.success, // 表示用戶后臺檢測極驗服務(wù)器是否宕機(jī) new_captcha: data.new_captcha, // 用于宕機(jī)時表示是新驗證碼的宕機(jī) product: "float", // 產(chǎn)品形式,包括:float,popup width: "280px", https: true // 更多配置參數(shù)說明請參見:http://docs.geetest.com/install/client/web-front/ }, handler); } }); } function codeCutdown() { if(_wait == 0){ //倒計時完成 $(".getcheckcode").removeClass('dis').html("重新獲取"); }else{ $(".getcheckcode").addClass('dis').html("重新獲取("+_wait+"s)"); _wait--; setTimeout(function () { codeCutdown(); },1000); } } function inputValidate(ele,telInput) { var oInput = ele; var inputVal = oInput.val(); var oType = ele.attr('data-type'); var oEtag = $('#etag').val(); var oErr = oInput.closest('.form_box').next('.err_txt'); var empTxt = '請輸入'+oInput.attr('placeholder')+'!'; var errTxt = '請輸入正確的'+oInput.attr('placeholder')+'!'; var pattern; if(inputVal==""){ if(!telInput){ errFun(oErr,empTxt); } return false; }else { switch (oType){ case 'login_mobile': pattern = /^1[3456789]\d{9}$/; if(inputVal.length==11) { $.ajax({ url: '/login/checkmobile', type: "post", dataType: "json", data: { mobile: inputVal, etag: oEtag, page_ur: window.location.href, page_referer: document.referrer }, success: function (data) { } }); } break; case 'login_yzm': pattern = /^\d{6}$/; break; } if(oType=='login_mobile'){ } if(!!validateFun(pattern,inputVal)){ errFun(oErr,'') if(telInput){ $('.getcheckcode').removeClass('dis'); } }else { if(!telInput) { errFun(oErr, errTxt); }else { $('.getcheckcode').addClass('dis'); } return false; } } return true; } function errFun(obj,msg) { obj.html(msg); if(msg==''){ $('.login_submit').removeClass('dis'); }else { $('.login_submit').addClass('dis'); } } function validateFun(pat,val) { return pat.test(val); }