Question

Implement the Perceptron learning algorithm in any language.
Test your program for the following two problems:
a:
x0 x1 x2 y (class)
1   0   0      0
1   0   1      1
1   1   0      1
1   1   1      1
b:
x0 x1 x2 y (class)
1   0   0      0
1   0   1      0
1   1   0      0
1   1   1      1

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

The explanation of the program is quite straightforward. First of all, it was necessary to declare the needed constants as it follows:
The initial weights were chosen { -1.1, 1.5, 1.9}.
double boundary = 1.3; //threshold value
double learning = 0.05; //perceptron's learning rate (this must be small enough in order to catch enough stages of the training for the provided data set).
After that were declared the two data sets used for test cases (x0,x1,x2 and y).
The training of the data set is done in several steps included in a loop structure.
First of all, the evaluation of the weighted input was done using the formula Sum(xi*weight[i]), i=0,1 and 2...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Artificial Intelligence Questions
Homework Solution
$48.00
Artificial Intelligence
Mathematics
Bayesian Filter
Probability
Training Data
Tables
Variables
Computation
K-Nearest Neighbor
Algorithms
Prediction
DaVinci Code
Spreadsheets
Functions
Operating System Schedule Simulation
Homework Solution
$25.00
Programming
Computer Science
Operating Systems
Schedule Simulation
Processes
Threads
Tasks
Jobs
Algorithms
Round Robin
Java
FCFS
Methods
Variables
Statements
Input
Output
Superhero Fight in C++
Homework Solution
$35.00
Programming
Classes
Vectors
Operators
Pointers
Computer Science
Superhero Fight
Game Developments
C++
OOP
Powers
Drivers
Lasers
Strength
Variables
Loops
Statements
Interfaces
Strings
Integers
Random Functions
Input
Output
Computer Science Problems
Homework Solution
$30.00
Computer Science
Linux
C Programming Language
Kernel Source Tree
Systems
Numbers
Architecture
Integers
Input
Output
Strace Utility
Basic Commands
Algorithms
File Management
Compilers
Creating Your Personal Webpage
Homework Solution
$15.00
Web Development
Computer Science
Programming
Design
HTML
CSS
Attributes
Fonts
Tables
Buttons
Text Colors
Images
Headers
Links
Functions
Variables
Statements
Get help from a qualified tutor
Live Chats