Eine TypeScript/JavaScript Library für ML im Browser
npm install deept.jshtml
`
- #### NPM
`bash
$ npm i deep-thought.js --save
`
- #### >> DOWNLOAD
Dokumentation
Eine vollständige Dokumentation der Library ist hier verfügbar.
Example
So würde es aussehen die Library über NPM zu installieren und zu nutzen.
> Project
`bash
root
|- package.json
|- src/
|- app.js
`
> Install
`bash
$ npm i deep-thought.js --save
`
> Project
`bash
root
|- node_modules/
|- package.json
|- package-lock.json
|- src/
|- app.js
`
> ./src/app.js
`javascript
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);
});
`
Getting Involved
$3
$3
`bash
$ npm install
`
$3
$3
`bash
$ npm run build
`
$3
Das endgültige Build-Produkt ist ./dist/DeepThought.js.
Der Ordner ./temp/` ist nur der compilierte JavaScript code.