Skip to content

SimplePerceptronModel

Barry Stahl edited this page Jan 13, 2025 · 4 revisions

Crafting AI - Simple Perceptron Model

This c# solution demonstrates the train/test/predict cycle for a more complex model, a single-layer perceptron that supports activation. In this example, we use the same Congressional Voting Model that we used in the Voting Amoebas demo, in this case using the more conventional training method Gradient Descent to learn the parameter values.

Linear Regression Model

Note: If no activation function is used by supplying Activations.None when constructing the model, the results are purely linear. It is only by using a non-linear activation function such as Activations.Sigmoid that the model can make predictions on non-linear functions.

Clone this wiki locally