Perceptron Model

The perceptron is a simple machine learning model that can classify data into two categories, like positive or negative, spam or not spam, and so on. It's one of the oldest and most fundamental models that laid the foundation for more advanced neural networks and deep learning techniques.

Imagine you have a collection of customer reviews, and you want to classify them as either positive or negative based on the words used in the review. The perceptron model looks at the number of times certain words appear in the review and uses that information to decide whether the review is positive or negative.

Here's how it works:

  1. First, we take a set of customer reviews that have already been labelled. This is our training data.
  2. To keep it simple in this example, we count the number of times the word "happy" appears and the number of times the word "sad" appears. See table 1 below.
  3. We plot these counts on a graph, with the "happy" count on one axis and the "sad" count on the other axis. Each review is represented by a point on the graph. See Image 1 below.
  4. The perceptron model then tries to find a line that separates the "happy" points from the "sad" points as best as possible. In this case the equation of the line is like ax1+bx2+c = 0. See Image 1 below. 
  5. Once we have this line, we can use it to classify new, unlabelled reviews. We count the "happy" and "sad" words in the new review, plot it on the graph, and see which side of the line it falls on. If the point falls on the "happy" side of the line, we classify the review as positive. If it falls on the "sad" side, we classify it as negative. In other words, if ax1+bx2+c>0 – Positive review; else negative. See Table 2 and Image 2 below.

While this is a simplified example using only two words, the perceptron model can be extended to consider more words or features, making it more accurate in classifying data. It's a basic building block for more complex machine learning models used in various applications today.







Comments

Popular posts from this blog

Logical and Physical Architecture

Data Models

Deep Learning