-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge amount of data #36
Comments
For instance, my macbook CPU goes to 100% and gets stuck at the Here's my code: var BrainJSClassifier = require('natural-brain');
var classifier = new BrainJSClassifier();
var lorem = require("lorem-ipsum")
const word = () => lorem({ count: 1, units: "words" })
const cats = new Array(42).fill(0).map(word)
const ran = () => cats[Math.floor(Math.random() * cats.length)]
console.log("Generating")
for (var i = 0; i < 1000; ++i) {
classifier.addDocument(lorem({ count: 3 }), ran());
}
console.log("Training")
classifier.train();
console.log("Running")
console.log(classifier.classify('hi')); |
Lets work together to make this faster! |
Training with larger datasets can take a while and the lorem ipsum generator might generate conflicting classifications in which case the Neural Network will run up to 10000 iterations to get the error rate as low as possible (and training might fail if it didn't succeed). There are two options I can see for improving performance:
|
Will that work on Heroku, assuming that there is just on CPU?
That sounds good. |
How would this work with huge amount of data (e.g. thousands/millions of pairs), without freezing?
Nice project, btw!
The text was updated successfully, but these errors were encountered: