concept continuous perceptron in category machine learning

This is an excerpt from Manning's book Grokking Machine Learning.
The solution to the previous two problems is continuous logistic classifiers, or continuous perceptrons, which instead of answering a question with a ‘yes’ or ‘no’, they return a score between 0 and 1. A sentence with a low score such as 0.1 gets classified as sad, and a sentence with a high score such as 0.9 gets classified as happy. For the dog/cat/bird problem, three continuous perceptrons will return three different scores, and the prediction will be given by the classifier that gives the image the highest score. We’ll learn continuous logistic classifiers later in this book.
In chapter 4, we covered the perceptron, which is a type of classifier that uses the features of our data to make a prediction. The prediction can be 1 or 0. This is called a discrete perceptron, since it returns an answer from a discrete set. In this chapter we learn continuous perceptrons, which are called this because they return an answer that can be any number in the interval between 0 and 1. This answer can be interpreted as a probability in the sense that sentences with a higher score are more likely to be happy sentences, and viceversa. The way I visualize continuous perceptrons is similar to how I visualize discrete perceptrons: with a line (or high-dimensional plane) that separates two classes of data. The only difference is that the discrete perceptron predicts that everything to one side of the line has label 1, and to the other side has label 0, while the continuous perceptron assigns a value from 0 to 1 to all the points based on their position. Every point on the line gets a value of 0.5. This value means the model can’t decide if the sentence is happy or sad. For example, the sentence “Today is Tuesday” is neither happy or sad, so the model would assign it a score close to 0.5. Points in the positive region get scores larger than 0.5, where the points even further away from the 0.5 line in the positive direction get values closer to 1. Points in the negative region get scores smaller than 0.5, where again the farther points from the line get values closer to 0. No point gets a value of 1 or 0 (unless we consider points at infinity).
Figure 5.1. Left: The perceptron algorithm trains a discrete perceptron, where the predictions are 0 (happy) and 1(sad). Right: The logistic regression algorithm trains a continuous perceptron, where the predictions are numbers between 0 and 1 which indicate the predicted level of happiness.
![]()
Continuous logistic classifiers (or continuous perceptrons) are very similar to their discrete counterparts, except instead of making a discrete prediction such as 0 or 1, they predict any number between 0 and 1. Continuous perceptrons are more useful than discrete perceptrons, since they give us more information. Continuous perceptrons don’t just tell us which class the classifier predicts, but it also gives us a probability. It would assign low probabilities to points it predicts to have label 0, and high probabilities to points it predicts to have label 1. The log loss is an error function for continuous perceptrons. It is calculated separately for every point as the natural logarithm of the probability that the point is classified correctly according to its label.