Miscellaneous typos and code cleaning#264
Conversation
cajchristian
left a comment
There was a problem hiding this comment.
These look good. Maybe we should have Philip or Rosy review because they are more knowledgeable with formatting and coding standards than I am.
PicoCentauri
left a comment
There was a problem hiding this comment.
Thanks for the cleanup. I have two comments
- I would rephrase the "Default = XXX" to propper sentences
- See my comment on how to typeset inline code in the docs. You can also always render the docs locally with
tox -e docsor check the read the docs link in the PR conversation.
| whether to compute the PCovC in `sample` or `feature` space | ||
| default=`sample` when :math:`{n_{samples} < n_{features}}` and | ||
| whether to compute the PCovC in `sample` or `feature` space. | ||
| Default = `sample` when :math:`{n_{samples} < n_{features}}` and |
There was a problem hiding this comment.
This looks a bit weird for me. Maybe write a "real" sentence like
| Default = `sample` when :math:`{n_{samples} < n_{features}}` and | |
| The default value is `sample` when :math:`{n_{samples} < n_{features}}` and |
or similar.
There was a problem hiding this comment.
Did you push the changes. Somehow I don't see them here?
| `feature` when :math:`{n_{features} < n_{samples}}` | ||
|
|
||
| classifier: `estimator object` or `precomputed`, default=None | ||
| classifier: `estimator object` or `precomputed`, default=None |
There was a problem hiding this comment.
If you want to do a code highlighting use double ticks ``. Our documentation pages use rst where inline codes are highlighted with double ticks. Sorry for the confusion and this very subtle difference between markdown and rst.
There was a problem hiding this comment.
Ok, that makes sense. I think the reason I have single ticks is to match how PCovR/KPCovR docstrings handle `precomputed`, but I will keep that in mind
| whether to compute the PCovC in `sample` or `feature` space | ||
| default=`sample` when :math:`{n_{samples} < n_{features}}` and | ||
| whether to compute the PCovC in `sample` or `feature` space. | ||
| Default = `sample` when :math:`{n_{samples} < n_{features}}` and |
PicoCentauri
left a comment
There was a problem hiding this comment.
Cool! Thanks for the updates. I have some final minor suggestions to improve the flow when reading the docs.
|
|
||
| W : numpy.ndarray, shape (n_features, n_properties) | ||
| Regression weights, optional when regressor= `precomputed`. If not | ||
| Regression weights, optional when regressor = `precomputed`. If not |
There was a problem hiding this comment.
| Regression weights, optional when regressor = `precomputed`. If not | |
| Regression weights, optional when regressor is ``precomputed``. If not |
|
|
||
| space: {'feature', 'sample', 'auto'}, default='auto' | ||
| whether to compute the PCovR in `sample` or `feature` space default=`sample` | ||
| whether to compute the PCovR in `sample` or `feature` space. Default = `sample` |
There was a problem hiding this comment.
| whether to compute the PCovR in `sample` or `feature` space. Default = `sample` | |
| whether to compute the PCovR in `sample` or `feature` space. Default is equal to ``sample`` |
| The default is = `sample` when :math:`{n_{samples} < n_{features}}` | ||
| and `feature` when :math:`{n_{features} < n_{samples}}` |
There was a problem hiding this comment.
| The default is = `sample` when :math:`{n_{samples} < n_{features}}` | |
| and `feature` when :math:`{n_{features} < n_{samples}}` | |
| The default is equal to ``sample`` when :math:`{n_{samples} < n_{features}}` | |
| and ``feature`` when :math:`{n_{features} < n_{samples}}` |
| whether to compute the PCovC in `sample` or `feature` space. | ||
| The default is = `sample` when :math:`{n_{samples} < n_{features}}` | ||
| and `feature` when :math:`{n_{features} < n_{samples}}` |
There was a problem hiding this comment.
| whether to compute the PCovC in `sample` or `feature` space. | |
| The default is = `sample` when :math:`{n_{samples} < n_{features}}` | |
| and `feature` when :math:`{n_{features} < n_{samples}}` | |
| whether to compute the PCovC in ``sample`` or ``feature`` space. | |
| The default is equal to ``sample`` when :math:`{n_{samples} < n_{features}}` | |
| and ``feature`` when :math:`{n_{features} < n_{samples}}` |
| `feature` when :math:`{n_{features} < n_{samples}}` | ||
|
|
||
| classifier: `estimator object` or `precomputed`, default=None | ||
| classifier: `estimator object` or `precomputed`, default=None |
There was a problem hiding this comment.
| classifier: `estimator object` or `precomputed`, default=None | |
| classifier: ``estimator object`` or ``precomputed``, default=None |
| whether to compute the PCovC in `sample` or `feature` space | ||
| default=`sample` when :math:`{n_{samples} < n_{features}}` and | ||
| whether to compute the PCovC in `sample` or `feature` space. | ||
| Default = `sample` when :math:`{n_{samples} < n_{features}}` and |
There was a problem hiding this comment.
Did you push the changes. Somehow I don't see them here?
Great! Everything should be added now. I think a few changes were left out from the previous commit. |
|
I am happy. We can merge if @cajchristian is as well. |
This addresses some typos in the docs as well as a few redundant code lines. Additionally, we rename a few methods in
_BasePCovand_BaseKPCov. Finally, we changetest_pcovcto use a multiclass dataset for testing.Contributor (creator of PR) checklist
For Reviewer
📚 Documentation preview 📚: https://scikit-matter--264.org.readthedocs.build/en/264/