semantic-router
semantic-router copied to clipboard
'HybridRouteLayer' object has no attribute 'fit' and evaluate
HybridRouteLayer lacks built-in functionalities such as fit or evaluate. How can this limitation be addressed?
Hello, @shankara-93! :]
The fit()
method in RouteLayer
only attemps to find the optimal thresholds. I have yet to see that it improves performance for my applications, so I would think the SR team has not put that much effort into adding it for the HybridRouteLayer
class, which is more recent.
I guess this feature could be added to HybridRouteLayer
as well, but then I would try to use inheritance here between the two classes. I would think this method will be very similar, if not identical, for the HybridRouteLayer
.
@jamescalam, @bruvduroiu: I can draft a PR now if this feature is of interest :]
@andreped I think it'd be great to add fit()
to HybridRouteLayer
— at some point, we'll create a BaseRouteLayer
and base both from this, but we are happy with a more direct solution in the meantime. Let us know if/how we can help!
@jamescalam Sure. I can make an attempt later today :]
I was thinking of introducing class weights to the pooling method as well, which would enable developers to introduce a priori biases to certain classes. We have one application where this would be of interest already.