Skip to content

Commit 0eb0550

Browse files
committed
add IPODRegression
1 parent afe4c95 commit 0eb0550

File tree

6 files changed

+1237
-0
lines changed

6 files changed

+1237
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This package implements:
4141
* Robust Ridge regression (using any of the previous estimator)
4242
* Quantile regression using interior point method
4343
* Regularized Least Square regression
44+
* Θ-IPOD regression, possibly with a penalty term
4445

4546
## Installation
4647

@@ -68,6 +69,11 @@ For Regularized Least Squares and a penalty term, use `rlm`:
6869

6970
`m = rlm(X, y, L1Penalty(); method=:cgd)`
7071

72+
For Θ-IPOD regression with outlier detection and a penalty term, use `ipod`:
73+
74+
`m = ipod(X, y, L2Loss(), SquaredL2Penalty(); method=:auto)`
75+
76+
7177
For robust version of `mean`, `std`, `var` and `sem` statistics, specify the estimator as first argument.
7278
Use the `dims` keyword for computing the statistics along specific dimensions.
7379
The following functions are also implemented: `mean_and_std`, `mean_and_var` and `mean_and_sem`.
@@ -128,6 +134,12 @@ refit!(m10; quantile=0.8)
128134
## Penalized regression
129135
m11 = rlm(form, data, SquaredL2Penalty(); method=:auto)
130136

137+
## Θ-IPOD regression with outlier detection
138+
m12 = ipod(form, data, TukeyLoss(); method=:auto)
139+
140+
## Θ-IPOD regression with outlier detection and a penalty term
141+
m13 = ipod(form, data, L2Loss(), L1Penalty(); method=:ama)
142+
131143
;
132144

133145
# output
@@ -235,6 +247,21 @@ With a penalty, the following solvers are available (instead of the other ones):
235247
- `:ama`, Alternating Minimization Algorithm [4].
236248
- `:admm`, Alternating Direction Method of Multipliers [5].
237249

250+
To use a robust loss function with a penalty, see Θ-IPOD regression.
251+
252+
### Θ-IPOD regression
253+
254+
_Θ-IPOD regression_ (Θ-thresholding based Iterative Procedure for Outlier Detection) results from
255+
minimizing the following objective function [6]:
256+
`L = ½ Σᵢ |yᵢ - 𝒙ᵢ 𝜷 - γᵢ|² + P(𝜷) + Q(γ)`,
257+
where `Q(γ)` is a penalty function on the outliers `γ` that is sparse so the problem is not underdetermined.
258+
We don't need to know the expression of this penalty function, just that it leads to thresholding using
259+
one of the loss function used by M-Estimators. Then Θ-IPOD is equivalent to solving an M-Estimator.
260+
This problem is solved using an alternating minimization technique, for the outlier detection.
261+
Without penalty, the coefficients are updated at every step using a solver for _Ordinary Least Square_.
262+
263+
`P(𝜷)` is an optionnal (sparse) penalty on the coefficients.
264+
238265

239266
## Credits
240267

@@ -253,3 +280,4 @@ for implementing the Iteratively Reweighted Least Square algorithm.
253280
[3] "A Fast Iterative Shrinkage-Thresholding Algorithm for Linear Inverse Problems", 2009, A. Beck, M. Teboulle
254281
[4] "Applications of a splitting algorithm to decomposition in convex programming and variational inequalities", 1991, P. Tseng
255282
[5] "Fast Alternating Direction Optimization Methods", 2014, T. Goldstein, B. O'Donoghue, S. Setzer, R. Baraniuk
283+
[6] "Outlier Detection Using Nonconvex Penalized Regression", 2011, Y. She, A.B. Owen

docs/src/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RobustModels.FISTAPred
2323
RobustModels.AMAPred
2424
RobustModels.ADMMPred
2525
QuantileRegression
26+
IPODRegression
2627
```
2728

2829
## Constructors for models

src/RobustModels.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ export LossFunction,
127127
Estimator,
128128
rlm,
129129
quantreg,
130+
IPODRegression,
131+
ipod,
132+
outliers,
130133
penalty,
131134
haspenalty,
132135
loss,
@@ -201,6 +204,7 @@ include("linresp.jl")
201204
include("robustlinearmodel.jl")
202205
include("univariate.jl")
203206
include("quantileregression.jl")
207+
include("ipod.jl")
204208
include("deprecated.jl")
205209

206210
end # module

0 commit comments

Comments
 (0)