DeepThought.js ist eine JavaScript Library für Machine Learning im Browser. Es baut auf der Toy-Neural-Network-JS Library von Daniel Shiffmann auf und erweitert diese mit der möglichkeit für Multi-Layer-Netzwerke. Mehrere Trainingsfunktionen wie Back-Propagation und ein Genetischer Algorythmus sollen mit eingebaut werden.
<script src="https://lavakonsti.github.io/DeepThought.js/beta/DeepThought.min.js" charset="utf-8"></script>
$ npm i deep-thought.js --save
-
>> DOWNLOAD
Eine vollständige Dokumentation der Library ist hier verfügbar.
So würde es aussehen die Library über NPM zu installieren und zu nutzen.
Project
root
|- package.json
|- src/
|- app.js
Install
$ npm i deep-thought.js --save
Project
root
|- node_modules/
|- package.json
|- package-lock.json
|- src/
|- app.js
./src/app.js
const dt = require('deep-thought.js');
const nn = new dt.NeuralNetwork();
// init and add the layers
let layers = [
{ type: 'input', nodes: 2},
{ type: 'hidden', nodes: 4}, // NOTE: order of the hidden layers is important
{ type: 'hidden', nodes: 4},
{ type: 'output', nodes: 2}
];
// add the initialized layers to the Network
nn.addLayers(layers);
// train the neural network
nn.train([trainingDataSet], {
iterations: 3000000,
print: true,
test: true
});
// Use it
nn.predict([data], (result) => {
console.log(result);
});
$ npm install
$ npm run build
Das endgültige Build-Produkt ist ./dist/DeepThought.js
.
Der Ordner ./temp/
ist nur der compilierte JavaScript code.
Dieser wird für das NPM Package verwendet.
- 🎨 Format/Structure
- 📝 Documentation
- 💥 new Feature
- 🐛 Bugfix
- 🔥 Code or Files deleted
- 🔧 Work In Progress
- 🌟 Enhancement
Die Library ist unter der MIT License verfügbar.
Mehr über die License hier.