StochANNPy (STOCHAstic Artificial Neural Network for PYthon) provides user-friendly routines compatible with Scikit-Learn for stochastic learning.
Project description
Summary
- Version:
0.0.1b1
- Author:
Keurfon Luu
- Web site:
- Copyright:
This document has been placed in the public domain.
- License:
StochOPy 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.
Features
StochANNPy provides routines for stochastic neural networks:
Bayesian neural networks [1]
Evolutionary neural networks
NOTE: for now, only classifier has been implemented. Regressor will come later.
Installation
The recommended way to install StochANNPy is through pip:
pip install stochannpy
Otherwise, download and extract the package, then run:
python setup.py install
Usage
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:
clf.fit(X_train, y_train)
Predict the test set:
ypred = clf.predict(X_test)
Compute the accuracy:
print(np.mean(ypred == y_test))
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.