Skip to content

This repository contains the python implementations of a few soft computing algorithms.

Notifications You must be signed in to change notification settings

ksaswin/Soft-Computing-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Soft Computing

This repository contains the python implementation for a few soft computing algorithms.

Implemented algorithms:

  • Hebb Net
  • Single layer perceptron
  • Multi layer perceptron (single hidden layer)

Cloning the repository

Clone the repository using:

  git clone https://github.com/ksaswin/Soft-Computing-Algorithms.git

Move into the cloned repository:

  cd Soft-Computing

Install the required dependencies:

  pip install -r requirements.txt

Usage/Examples

Import the packages from different modules using:

from hebbnet.hebb_net import HebbNet
from single_layer_perceptron.slp import SingleLayerPerceptron

Create the model for each algorithm using:

input_list = [[1, 1], [1, -1], [-1, 1], [-1, -1]]
targets = [1, -1, -1, -1]

hebb_model = HebbNet()
slp_model = SingleLayerPerceptron()

hebb_model.train_model(input_list, targets)
slp_model.train_model(input_list, targets, alpha=1, max_epochs=3)

The example above creates the models for a two input AND gate.

About

This repository contains the python implementations of a few soft computing algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages