Skip to content

Add Radial Basis Function Neural Network (RBFNN)  #12322

Closed

Description

@JeninaAngelin

Feature description

Radial Basis Function Neural Networks (RBFNNs) are a type of neural network that combines elements of clustering and function approximation, making them powerful for both regression and classification tasks. RBFNNs can efficiently model non-linear relationships with fewer parameters than traditional multilayer perceptrons, thanks to their unique architecture that uses radial basis functions (typically Gaussian) in the hidden layer.

This structure allows RBFNNs to approximate functions and decision boundaries with high accuracy while maintaining a relatively simple network structure.

Goals:

  • Implement an RBFNN class with train and predict functionalities.
  • Use Gaussian radial basis functions as hidden layer activations.
  • Include KMeans clustering for initializing RBF centers and least-squares fitting for output weights.

    Requirements:

  • Initialization: RBFNN class should initialize with num_centers and gamma for Gaussian spread.
  • Training: Add a train(x_data, y_data) method to:
  • Find RBF centers using KMeans.
  • Compute RBF activations for each input.
  • Calculate output weights through least-squares fitting.
  • Prediction: Implement a predict(x) method to calculate and return predictions based on learned weights.
  • Activity

    1. Tahmid019 commented on Oct 30, 2024

      @Tahmid019
    2. JeninaAngelin commented on Oct 30, 2024

      @JeninaAngelin
      Author

      I've submitted a PR but some tests are not passed

    3. cclauss commented on Sep 6, 2026

      @cclauss
      Member

      https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md#issues

      If you are interested in resolving an open issue, simply make a pull request with your proposed fix. We do not assign issues in this repo so please do not ask for permission to work on an issue.

      Do not create an issue to contribute an algorithm. Please submit a pull request instead.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    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