Add ability to define custom getter/setter methods for model data #8
Labels
🥳 enhancement
New feature or request
⚡️ performance
Performance related issues or possible enhancements
Add support for for passing custom methods to
Classifier
andModel
for defining custom getter/setter methods that allows us to bypass thedata
object literal that is currently stored directly as a property inModel
instances.For example:
There will be default
getData
andsetData
methods which work like in the current version (but still with some performance improvements like being asynchronous by default and where we optimize the way thedata
object is stored in memory).From there we can update the
train
andpredict
methods inClassifier
to call those, instead of the current behaviour of directly accessingthis._model.data
.When using the library in this way, the data that still remains in
Model
(and is accessible via theserialize
method) simply serves as general model meta data, and one would need to use the same custom data store every time the model is used later on.It should also be noted this needs to wait until the upcoming version where all methods have been rewritten to be asynchronous by default is has been released.
The text was updated successfully, but these errors were encountered: