Skip to content
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

[performance issue] classifier.train() is very slow - and classifier.trainParallel() is no longer available - what are the alternatives for optimization while training? #520

Closed
niftylettuce opened this issue Apr 24, 2020 · 2 comments

Comments

@niftylettuce
Copy link
Contributor

Since webworker-threads seems to have been deprecated, I'm curious what the new recommended approach is?

I also wanted to point out that trainParallel is not documented at all in the README.

@niftylettuce
Copy link
Contributor Author

I am using https://github.com/surmon-china/naivebayes as an alternative since this package's bayesian classifier is not production-ready

@Hugo-ter-Doest
Copy link
Collaborator

webworker-threads can be used but are optional. If the module is installed it will be used. In classifier.js:

try {
    var Threads = require('webworker-threads');
} catch (e) {
    // Since webworker-threads are optional, only thow if the module is found
    if (e.code !== 'MODULE_NOT_FOUND') throw e;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants