Skip to content

Perceptron Algorithm implementation in Java. Implementation of Perceptron Algorithm to solve a simple classification problem and show the algorithm limitations, using the logical operations AND, OR and XOR.

Notifications You must be signed in to change notification settings

DanielGunna/Perceptron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perceptron Algorithm implementation in Java

Implementation of Perceptron Algorithm to solve a simple classification problem and show the algorithm limitations, using the logical operations AND, OR and XOR. A simple user interface, that loads a file, was implemented to help the user handle the inputs which Perceptron algorithm uses.

Using implementaion of Perceptron Algorithm Logic

//An array with multiple inputs to be solved
 
 double[] input  = {0, 0,0,0,0,0,0,0,0};
 
 PerceptronSolver p = new PerceptronSolver();
 
 // The method that train the Perceptron Algorithm and evaluate the results 
 //The params are : input, threshold, learn rate, number of iterations and operation 
 p.train(vet, 0.0, 0.3f, 500,OperationType.OR);
 
 //Get the result 
 p.getResult();

The possible operations are:

These operations are defined in an enum contained on the OperationType.java file.

 p.train(vet, 0.0, 0.3f, 500,OperationType.AND);
 p.train(vet, 0.0, 0.3f, 500,OperationType.OR);
 p.train(vet, 0.0, 0.3f, 500,OperationType.XOR);

About

Perceptron Algorithm implementation in Java. Implementation of Perceptron Algorithm to solve a simple classification problem and show the algorithm limitations, using the logical operations AND, OR and XOR.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages