Giter Site home page Giter Site logo

keurfonluu / stochannpy Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 4.0 173 KB

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

License: MIT License

Python 100.00%
machine-learning neural-network stochastic-optimization particle-swarm-optimization differential-evolution cmaes python

stochannpy's Introduction

StochANNPy

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

Version:0.0.1
Author:Keurfon Luu
Web site:https://github.com/keurfonluu/stochannpy
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.

Features

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).

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))

Related works

  • StochOPy: StochOPy (STOCHastic OPtimization for PYthon) provides user-friendly routines to sample or optimize objective functions with the most popular algorithms.

References

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

stochannpy's People

Contributors

keurfonluu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.