[Question] Product Classification By Text
See original GitHub issueHi,
this is more of a question than a problem/bug.
We are trying to categorise/classify products in our database by their title. And we are doing this by training with a dictionary that we build ourselves for this purpose:
{
apparel: ['shirt', 'pants', 'shorts', ...],
shoes: ['shoe', 'shoes', 'laces', ...],
...
}
So the idea is to train the net in a way that whenever it sees one of these words in a product’s title it will classify the product accordingly (or more words from one of same category (apparel, shoes, …) are present).
We’ve tried a brain.NeuralNet
, brain.recurrent.LSTM
as well as brain.NeuralNet
in combination with a node text classifier: https://github.com/NaturalNode/natural#classifiers
Nothing really seems to deliver satisfying results, however. brain.NeuralNet
seems to lead nowhere as it is super slow and might take month or so to compute. The text classifier variation trains unbelievably fast and achieves a 0.005 error rate really quickly but the resulting net delivers wrong results 90% of the time.
The best results so far have been with brain.recurrent.LSTM
, but even after about 15k of iterations the error rate stays above ~ 0.026.
So, my question now is (actually multiple):
- Is there a better way to go about this?
- Do I just need more time and training to get a better error rate?
- Is there maybe a solution to this particular problem employing brain.js already that I’m just not aware of?
If someone with more experience in ML could point us into the right direction we’d be super happy 😃
Thanks a lot, Chris
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
This is, I think, related to this answer: https://github.com/BrainJS/brain.js/issues/434#issuecomment-528480859
You could try the solution outlined there (bag of words model), and let us know your findings.
We did not really deviate from the default config. We played around with
hiddenLayers
for a bit and tried usingrelu
as the LSTM activation function, but that’s about it.