Components of a Perceptron
- Input Features (x): Predictions are based on the characteristics or qualities of the input data, or input features (x). A number value is used to represent each feature. The two classes in binary classification are commonly represented by the numbers 0 (negative class) and 1 (positive class).
- Input Weights (w): Each input information has a weight (w), which establishes its significance when formulating predictions. The weights are numerical numbers as well and are either initialized to zeros or small random values.
- Weighted Sum (): To calculate the weighted sum, use the dot product of the input features’ (x) weights and their associated features’ (w) weights. Mathematically, it is written as .
- Activation Function (Step Function) : The activation function, which is commonly a step function, is applied to the weighted sum (). If the weighted total exceeds a predetermined threshold, the step function is utilized to decide the perceptron’s output. The output is 1 (positive class) if is greater than or equal to the threshold and 0 (negative class) otherwise.
Perceptron Algorithm for Classification using Sklearn
Assigning a label or category to an input based on its features is the fundamental task of classification in machine learning. One of the earliest and most straightforward machine learning techniques for binary classification is the perceptron. It serves as the framework for more sophisticated neural networks. This post will examine how to use Scikit-Learn, a well-known Python machine-learning toolkit, to conduct binary classification using the Perceptron algorithm.
Contact Us