Skip to content

feed0/ann-perceptrons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ann Perceptrons

This project implements artificial neural networks (ANN) using perceptrons as per the ANN university subject.

  1. Sum Function
  2. Single Layer
  3. Single Layer and Training
  4. Multi Layer

0. Sum Function

The sum_function is designed to compute the sum of the products of corresponding elements from two lists: inputs and weights. This is a common operation in neural networks, particularly in the calculation of the net input to a neuron.
def sum_function(inputs, weights) -> float:
    '''
    Sum of the product of the inputs by the weights

    @return float: The Net Input / Pre-Activation result 
    '''

    ...

1. Single Layer Perceptron

In this section, we implement a simple step function, which is often used in academic settings to illustrate the basic principles of neural networks and perceptrons.
def step_function(net_input) -> int:
    '''
    1, if net_input >= 1
    0, if net_input < 1
    
    @return int: The Activation result
    '''
    
    ...

The following chart is made using both the Sum and Step functions

Step Function Plot