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.
After running unit tests on a project that uses
limdu
, I noticed that once the classifierstrain
method is called, the dataset is being mutated. What I mean by this is that I have a classLearner
that has adataset
field and aclassifier
one (which is similar tointentClassifier
in the examples).dataset
has the[ { input: 'string', output: 'category string' }, ...]
structure, aftertrain()
is called on sayLearner.classifier
, thedataset
(so both the training and testing sets) hasoutput
s 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