-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC fix typos in the user guide linear model documentation #19554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC fix typos in the user guide linear model documentation #19554
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are not all "typos". Many of the suggested changes are actually changing the meaning of the edited sentences. Please do not suggest changes if you are not confident the original meaning is preserved.
It takes time to review pull requests and if 80% of the suggestions are problematic this is really not a productive way to contribute to open source.
doc/modules/linear_model.rst
Outdated
columns of the design matrix :math:`X` have an approximate linear | ||
dependence, the design matrix becomes close to singular | ||
columns of the design matrix :math:`X` have an approximately linear | ||
dependence, the design matrix becomes close to a singular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dependence, the design matrix becomes close to a singular | |
dependence, the design matrix becomes close to singular |
singular is an adjective here.
doc/modules/linear_model.rst
Outdated
@@ -546,7 +546,7 @@ the residual. | |||
Instead of giving a vector result, the LARS solution consists of a | |||
curve denoting the solution for each value of the :math:`\ell_1` norm of the | |||
parameter vector. The full coefficients path is stored in the array | |||
``coef_path_``, which has size (n_features, max_features+1). The first | |||
``coef_path_``, which has a size (n_features, max_features+1). The first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous version seems more correct to me.
``coef_path_``, which has a size (n_features, max_features+1). The first | |
``coef_path_``, which has size (n_features, max_features+1). The first |
@@ -1,6 +1,6 @@ | |||
""" | |||
================================================================== | |||
Common pitfalls in interpretation of coefficients of linear models | |||
Common pitfalls in the interpretation of coefficients of linear models | |||
================================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust the size of the header over/underline accordingly.
doc/modules/linear_model.rst
Outdated
The LARS model can be used using the estimator :class:`Lars`, or its | ||
low-level implementation :func:`lars_path` or :func:`lars_path_gram`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LARS model can be used using the estimator :class:`Lars`, or its | |
low-level implementation :func:`lars_path` or :func:`lars_path_gram`. | |
The LARS model can be used via the :class:`Lars` estimator, or its | |
low-level implementation :func:`lars_path` or :func:`lars_path_gram`. |
doc/modules/linear_model.rst
Outdated
between the features. | ||
|
||
The advantages of LARS are: | ||
|
||
- It is numerically efficient in contexts where the number of features | ||
is significantly greater than the number of samples. | ||
|
||
- It is computationally just as fast as forward selection and has | ||
- It is computationally just as fast as forwarding selection and has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. "forward selection" is the correct name of the method.
- It is computationally just as fast as forwarding selection and has | |
- It is computationally just as fast as forward selection and has |
doc/modules/linear_model.rst
Outdated
@@ -306,10 +306,10 @@ Alternatively, the estimator :class:`LassoLarsIC` proposes to use the | |||
Akaike information criterion (AIC) and the Bayes Information criterion (BIC). | |||
It is a computationally cheaper alternative to find the optimal value of alpha | |||
as the regularization path is computed only once instead of k+1 times | |||
when using k-fold cross-validation. However, such criteria needs a | |||
when using k-fold cross-validation. However, such criteria need a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original was correct.
when using k-fold cross-validation. However, such criteria need a | |
when using k-fold cross-validation. However, such criteria needs a |
doc/modules/linear_model.rst
Outdated
target. When there are multiple features having equal correlation, instead | ||
of continuing along the same feature, it proceeds in a direction equiangular | ||
target. When multiple features having equal correlation, instead | ||
of continuing along with the same feature, it proceeds in a direction equiangular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the previous text was better. Please revert.
doc/modules/linear_model.rst
Outdated
@@ -530,7 +530,7 @@ function of the norm of its coefficients. |
|
||
* :ref:`sphx_glr_auto_examples_linear_model_plot_lasso_lars.py` | |||
|
|||
The Lars algorithm provides the full path of the coefficients along | |||
The Lars algorithm provides the full path of the coefficients along with | |||
the regularization parameter almost for free, thus a common operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suggestion changes the meaning of then sentence. Please revert.
doc/modules/linear_model.rst
Outdated
@@ -565,13 +565,13 @@ algorithm for approximating the fit of a linear model with constraints imposed | |||
on the number of non-zero coefficients (ie. the :math:`\ell_0` pseudo-norm). | |||
|
|||
Being a forward feature selection method like :ref:`least_angle_regression`, | |||
orthogonal matching pursuit can approximate the optimum solution vector with a | |||
the orthogonal matching pursuit can approximate the optimum solution vector with a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orthogonal matching pursuit is the name of the method. The previous text was correct.
doc/modules/linear_model.rst
Outdated
fixed number of non-zero elements: | ||
|
||
.. math:: | ||
\underset{w}{\operatorname{arg\,min\,}} ||y - Xw||_2^2 \text{ subject to } ||w||_0 \leq n_{\text{nonzero\_coefs}} | ||
|
||
Alternatively, orthogonal matching pursuit can target a specific error instead | ||
Alternatively,the orthogonal matching pursuit can target a specific error instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orthogonal matching pursuit is the name of the method. The previous text was correct.
I review and applied the suggestion of @ogrisel to merge this PR. |
All green. Merging. |
…arn#19554) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
…arn#19554) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Any other comments?