-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stringdot text classification input format #11
Comments
#9 (comment) this is one of the kernels I had initially skipped. The example below works but not sure how to bind in parsnip in a tidy way. Using the underlying package, I have to format two lists, instead of data.frame and formula ..
The issue is the non-tidy inputs for text, both being lists. This kernel doesn't seem to work with data.frames or formulas. Are there any engines already bound to parsnip that require this type of (x,y) list input? I sifted through a few source codes but didn't see any. I was hoping to handle the lists in the model registration, even if this kernel only works with fit_xy. Appreciate any guidance before I go in the wrong direction wrapping ksvm with another function converting formula and data.frame into lists for this kernel. |
Ahhh, hm. The What we do in some situations where fit functions don't have an interface that aligns with parsnip's expectation is write our own wrappers that either take formula + data or x + y (where x is a data.frame) and then do minimal conversions to interface with the modeling engine itself. So, in this example, you'd write a wrapper (say, |
thanks for the feedback @simonpcouch! Will do some testing, I was on route to do the second option (a minimal wrapper) but glad you shared the |
Based on the documentation, the S4 method for
kernlab::ksvm
withstringdot
requires "list" inputs. Both the predictor as list and label as a list, instead of formula and data.frame.Inputs for text classification will require additional steps to remain tidy.
these steps will be tested in the popcorn_garland branch (e.g. string kernel pun intended).
The text was updated successfully, but these errors were encountered: