Skip to main content
sqrt
Source Link
denis
  • 932
  • 5
  • 16

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

Added: Weighted least squares, with different weights w$_i$, is a powerful method.
For example, w$_i \sim \tfrac{1}{|\text{x}_i|}$$_i \sim \frac{1}{\sqrt |\text{x}_i|}$ pushes small x$_i$ towards 0 (think iPhone fingers), "sparsifies" —
a poor man's approach to L1-norm regularization,regularization; see LASSO.

Not Matlab, but hope this helps.

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

Added: Weighted least squares, with different weights w$_i$, is a powerful method.
For example, w$_i \sim \tfrac{1}{|\text{x}_i|}$ pushes small x$_i$ towards 0 (think iPhone fingers), "sparsifies" —
a poor man's approach to L1-norm regularization, see LASSO.

Not Matlab, but hope this helps.

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

Added: Weighted least squares, with different weights w$_i$, is a powerful method.
For example, w$_i \sim \frac{1}{\sqrt |\text{x}_i|}$ pushes small x$_i$ towards 0 (think iPhone fingers), "sparsifies" —
a poor man's approach to L1-norm regularization; see LASSO.

Not Matlab, but hope this helps.

+weighted, LASSO
Source Link
denis
  • 932
  • 5
  • 16

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

(Use Added: Weighted least squares, with different weights w$_i$, is a robust least-squares solverpowerful method.
For example, w$_i \sim \tfrac{1}{|\text{x}_i|}$ pushes small x$_i$ towards 0 -- the problem may be ill(think iPhone fingers), "sparsifies" —
a poor man's approach to L1-conditionednorm regularization, see LASSO.)

Not Matlab, but hope this helps.

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

(Use a robust least-squares solver -- the problem may be ill-conditioned.)

Not Matlab, but hope this helps.

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

Added: Weighted least squares, with different weights w$_i$, is a powerful method.
For example, w$_i \sim \tfrac{1}{|\text{x}_i|}$ pushes small x$_i$ towards 0 (think iPhone fingers), "sparsifies" —
a poor man's approach to L1-norm regularization, see LASSO.

Not Matlab, but hope this helps.

Source Link
denis
  • 932
  • 5
  • 16

One form of ridge regression is the problem:
     minimize |Ax - b|, and keep x near a given point x0 (often 0).
If we cast this as:
     minimize |Ax - b|^2 + w^2 |x - x0|^2 ,
we can solve it by running least squares on these extended inputs:

[ A ]    [ b ]
[ w I ]  [ w x0 ]

Here w is a weight factor that balances minimizing |Ax - b|, and keeping x near x0.
How should one choose it if one has no idea ? A rule of thumb is to make |Ax - b| and |x - x0| roughly equal -- print those values.

(Use a robust least-squares solver -- the problem may be ill-conditioned.)

Not Matlab, but hope this helps.