Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Deep Belief Network (DBN) using Restricted Boltzmann Machines - Pure NumPy Implementation #13643

Open
Labels
enhancementThis PR modified some existing files
@Adhithya-Laxman

Description

Feature description

Feature Request: Add Deep Belief Network (DBN) Implementation

Description

I would like to contribute a Deep Belief Network (DBN) implementation using stacked Restricted Boltzmann Machines (RBMs) to the neural network module.

Key Features

  • Pure NumPy implementation with no external deep learning frameworks (no PyTorch, TensorFlow, etc.)
  • Layer-wise unsupervised pretraining using Contrastive Divergence (CD-k)
  • Implements Gibbs sampling for probabilistic binary units
  • Manual weight updates and gradient computation for educational transparency
  • Includes usage example demonstrating training and reconstruction

Purpose

  • Adds a generative probabilistic model to the repository, complementing existing discriminative models
  • Provides educational value by showing fundamental unsupervised learning algorithms
  • Minimal dependencies (only NumPy required)
  • Follows repository coding standards (PEP8, docstrings, examples)

Implementation Details

  • File location: neural_network/deep_belief_network.py
  • Includes both RBM and DeepBeliefNetwork classes
  • Fully documented with comprehensive docstrings
  • Includes working example in __main__ block

I am ready to submit a pull request following the contribution guidelines. Please let me know if this addition would be welcomed!

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /