[scikit-learn] API Discussion: Where shall we put the plotting functions?

Brown J.B. jbbrown at kuhp.kyoto-u.ac.jp
Tue Apr 2 22:44:22 EDT 2019


As a user, I feel that (2) "sklearn.plot.XXX.plot_YYY" best allows for
future expansion of sub-namespaces in a tractable way that is also easy to
understand during code review.
For example, sklearn.plot.tree.plot_forest() or sklearn.plot.lasso.plot_* .

Just my opinion.
J.B.


2019年4月2日(火) 23:40 Hanmin Qin <qinhanmin2005 at sina.com>:

> See https://github.com/scikit-learn/scikit-learn/issues/13448
>
> We've introduced several plotting functions (e.g., plot_tree and
> plot_partial_dependence) and will introduce more (e.g.,
> plot_decision_boundary) in the future. Consequently, we need to decide
> where to put these functions. Currently, there're 3 proposals:
>
> (1) sklearn.plot.plot_YYY (e.g., sklearn.plot.plot_tree)
>
> (2) sklearn.plot.XXX.plot_YYY (e.g., sklearn.plot.tree.plot_tree)
>
> (3) sklearn.XXX.plot.plot_YYY (e.g., sklearn.tree.plot.plot_tree, note
> that we won't support from sklearn.XXX import plot_YYY)
>
> Joel Nothman, Gael Varoquaux and I decided to post it on the mailing list
> to invite opinions.
>
> Thanks
>
> Hanmin Qin
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20190403/bf3255a2/attachment.html>


More information about the scikit-learn mailing list