DOC add missing attributes to LocalOutlierFactor#17696
DOC add missing attributes to LocalOutlierFactor#17696glemaitre merged 11 commits intoscikit-learn:masterfrom
Conversation
|
To fix the linting issues: I advise you to invest some time to configure on-the-fly flake8 checks inside your editor of choice. This allows you to spot these kind of problems while editing. There may be some materials about this in the Developer doc (not sure). |
lesteve
left a comment
There was a problem hiding this comment.
Some comments (not 100% sure about them) ...
sklearn/neighbors/_lof.py
Outdated
|
|
||
| effective_metric_ : str | ||
| The effective metric used for the distance computation. | ||
| If `metric` is 'minkowski', `effective_metric_` is equivalent to |
There was a problem hiding this comment.
I am not sure you want all these details. It is quite hard to keep in sync when the code changes. Maybe this is enough (not really sure)?
Effective metric used for the distance computation.
There was a problem hiding this comment.
I agree with Loic. The details should be given in the Parameters. Once it has been fitted, we just want to know that this the metric used.
sklearn/neighbors/_lof.py
Outdated
|
|
||
| effective_metric_params_ : dict | ||
| The effective additional keyword arguments for the metric function. | ||
| This is equivalent to `metric_params` in parameters if metric_params |
There was a problem hiding this comment.
Same thing here maybe this is enough?
Additional keyword arguments for the metric function.
sklearn/neighbors/_lof.py
Outdated
|
|
||
| effective_metric_ : str | ||
| The effective metric used for the distance computation. | ||
| If `metric` is 'minkowski', `effective_metric_` is equivalent to |
There was a problem hiding this comment.
I agree with Loic. The details should be given in the Parameters. Once it has been fitted, we just want to know that this the metric used.
sklearn/neighbors/_lof.py
Outdated
| n_samples_fit_ : int | ||
| It is the number of samples in the fitted data. | ||
|
|
||
| .. versionadded:: 0.20 |
There was a problem hiding this comment.
This version added should not be here. I assume it was belonging to the section of the parameter offset_.
sklearn/neighbors/_lof.py
Outdated
|
|
||
| effective_metric_params_ : dict | ||
| The effective additional keyword arguments for the metric function. | ||
| This is equivalent to `metric_params` in parameters if metric_params |
|
Thank you all for your reviews. |
|
@glemaitre, @lesteve, have comments been addressed? Thanks! |
ogrisel
left a comment
There was a problem hiding this comment.
Some more minor comments, other than that LGTM.
| n_samples_fit_ : int | ||
| It is the number of samples in the fitted data. | ||
|
|
||
|
|
||
|
|
||
| Examples |
There was a problem hiding this comment.
In the docstring of other classes in the code base we do not insert extra blank lines between sections. Let's be consistent :
| n_samples_fit_ : int | |
| It is the number of samples in the fitted data. | |
| Examples | |
| n_samples_fit_ : int | |
| It is the number of samples in the fitted data. | |
| Examples |
| 'OrthogonalMatchingPursuit', | ||
| 'PLSCanonical', 'PLSSVD', | ||
| 'PassiveAggressiveClassifier'} | ||
|
|
There was a problem hiding this comment.
Let's not edit lines that are unrelated to the change at hand. Our coding conventions tolerate this blank line, so let's keep it.
|
You will need to merge master into your branch and solve the conflict (it should be in the list of estimator that should be bypass). |
I resolved the conflicts via the web UI. This works well enough IMO for simple conflicts. |
|
@j2heng you will have to |
|
I'm on it |
|
@j2heng you need to remove |
|
Uhm I might done this when handling the merge to master |
|
@j2heng sorry about that this is good to be merged. Thanks |
Co-authored-by: Loïc Estève <loic.esteve@ymail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Co-authored-by: Loïc Estève <loic.esteve@ymail.com> Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
References #14312
What does this implement/fix? Explain your changes.
Added
effective_metric_,effective_metric_params_andn_samples_fit_to docstring in LocalOutlierFactor.LocalOutlierFactorremoved from the list IGNORED in test_docstring_parameters.py.