To implement BAM model, here are some essential consideration and approach-
- Consider the value of M, as BAM will be constructed with M pairs of patterns. Here the value of M is 4.
- Set A: Input Patterns
- Set B: Corresponsing Target Patterns
- Assign the neurons in input and output layer. Here, neurons in input layer are 6 and output layer are 3
- Compute the Weight Matrix using the BAM Algorithm
- Test the BAM model for the input patterns which will return the corresponding target patterns as output. As well as for each of the target patterns, the BAM model will return the corresponding input patterns.
Python Implementation of BAM:
Weight matrix: [[4 0 4] [4 0 4] [0 4 0] [0 4 0] [4 0 4] [4 0 4]] ------------------------------ Testing for input patterns: Set A Output of input pattern 1 [  ] Output of input pattern 2 [[-1] [-1] [-1]] Output of input pattern 3 [[ 1] [-1] [ 1]] Output of input pattern 4 [[-1] [ 1] [-1]] Testing for target patterns: Set B Output of target pattern 1 [     ] Output of target pattern 2 [[-1] [-1] [-1] [-1] [-1] [-1]] Output of target pattern 3 [[ 1] [ 1] [-1] [-1] [ 1] [ 1]] Output of target pattern 4 [[-1] [-1] [ 1] [ 1] [-1] [-1]]
Here, for each of the input patterns, the BAM model gives the correct target patterns and for the target patterns, the model also gives the corresponding input patterns.
Hence, it signifies that the BAM model is correctly implemented.
- ANN - Bidirectional Associative Memory (BAM)
- ANN - Bidirectional Associative Memory (BAM) Learning Algorithm
- ML | Naive Bayes Scratch Implementation using Python
- ML - Neural Network Implementation in C++ From Scratch
- Implementation of neural network from scratch using NumPy
- ANN - Implementation of Self Organizing Neural Network (SONN) from Scratch
- Implementation of Ridge Regression from Scratch using Python
- Implementation of Elastic Net Regression From Scratch
- Implementation of Lasso Regression From Scratch using Python
- Python Django | Google authentication and Fetching mails from scratch
- Deep Neural net with forward and back propagation from scratch - Python
- Linear Regression (Python Implementation)
- Bloom Filters - Introduction and Python Implementation
- Page Rank Algorithm and Implementation
- Random Walk (Implementation in Python)
- Conway's Game Of Life (Python Implementation)
- Decision tree implementation using Python
- Python implementation of automatic Tic Tac Toe game using random number
- Implementation of K Nearest Neighbors
- Implementation of Dynamic Array in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.