Are there plans to implement the sliding_window function for multi-label classification as well?
It would be great to be able to work with larger documents as well here!
I'm afraid I don't have immediate plans to extend it to multi-label classification at the moment. But, I will add this to feature requests and see if I can do something about it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I would also still love to have this!
@jonas-nothnagel It already has.
@null-id and @ThilinaRajapakse this is great to hear! Thank you for keep improving this library!
I just tried to enable sliding window in the MultiLabelClassificationArgs() but always ran into following error during evaluation:
TypeError: zip argument #2 must support iteration
Anything to keep in mind?
Unfortunately, it's not done yet. The bot marked it as done, not me. 馃槄
Ah... But Why I just used it normally for MultiLabelClassification?馃槀 @ThilinaRajapakse
model = MultiLabelClassificationModel('bert', 'bert-base-uncased', num_labels=5, args={'sliding_window':True, 'stride':0.8})
You can set it, but I don't think it will be used. Unless I added the feature but have absolutely no memory of doing so. 馃槅
Emm... However, It seems the result makes sense... The trained model can predict long text and return a list of predictions (the length is the number of segmentation for this piece of text).
@null-id How do you use the trained model for evaluation?
You can set and also run model.train_model() with sliding-window, however it always fails for me in the evaluation step.
@ThilinaRajapakse perhaps save us from speculating and implement :) ?
@jonas-nothnagel Yeah, I skip the evaluation step and just predict.
Well, damn lol. Either of you guys interested in taking a look and seeing if you can get it to work with evaluation so that we can add it officially? 馃槈
I can try to mean the list of segments to get the result to evaluate. But is this an acceptable version to merge?
Yes. That is how it is implemented in ClassificationModel as well. You should be able to just follow that spec I think.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Wow is it done now?
I'm afraid not. Apparently, it does work with training and prediction though (no guarantees).
Most helpful comment
I'm afraid I don't have immediate plans to extend it to multi-label classification at the moment. But, I will add this to feature requests and see if I can do something about it.