Skip to main content

ProbNet: A Unified Probabilistic Neural Network Framework for Classification and Regression Tasks

Project description

ProbNet: A Unified Probabilistic Neural Network Framework for Classification and Regression Tasks

GitHub release PyPI version PyPI - Python Version PyPI - Downloads Downloads Tests & Publishes to PyPI Documentation Status Chat DOI License: GPL v3


🌟 Overview

ProbNet is a lightweight and extensible Python library that provides a unified implementation of Probabilistic Neural Network (PNN) and its key variant, the General Regression Neural Network (GRNN). It supports both classification and regression tasks, making it suitable for a wide range of supervised learning applications.


🔧 Features

  • 🧠 Full implementation of PNN for classification
  • 📈 GRNN for regression modeling
  • 🔍 Scikit-learn compatible interface (fit, predict, score)
  • 🔄 Built-in support for many kernels and distance metrics
  • 🧪 Fast prototyping and evaluation
  • 🧩 Easily extendable and readable codebase
  • 📚 Auto-generated documentation with Sphinx
  • Probabilistic models: PnnClassifier, GrnnRegressor

📦 Installation

You can install the library using pip (once published to PyPI):

pip install probnet

After installation, you can import ProbNet as any other Python module:

$ python
>>> import probnet
>>> probnet.__version__

🚀 Quick Start

For Classification using PNN:

from probnet import PnnClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split

X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

model = PnnClassifier(sigma=0.1)
model.fit(X_train, y_train)
print("Accuracy:", model.score(X_test, y_test))

For Regression using GRNN:

from probnet import GrnnRegressor
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

X, y = load_diabetes(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

model = GrnnRegressor(sigma=0.5)
model.fit(X_train, y_train)
print("R2 Score:", model.score(X_test, y_test))

As can be seen, you do it like any model from Scikit-Learn library such as SVC, RF, DT,...

📚 Documentation

Documentation is available at: 👉 https://probnet.readthedocs.io

You can build the documentation locally:

cd docs
make html

🧪 Testing

You can run unit tests using:

pytest tests/

🤝 Contributing

We welcome contributions to ProbNet! If you have suggestions, improvements, or bug fixes, feel free to fork the repository, create a pull request, or open an issue.

📄 License

This project is licensed under the GPLv3 License. See the LICENSE file for more details.

Citation Request

Please include these citations if you plan to use this library:

@software{thieu20250503,
  author       = {Nguyen Van Thieu},
  title        = {ProbNet: A Unified Probabilistic Neural Network Framework for Classification and Regression Tasks},
  month        = may,
  year         = 2025,
  doi         = {10.6084/m9.figshare.28802435},
  url          = {https://github.com/thieu1995/ProbNet}
}

Official Links


Developed by: Thieu @ 2025

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

probnet-0.1.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

probnet-0.1.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file probnet-0.1.0.tar.gz.

File metadata

  • Download URL: probnet-0.1.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for probnet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 647f8debe7887e3e384500fd0b1b6285df02a4af80294c746b6ffd906710ecba
MD5 d2ead5390d18fbc16eebe9cae7666e57
BLAKE2b-256 dd47a0b994947aaf9547eef1e99f1a54966dcc5f0cf5f3c099a738c31ad2ae23

See more details on using hashes here.

File details

Details for the file probnet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: probnet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for probnet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8fb1fa355259a76f5e802c42cb436301fafe52306fc306853e0113683caf82e6
MD5 8d4833a095e3b70bd188982b7ca6ab68
BLAKE2b-256 890c600871c994db1109f5ffabb1c14cc07758a4afce6b73d7e621137fb5510d

See more details on using hashes here.

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