You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been exploring the predictor_proba function defined in sklearn.py at this location and I have some suggestions to improve its functionality and usability.
Clarify the Function's Docstring: The current docstring mentions a parameter num_targets which is not present in the function signature. It might be beneficial for future users if the documentation accurately reflects the function's parameters and intended use.
Handling Multi-class Predictions: For models that predict probabilities across multiple classes, flattening the output might not always be desirable. It could be more useful to return the original array structure to preserve the relationship between classes and probabilities.
Error Handling for predict_proba Method: Not all Scikit-Learn estimators have a predict_proba method. Adding a check to ensure that the estimator passed to predictor_proba supports this method could prevent runtime errors and improve user experience.
The text was updated successfully, but these errors were encountered:
& 3) are no brainers IMOs, thanks for pointing out those improvements. PRs welcome.
is an interesting point. There are a few considerations around return types needing to be the same for Postgres functions with the same name, but we are starting to accumulate function variants for features like this. It might be worth it to add pgml.predict_proba_multi or some other appropriately named function to provide an more appropriately structured return type.
Hello,
I've been exploring the predictor_proba function defined in sklearn.py at this location and I have some suggestions to improve its functionality and usability.
num_targets
which is not present in the function signature. It might be beneficial for future users if the documentation accurately reflects the function's parameters and intended use.The text was updated successfully, but these errors were encountered: