mind.js 介绍
Node.js和浏览器的灵活神经网络库,基本上学习如何进行预测,使用矩阵实现来处理训练数据并启用可配置的网络拓扑。您还可以即插即用已经学过的“思想”,这对您的应用程序非常有用。
特征
矢量化 - 使用矩阵实现来处理训练数据
可配置 - 允许您 自定义 网络拓扑
可插拔 - 下载/ 上传 已经学过的头脑
安装
yarn add node-mind使用const Mind = require('node-mind');/*** Letters.** - Imagine these # and . represent black and white pixels.*/const a = ch ara cter('.#####.' +'#.....#' +'#.....#' +'#######' +'#.....#' +'#.....#' +'#.....#')const b = ch ara cter('######.' +'#.....#' +'#.....#' +'######.' +'#.....#' +'#.....#' +'######.')const c = ch ara cter('#######' +'#......' +'#......' +'#......' +'#......' +'#......' +'#######')/*** Learn the letters A through C.*/const mind = new Mind({ activator: 'sigmoid' }).learn([{ input: a,output: map('a') },{ input: b,output: map('b') },{ input: c,output: map('c') }])/*** Predict the letter C,even with a pixel off.*/const result = mind.predict(ch ara cter('#######' +'#......' +'#......' +'#......' +'#......' +'##.....' +'#######'))console.log(result) // ~ 0.5/*** Turn the # into 1s and . into 0s.*/function ch ara cter(string) {return string.trim().split('').map(integer)function integer(symbol) {if ('#' === symbol) return 1if ('.' === symbol) return 0}}/*** Map letter to a number.*/function map(letter) {if (letter === 'a') return [ 0.1 ]if (letter === 'b') return [ 0.3 ]if (letter === 'c') return [ 0.5 ]return 0} 链接 : http://www.fly63.com/nav/2088网站地址 : http://stevenmiller888.github.io/mindjs.net/
GitHub: https://github.com/stevenmiller888/mind
网站描述: 一个 用JavaScript构建的神经网络库
mind.js官方网站
官方网站: http://stevenmiller888.github.io/mindjs.net/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did175684