Skip to content

Commit

Permalink
Create neuralNetwork.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 21, 2024
1 parent 4b4a2a3 commit a4c9903
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions utils/neuralNetwork.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// neuralNetwork.js
import * as NeuralNetwork from 'neural-network';

const neuralNetworkUtils = {
createNeuralNetwork: (architecture) => {
return new NeuralNetwork.NeuralNetwork(architecture);
},
trainNeuralNetwork: (neuralNetwork, dataset) => {
return neuralNetwork.train(dataset);
},
predictWithNeuralNetwork: (neuralNetwork, input) => {
return neuralNetwork.predict(input);
},
};

export default neuralNetworkUtils;

0 comments on commit a4c9903

Please sign in to comment.