Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

StochANNPy (STOCHAstic Artificial Neural Network for PYthon) provides user-friendly routines compatible with Scikit-Learn for stochastic learning.

Project Description


Author:Keurfon Luu
Web site:
Copyright:This document has been placed in the public domain.
License:StochANNPy is released under the MIT License.

NOTE: StochANNPy has been implemented in the frame of my Ph. D. thesis. If you find any error or bug, or if you have any suggestion, please don’t hesitate to contact me.


StochANNPy provides routines compatible with Scikit-Learn for stochastic learning including:

  • Bayesian neural networks (currently, only classifier) [1]
  • Evolutionary neural networks (currently, only classifier)
  • Monte-Carlo Cross-Validation (currently, only classifier)

NOTE: ENNClassifier, BNNClassifier, MCCVClassifier all passed Scikit-Learn checks test! …well almost. Bayesian learning requires more than 5 samples to explore the weight space, BNNClassifier only pass when increasing the maximum number of iterations (line 280 of the script).


The recommended way to install StochANNPy is through pip:

pip install stochannpy

Otherwise, download and extract the package, then run:

python install


First, import StochANNPy and initialize the classifier:

import numpy as np
from stochannpy import BNNClassifier

clf = BNNClassifier(hidden_layer_sizes = (5,))

Fit the training set:, y_train)

Predict the test set:

ypred = clf.predict(X_test)

Compute the accuracy:

print(np.mean(ypred == y_test))


[1]N. Radford, Bayesian Learning for Neural Networks, Lecture Notes in Statistics, Springer, 1996
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
stochannpy-0.0.1b4.tar.gz (25.4 kB) Copy SHA256 Checksum SHA256 Source May 12, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting