# Clone the repository
git clone <repository-url>
cd EMNS
# Install dependencies
pip install -r requirements.txt
# Run the main demo
python lib_and_demo.py# Clone the repository
git clone <repository-url>
cd EMNS
# Install as a package
pip install .
# Or install in development mode
pip install -e .from lib_and_demo import EMNSNetwork, create_test_data
# Create test data
X_train, y_train = create_test_data(n_samples=100, n_features=2)
# Create EMNS network
network = EMNSNetwork(layer_sizes=[2, 8, 4, 1], mutation_rate=0.3)
# Train the network
history = network.train(X_train, y_train, epochs=200)
# Make predictions
predictions = network.predict(X_train[:5])# Run the main demonstration
python lib_and_demo.py
# Run additional examples
python example_usage.py- No Gradient Computation: Uses evolutionary principles instead of backpropagation
- Self-Organizing: Parameters develop resistance to protect important configurations
- Modular Architecture: Emerges naturally through resistance clustering
- Continual Learning: Can learn new tasks without forgetting previous ones
- Hardware Efficient: Linear complexity and highly parallelizable
lib_and_demo.py: Main EMNS implementation and demonstrationexample_usage.py: Additional usage examplesrequirements.txt: Python dependenciessetup.py: Package setup fileREADME.md: Detailed technical documentationINSTALL.md: This installation guide
- Python 3.7+
- NumPy 1.21.0+
- Matplotlib 3.5.0+
Make sure all dependencies are installed:
pip install --upgrade numpy matplotlibIf matplotlib plots don't show, try:
# On macOS with conda
conda install python.app
# Or use non-interactive backend
export MPLBACKEND=Agg- Reduce network size for faster training
- Lower mutation rate for more stable convergence
- Use fewer epochs for quick testing
- Read the detailed README.md for theoretical background
- Experiment with different network architectures
- Try the continual learning examples
- Modify mutation parameters for your specific use case
For questions or issues, refer to the README.md or contact the author.