官术网_书友最值得收藏!

Colaboratory

Colaboratory is a free and open source environment for Python development that requires no setup and runs entirely on the cloud. It contains all the pre-installed packages required for your AI implementations so that they are ready to run with a simple plug and play process. By plug, I just mean to copy and paste the code inside a new Colab file (I'll explain how to open one next), and by play, I just mean to click on the play button (an example of that follows).

Here is the link to the main page of Colaboratory:

https://colab.research.google.com/notebooks/welcome.ipynb

You should get a page like this:

Figure 2: Colaboratory – main page

Click File in the upper left, and then click New Python 3 notebook:

Figure 3: Colaboratory – opening a notebook

Then you will get this view. Paste your Python code inside the cell (red arrow). That's the "plug" part:

Figure 4: Colaboratory – the "plug" part

I recommend using separate Colaboratory notebooks for each model in this book.

Now let's see the "play" part. Open the Thompson Sampling model in the Chapter 06 folder, implemented inside the thompson_sampling.py file:

Figure 5: GitHub – opening Thompson Sampling

Copy the whole code from inside the Python file; don't worry about understanding the code (or the results) for now. It will all be explained, step by step, in Chapter 6, AI for Sales and Advertising – Sell like the Wolf of AI Street:

Figure 6: GitHub – copying Thompson Sampling

Next, paste it into Colaboratory (in the cell highlighted by the arrow in Figure 4). Then we get this:

Figure 7: Pasting Thompson Sampling

And now we are ready for the "play" part! Just click the "play" button below:

Figure 8: The "play" part

And the code will execute. Don't pay attention to the result now, as this will all be explained in Chapter 6, AI for Sales and Advertising – Sell like the Wolf of AI Street.

You are all set! You now have an AI toolkit that will enable you to follow along with every example in the book.

Before you begin your AI journey in earnest, you must make sure that you have the right basic coding knowledge. This is truly important before becoming a master at AI. If you have little or no experience with Python, make sure that you learn Python in Chapter 3, Python Fundamentals – Learn How to Code in Python, as a last preparation phase before you begin exploring the robot world.

主站蜘蛛池模板: 平利县| 家居| 寻乌县| 斗六市| 长岛县| 陈巴尔虎旗| 江西省| 陈巴尔虎旗| 阳原县| 环江| 手机| 长泰县| 资中县| 安平县| 大同县| 海淀区| 甘肃省| 临清市| 抚宁县| 白水县| 秀山| 潮州市| 民丰县| 林口县| 东海县| 江口县| 时尚| 阜新市| 庆城县| 开鲁县| 文水县| 南开区| 正定县| 福海县| 韶关市| 马龙县| 砚山县| 长海县| 高清| 阿拉尔市| 商河县|