I cleaned up and renames the function textmodel_slstm() to better reflect the model. It also now passes the checks.
It still needs:
[ ] examples, which (will quickly show how it does not work yet)
[ ] tests, similar to those in tests/testthat/test-textmodel_svm.R
[ ] needs to input quanteda dfms for x and handle the data type and missings for y exactly as textmodel_svm() does. This implies that there should be a generic and a method for .dfm, exactly as for the svm function. To pass through the object that keras will need to predict, this can be wrapped inside the object in the way that textmodel_svm() does.
[ ] predict.textmodel_slstm() will need to be a method for a classed fitted model object from textmodel_slstm()
[ ] predict.textmodel_slstm() needs to output predictions in a similar format to predict.textmodel_svm().
I cleaned up and renames the function
textmodel_slstm()
to better reflect the model. It also now passes the checks.It still needs:
tests/testthat/test-textmodel_svm.R
x
and handle the data type and missings fory
exactly astextmodel_svm()
does. This implies that there should be a generic and a method for .dfm, exactly as for the svm function. To pass through the object that keras will need to predict, this can be wrapped inside the object in the way thattextmodel_svm()
does.predict.textmodel_slstm()
will need to be a method for a classed fitted model object fromtextmodel_slstm()
predict.textmodel_slstm()
needs to output predictions in a similar format topredict.textmodel_svm()
.