1 of 4

Cookbook for Practice 10.1

Cong Li 李聪

实践10.1攻略

2 of 4

Generate Data 生成数据

Base on Practice 4.1 & take ‘perceptron.py’ from Practice 9.1

基于实践4.1,从实践9.1中获取“perceptron.py”

In ‘test.py’, rewrite the function ‘generate_data’

在“test.py”中,重写“generate_data”函数

3 of 4

Run It 运行之

Replace the nearest neighbor related lines w/ the perceptron related lines

把最近邻相关的语句换成感知器相关的语句

Run w/ the command line below 用以下命令行运行

test.py 50

4 of 4

The End