Skip to main content

Cascade Correlation Neural Network implementation for the Juniper project

Project description

Juniper: Dynamic Neural Network Research Platform

CI/CD Pipeline

Version: 0.6.3 | Changelog | Full Documentation

Juniper is an AI/ML research platform for investigating dynamic neural network architectures and novel learning paradigms. The project emphasizes ground-up implementations from primary literature, enabling a more transparent exploration of fundamental algorithms.

Ecosystem Compatibility

This service is part of the Juniper ecosystem. Verified compatible versions:

juniper-data juniper-cascor juniper-canopy data-client cascor-client cascor-worker
0.4.x 0.3.x 0.2.x >=0.3.1 >=0.1.0 >=0.1.0

For full-stack Docker deployment and integration tests, see juniper-deploy.

Architecture

JuniperCascor is the training service of the Juniper ecosystem. It depends on JuniperData for datasets and is monitored by juniper-canopy in real-time.

┌─────────────────────┐     REST+WS      ┌──────────────────────┐
│   juniper-canopy     │ ◄──────────────► │  JuniperCascor       │
│   Dashboard         │                  │  Training Svc        │
│   Port 8050         │                  │  Port 8200  ◄── here │
└──────────┬──────────┘                  └──────────┬───────────┘
           │ REST                                    │ REST
           ▼                                         ▼
┌──────────────────────────────────────────────────────────────┐
│                      JuniperData                              │
│                   Dataset Service  ·  Port 8100               │
└──────────────────────────────────────────────────────────────┘

API: REST + WebSocket (/ws/training, /ws/control). All responses use a {status, data, meta} envelope.

Related Services

Service Relationship Notes
juniper-data JuniperCascor fetches datasets from here Set JUNIPER_DATA_URL
juniper-canopy Monitors CasCor training in real-time Connects to /ws/training
juniper-cascor-client PyPI REST+WS client library pip install juniper-cascor-client

Service Configuration

Variable Required Default Description
JUNIPER_DATA_URL Yes http://localhost:8100 JuniperData service URL
CASCOR_HOST No 0.0.0.0 Listen address
CASCOR_PORT No 8200 Service port
CASCOR_LOG_LEVEL No INFO Log verbosity (DEBUG, INFO, WARNING)

Docker Deployment

# Standalone:
docker build -t juniper-cascor:latest .
docker run -p 8200:8200 -e JUNIPER_DATA_URL=http://host.docker.internal:8100 juniper-cascor:latest

# Full stack:
git clone https://github.com/pcalnon/juniper-deploy.git
cd juniper-deploy && docker compose up --build

Quick Start

Prerequisites

  • Python 3.11 or later (3.14 recommended)
  • Conda package manager

Installation

# Clone the repository
git clone https://github.com/pcalnon/juniper-cascor.git
cd juniper-cascor

# Create and activate conda environment
conda env create -f conf/conda_environment.yaml
conda activate juniper_cascor

# Run the spiral problem evaluation
cd src && python main.py

Run Tests

# Fast tests (recommended for development)
cd src/tests && bash scripts/run_tests.bash

# Or using pytest directly
pytest -m "not slow" -v

For detailed installation instructions, see the Quick Start Guide.

Active Research Components

juniper_cascor: Cascade Correlation Neural Network

  • Reference implementation from foundational research (Fahlman & Lebiere, 1990)
  • Designed for flexibility, modularity, and scalability
  • Enables investigation of constructive learning algorithms

juniper_canopy: Interactive Research Interface

  • Research-driven monitoring and visualization environment
  • Delivers novel observations through real-time network introspection
  • Transforms metrics into insights, accelerating experimental iteration

Documentation

Category Description
Documentation Overview Complete navigation guide to all docs
Documentation Index Quick documentation index
Quick Start Get up and running quickly
User Manual Comprehensive usage guide
API Reference Complete API documentation
Testing Guide Testing instructions
CI/CD Guide Continuous integration
Source Code Guide Contributor documentation
Constants Reference Configuration constants

Basic Usage

from cascade_correlation.cascade_correlation import CascadeCorrelationNetwork
from cascade_correlation.cascade_correlation_config.cascade_correlation_config import CascadeCorrelationConfig
import torch

# Create configuration
config = CascadeCorrelationConfig(
    input_size=2,
    output_size=2,
    random_seed=42
)

# Create and train network
network = CascadeCorrelationNetwork(config=config)
history = network.fit(x_train, y_train, epochs=100)

# Evaluate
accuracy = network.get_accuracy(x_test, y_test)
print(f"Test accuracy: {accuracy:.2%}")

# Save/Load
network.save_to_hdf5("model.h5")
loaded = CascadeCorrelationNetwork.load_from_hdf5("model.h5")

Research Philosophy

Juniper prioritizes transparency over convenience and understanding over abstraction. By implementing algorithms from first principles, the platform provides researchers with increased visibility into network behavior, enabling a more rigorous and more controlled investigation of learning dynamics and architectural innovations.

Important Notices

Thread Safety Warning

The CascadeCorrelationNetwork class is NOT thread-safe. Do not share network instances between threads without proper synchronization. For concurrent training scenarios, create separate network instances per thread. The internal multiprocessing for candidate training is handled within the class and does not require external synchronization.

Juniper Ecosystem

Repository Description
juniper-cascor CasCor neural network training service (this repo)
juniper-canopy Real-time monitoring dashboard
juniper-data Dataset generation service
juniper-data-client PyPI: juniper-data-client
juniper-cascor-client PyPI: juniper-cascor-client
juniper-cascor-worker PyPI: juniper-cascor-worker

License

MIT License - see LICENSE for details.

Contributing

Contributions are welcome. Please see the Source Code Guide for development setup and coding conventions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juniper_cascor-0.3.17.tar.gz (385.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

juniper_cascor-0.3.17-py3-none-any.whl (692.1 kB view details)

Uploaded Python 3

File details

Details for the file juniper_cascor-0.3.17.tar.gz.

File metadata

  • Download URL: juniper_cascor-0.3.17.tar.gz
  • Upload date:
  • Size: 385.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for juniper_cascor-0.3.17.tar.gz
Algorithm Hash digest
SHA256 cc970b189745025dcab15a228b7448ab5581dab260022072c9a041574a01f416
MD5 153a9b6ab9ad553c6244cddac2bb36d7
BLAKE2b-256 f3b4651b3931e8c2054ab12611c0f67f9bd9057aaabc72f92cbb17462a0e163c

See more details on using hashes here.

Provenance

The following attestation bundles were made for juniper_cascor-0.3.17.tar.gz:

Publisher: publish.yml on pcalnon/juniper-cascor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file juniper_cascor-0.3.17-py3-none-any.whl.

File metadata

  • Download URL: juniper_cascor-0.3.17-py3-none-any.whl
  • Upload date:
  • Size: 692.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for juniper_cascor-0.3.17-py3-none-any.whl
Algorithm Hash digest
SHA256 31407c9c46aae02b0e1b77804fa16126495a85e97b3bb578418d1c950a343639
MD5 351ef3ca127397b0420f7878716e49e1
BLAKE2b-256 9d35e5bc6e06a3e1a079254b0c3d9e43532ad7ce215360a3f6d2f00d961bb194

See more details on using hashes here.

Provenance

The following attestation bundles were made for juniper_cascor-0.3.17-py3-none-any.whl:

Publisher: publish.yml on pcalnon/juniper-cascor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page