Spyder:Python中机器学习的强大武器
So, first of all, you would need to install Anaconda distribution which can be downloaded from the link https://www.anaconda.com/download/ (for Windows users only).
因此,首先,您需要安裝Anaconda發(fā)行版 ,可以從鏈接https://www.anaconda.com/download/下載(僅限Windows用戶)。
The installation is pretty simple just keep on clicking next and agree to terms and conditions. So, the reason for installing Anaconda is that it comes with a lot of preinstalled packages and Spyder is one of them. After installing the software just click on the anaconda icon on the desktop or go to the search option in windows 10 and type in anaconda navigator, for the Ubuntu users you can install anaconda using the terminal. As you open the navigator you will see the anaconda GUI which looks like this:
安裝非常簡單,只需繼續(xù)單擊下一步并同意條款和條件即可。 因此,安裝Anaconda的原因是它附帶了許多預(yù)安裝的軟件包,而Spyder就是其中之一。 安裝軟件后,只需單擊桌面上的anaconda圖標(biāo)或轉(zhuǎn)到Windows 10中的搜索選項,然后鍵入anaconda導(dǎo)航器,對于Ubuntu用戶,您可以使用終端安裝anaconda。 打開導(dǎo)航器時,您將看到anaconda GUI,如下所示:
Screenshot-0
屏幕截圖-0
From here just click on the launch button below the Spyder and a new Spyder GUI will be opened in a separate window:
在這里,只需單擊Spyder下方的啟動按鈕,就會在單獨的窗口中打開一個新的Spyder GUI:
Screenshot-1
屏幕截圖1
.minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}} .minHeight{min-height: 250px;}@media (min-width: 1025px){.minHeight{min-height: 90px;}}As you can see by default a new .py file named untitled2.py has been created. Untitled2 is the name of the file in which you will be writing your python code.
如您所見,默認(rèn)情況下,已創(chuàng)建一個名為untitled2.py的新.py文件 。 Untitled2是將在其中編寫python代碼的文件的名稱。
Here, I would be highlighting some of the basic features that important features and would be explaining them to you:
在這里,我將重點介紹一些重要功能的一些基本功能,并向您解釋它們:
Screenshot-2
屏幕截圖2
The portion marked in sky blue is used to set the directory of the file to be opened, in the previous article (Linear Regression in Machine Learning) I had mentioned in my code that I have stored the source code and .csv file in the same folder so after you save those 2 files in the same folder you can just go to this set directory option and select the folder in which you have stored the two files.
在上一篇文章( 機器學(xué)習(xí)中的線性回歸)中 ,用天藍(lán)色標(biāo)記的部分用于設(shè)置要打開的文件的目錄,我在代碼中提到將源代碼和.csv文件存儲在同一目錄中。文件夾,因此在將這2個文件保存在同一文件夾中之后,您只需轉(zhuǎn)到此設(shè)置目錄選項,然后選擇存儲兩個文件的文件夾即可。
The portion marked in orange is the variable explorer this basically shows us the info about all the variables that we have created, after selecting your code using ctrlA and compiling your code using shift-enter just click on this option you will see the following:
用橙色標(biāo)記的部分是變量瀏覽器,它基本上向我們顯示了我們創(chuàng)建的所有變量的信息,在使用ctrlA選擇代碼并使用shift-enter編譯代碼之后,只需單擊此選項,您將看到以下內(nèi)容:
Screenshot-3
屏幕截圖3
On the upper right of this screen you will see a box containing some names below the name column such as x_test, x_train etc these are the variables I have used and below the type column, you’ll see their datatype. As you move further right you can see size as well as the values stored.
在此屏幕的右上角,您將在名稱列下方看到一個包含一些名稱的框,例如x_test , x_train等,這些是我使用的變量,在類型列下方,您將看到其數(shù)據(jù)類型。 向右移動時,您可以看到大小以及存儲的值。
As you go back to screenshot-2 you will see another portion marked in dark blue. The area marked is known as the file explorer and the main purpose of the file explorer is to select the files and load it on your Spyder. It also allows you to have a glimpse of the files present in the particular directory that you have selected.
回到屏幕快照2,您將看到另一部分標(biāo)記為深藍(lán)色。 標(biāo)記為的區(qū)域稱為文件瀏覽器,文件瀏覽器的主要目的是選擇文件并將其加載到Spyder上。 它還使您可以瀏覽所選特定目錄中的文件。
And at last but not the least you’ll see the IPython console option marked with black ink in screenshot-2. IPython is basically a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history.
最后但并非最不重要的一點是,您將在screenshot-2中看到用黑色墨水標(biāo)記的IPython控制臺選項。 IPython基本上是用于多種編程語言進(jìn)行交互式計算的命令外殼,最初是為Python編程語言開發(fā)的,提供自省,富媒體,外殼語法,制表符補全和歷史記錄。
These are some of the basic features that Spyder offers, however, there are my more just install Anaconda see for yourself.
這些是Spyder提供的一些基本功能,但是,我還有更多安裝Anaconda的功能。
翻譯自: https://www.includehelp.com/ml-ai/spyder-a-powerful-weapon-for-machine-learning-in-python.aspx
總結(jié)
以上是生活随笔為你收集整理的Spyder:Python中机器学习的强大武器的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 11个小技巧,玩转Spring!
- 下一篇: 50行代码,搞定敏感数据读写!