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 think common things in documentation should be written in a consistent way. Right now I can think of the following points:
Whether to name entities which can be transformed to ndarray as array or array-like.
How to list different input options. Should curly braces always be used? For example:
X : {array-like, sparse matrix}
Optional arguments / default values. Some convention should be adopted, like:
kernel : string, default ’rbf’
or
kernel : string (default='rbf')
The word optional should be dropped anyway as redundant.
How to name X and y arrays in fit and predict methods. The one adopted convention would be helpful.
How to mention shapes of arrays. I was told that X, shape (n_samples, n_features) was adopted, is it true? How about 1-d arrays: (n_samples) or (n_samples,)?
Anyway, do you think it is an issue at all? Maybe core developers could decide and update coding guidelines? I listed only some points.
Also, I am closing this issue, as we have way too many open issues in are
tracker. It's not that I don't agree with it. Feel free to send in PRs
for the parts of the documentation that do not respect the numpy doc
standard.
OK, I think that I am getting it: how should we be calling in plain English "X" and "y"? I must admit that I am not sure that there is a global agreement. We tend to call them "data" and "target". But the wording "input data" and "prediction target" would probably be more precise.
In the current state X and y are called differently in every module.
I agree that the question should be raised and documented. As it is more
a question that calls for general discussion amongst the developer, I
feel that we should rather use the mailing list, rather than an issue,
for this discussion.
My suggestion is "input data", and "prediction target".
Tagging as moderate as this involves editing quite a few docstrings... (And addressing #7758 along the way). I think @karandesai-96 maybe interested in this? :)
@raghavrv I'll take this up. I was looking at a separate issue, @amueller gave me a direction for it. I'll do that if I am able to, this one comes next in the line 😄
Activity
GaelVaroquaux commentedon Oct 21, 2014
array-like and arrays are 2 different things. We should strive to support
as much as possible array-like everywhere.
For the other remarks, I agree, and I would refer to the numpy doc
standard, which is the one that we should be following.
GaelVaroquaux commentedon Oct 21, 2014
Also, I am closing this issue, as we have way too many open issues in are
tracker. It's not that I don't agree with it. Feel free to send in PRs
for the parts of the documentation that do not respect the numpy doc
standard.
nmayorov commentedon Oct 21, 2014
Thanks for pointing to numpy doc.
Point 4 is specific to scikit-learn, adding something about it to guidelines would be helpful.
GaelVaroquaux commentedon Oct 21, 2014
I am a bit confused with regards to point 4.
OK, I think that I am getting it: how should we be calling in plain English "X" and "y"? I must admit that I am not sure that there is a global agreement. We tend to call them "data" and "target". But the wording "input data" and "prediction target" would probably be more precise.
nmayorov commentedon Oct 21, 2014
Yes, that's what I meant.
In the current state
Xandyare called differently in every module.GaelVaroquaux commentedon Oct 21, 2014
I agree that the question should be raised and documented. As it is more
a question that calls for general discussion amongst the developer, I
feel that we should rather use the mailing list, rather than an issue,
for this discussion.
My suggestion is "input data", and "prediction target".
nmayorov commentedon Oct 21, 2014
I leave it to you to initiate this discussion on mailing list then, when you think it's a right time.
amueller commentedon Oct 27, 2016
Answers are:
kernel : string (default='rbf')amueller commentedon Oct 27, 2016
Can someone add that to the docs?
raghavrv commentedon Oct 28, 2016
Tagging as moderate as this involves editing quite a few docstrings... (And addressing #7758 along the way). I think @karandesai-96 maybe interested in this? :)
kdexd commentedon Oct 28, 2016
@raghavrv I'll take this up. I was looking at a separate issue, @amueller gave me a direction for it. I'll do that if I am able to, this one comes next in the line 😄
raghavrv commentedon Oct 28, 2016
Thx!
Fix inconsistencies in clustering doc.
Fix inconsistencies in clustering doc.
[MRG][DOC] Fix inconsistencies in clustering doc. (#13946)
[MRG][DOC] Fix inconsistencies in clustering doc. (scikit-learn#13946)
thomasjpfan commentedon Dec 10, 2021
We now have a Guidelines for writing documentation that details how to write docstrings.