Should the meaning of default=None be specified?
See original GitHub issueMaybe related with #15761.
Describe the issue linked to the documentation
I have noticed that when the default is None
for some parameter or attribute, the meaning is included only in some cases.
For instance, for the fit
method in the class sklearn.tree.DecisionTreeClassifier
, sample_weight=None
is documented as:
sample_weight : array-like of shape (n_samples,), default=None Sample weights. If None, then samples are equally weighted.
However, for the score
method it is:
sample_weight : array-like of shape (n_samples,), default=None Sample weights.
It is okay like that or should be specified always?
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
OpenMP: default(none) and const variables - Jaka's Corner
The default(none) clause forces a programmer to explicitly specify the data-sharing attributes of all variables in a parallel region.
Read more >UNITNAME: Specifying the type of unit for mounting a ... - IBM
Explanation: UNITNAME(unitname) is an optional parameter identifying the type of unit that should be specified the first time DFSMShsm requests that a ...
Read more >Jinja2 template variable if None Object set a default value
User is defined and p.User['first_name'] ) |default("NONE", True) }}. Note the last variable (p.User['first_name']) does not have the if defined test after ...
Read more >Configuring solr.xml :: Apache Solr Reference Guide
xml (i.e., 0 ), then Solr will default to the port that jetty is listening on, defined by ${jetty.port} . leaderVoteWait. Optional. Default:...
Read more >pandas.read_csv — pandas 0.20.1 documentation
Intervening rows that are not specified will be skipped (e.g. 2 in this example is skipped). ... index_col : int or sequence or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
sklearn.decomposition.SparsePCA
was solved in #21421, so you can update the list of sub-issues @ogrisel. PR #21428 will probably get merged soon and addresses MiniBatchSparsePCA and MiniBatchDictionaryLearning.@muokicaleb and I will work on
sklearn.manifold.spectral_embedding (eigen_solver)