Skip to content

python to implement perceptron learning algorithm

Notifications You must be signed in to change notification settings

Kalkula/PLA-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLA-algorithm

python to implement perceptron learning algorithm #project: linear separatable Perceptron-learing-algorithm

#python version: 3.7.3

#OS: windows10

#author: Yangzhao Qin

#file type Both ".py".

#instructions: I wrote two programs in this hw1 file.You may use Anaconda or command board to run this two program. One is "dataemit.py",which is used to generate training data.You should open this program first. Ooen it then you have to input the "the number of '+'" and "the number of '-'" which are the "m" and "n" in the homework requests. Then you should give the vector named "w" after the "w=" in the format of "[w0,w1,w2]". Then this program will generate a text file called "train.txt" as the professor asked. The second one called "PLA.py" will utilize the data in "train.txt" and then get the trained weight "w". If you run it,it will generate a picture called "pla.png",which depicts the scatter marks and the perceptron line, and a text file called "PLAtrain.txt" contains the weight we learned.

#notice: 1.Please enter some value in "dataemit.py" input process,otherwise there will be errors. 2.Enter "w" in the format of "[w0,w1,w2]". 3.Run programs in the order of "'dataemit.py'-->'PLA.py'".

About

python to implement perceptron learning algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages