项目作者: narendraj9

项目描述 :
Machine Learning in Emacs Lisp
高级语言: Emacs Lisp
项目地址: git://github.com/narendraj9/emlib.git
创建时间: 2016-10-15T16:41:26Z
项目社区:https://github.com/narendraj9/emlib

开源协议:GNU General Public License v3.0

下载


emlib

A humble Machine Learning library. Currently, there is a simple implementation
of feedforward networks with learning rate, momemtum and a few parameters
hard-coded. The API would be changed in the future. The idea behind sharing it
is to get more people involved in the development.

Usage

  1. (require 'emlib)
  2. ;; Let's define some data with three-dimensional inputs and a scalar
  3. ;; output.
  4. (setq data '(([1 0 0] . [0]) ([1 0 1] . [1]) ([1 1 1] . [0])))
  5. ;; Now, let's create and train a neural network with 4 nodes in a
  6. ;; hidden layer.
  7. (let ((my-nn (emlib-nn-create 3 4 1)))
  8. (dotimes (i 1000)
  9. (dolist (input-output data)
  10. (message "Feeding to the network <%s, %s> "
  11. (car input-output)
  12. (cdr input-output))
  13. (emlib-nn-train my-nn (car input-output) (cdr input-output)))))
  14. (message "Output for [1 0 0]: %s" (emlib-nn-feed my-nn [1 0 0]))
  15. NOTE: The API is definitelly going to change as this project is in its early
  16. stage. The idea behind sharing this is to make more people involved so that it
  17. is better than what I can make it alone.