mind.js 介绍
Node.js和浏览器的灵活神经网络库,基本上学习如何进行预测,使用矩阵实现来处理训练数据并启用可配置的网络拓扑。您还可以即插即用已经学过的“思想”,这对您的应用程序非常有用。
特征
矢量化 - 使用矩阵实现来处理训练数据
可配置 - 允许您自定义网络拓扑
可插拔 - 下载/上传已经学过的头脑
安装
yarn add node-mind使用const Mind = require('node-mind');/*** Letters.** - Imagine these # and . represent black and white pixels.*/const a = character('.#####.' +'#.....#' +'#.....#' +'#######' +'#.....#' +'#.....#' +'#.....#')const b = character('######.' +'#.....#' +'#.....#' +'######.' +'#.....#' +'#.....#' +'######.')const c = character('#######' +'#......' +'#......' +'#......' +'#......' +'#......' +'#######')/*** 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(character('#######' +'#......' +'#......' +'#......' +'#......' +'##.....' +'#######'))console.log(result) // ~ 0.5/*** Turn the # into 1s and . into 0s.*/function character(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:@L_502_1@
网站描述:一个用JavaScript构建的神经网络库
mind.js
官方网站:http://stevenmiller888.github.io/mindjs.net/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。