erelsgl / limdu

Machine-learning for Node.js
GNU Lesser General Public License v3.0
1.05k stars 99 forks source link

Dataset mutation #62

Open Berkmann18 opened 5 years ago

Berkmann18 commented 5 years ago

After running unit tests on a project that uses limdu, I noticed that once the classifiers train method is called, the dataset is being mutated. What I mean by this is that I have a class Learner that has a dataset field and a classifier one (which is similar to intentClassifier in the examples). dataset has the [ { input: 'string', output: 'category string' }, ...] structure, after train() is called on say Learner.classifier, the dataset (so both the training and testing sets) has outputs being arrays with the strings.

I'm not sure if it's intended or if the format (post-mutation) is what should be used instead of what's in the docs.

Ref: https://github.com/all-contributors/ac-learn/tree/limdu