@@ -28,6 +28,22 @@ descr(::Type{LinearRegressor}) = "Regression with objective function ``|Xθ - y|
28
28
RIDGE REGRESSOR
29
29
=============== =#
30
30
31
+ """
32
+ $SIGNATURES
33
+
34
+ Ridge regression model with objective function
35
+
36
+ ``|Xθ - y|₂²/2 + λ|θ|₂²/2``
37
+
38
+ ## Parameters
39
+
40
+ * `lambda` (Real): strength of the L2 regularisation.
41
+ * `fit_intercept` (Bool): whether to fit the intercept or not.
42
+ * `penalize_intercept` (Bool): whether to penalize the intercept.
43
+ * `solver`: type of solver to use (if `nothing` the default is used). The
44
+ solver is Cholesky by default but can be Conjugate-Gradient as
45
+ well. See `?Analytical` for more information.
46
+ """
31
47
@with_kw_noshow mutable struct RidgeRegressor <: MMI.Deterministic
32
48
lambda:: Real = 1.0
33
49
fit_intercept:: Bool = true
@@ -46,6 +62,22 @@ descr(::Type{RidgeRegressor}) = "Regression with objective function ``|Xθ - y|
46
62
LASSO REGRESSOR
47
63
=============== =#
48
64
65
+ """
66
+ $SIGNATURES
67
+
68
+ Lasso regression model with objective function
69
+
70
+ ``|Xθ - y|₂²/2 + λ|θ|₁``
71
+
72
+ ## Parameters
73
+
74
+ * `lambda` (Real): strength of the L1 regularisation.
75
+ * `fit_intercept` (Bool): whether to fit the intercept or not.
76
+ * `penalize_intercept` (Bool): whether to penalize the intercept.
77
+ * `solver`: type of solver to use (if `nothing` the default is used). Either
78
+ `FISTA` or `ISTA` can be used (proximal methods, with/without
79
+ acceleration).
80
+ """
49
81
@with_kw_noshow mutable struct LassoRegressor <: MMI.Deterministic
50
82
lambda:: Real = 1.0
51
83
fit_intercept:: Bool = true
@@ -64,6 +96,23 @@ descr(::Type{LassoRegressor}) = "Regression with objective function ``|Xθ - y|
64
96
ELASTIC NET REGRESSOR
65
97
===================== =#
66
98
99
+ """
100
+ $SIGNATURES
101
+
102
+ Elastic net regression model with objective function
103
+
104
+ ``|Xθ - y|₂²/2 + λ|θ|₂²/2 + γ|θ|₁``
105
+
106
+ ## Parameters
107
+
108
+ * `lambda` (Real): strength of the L2 regularisation.
109
+ * `gamma` (Real): strength of the L1 regularisation.
110
+ * `fit_intercept` (Bool): whether to fit the intercept or not.
111
+ * `penalize_intercept` (Bool): whether to penalize the intercept.
112
+ * `solver`: type of solver to use (if `nothing` the default is used). Either
113
+ `FISTA` or `ISTA` can be used (proximal methods, with/without
114
+ acceleration).
115
+ """
67
116
@with_kw_noshow mutable struct ElasticNetRegressor <: MMI.Deterministic
68
117
lambda:: Real = 1.0
69
118
gamma:: Real = 0.0
@@ -83,6 +132,28 @@ descr(::Type{ElasticNetRegressor}) = "Regression with objective function ``|Xθ
83
132
ROBUST REGRESSOR (General)
84
133
========================== =#
85
134
135
+ """
136
+ $SIGNATURES
137
+
138
+ Robust regression model with objective function
139
+
140
+ ``∑ρ(Xθ - y) + λ|θ|₂² + γ|θ|₁``
141
+
142
+ where `ρ` is a robust loss function (e.g. the Huber function).
143
+
144
+ ## Parameters
145
+
146
+ * `rho` (RobustRho): the type of robust loss to use (see `HuberRho`,
147
+ `TalwarRho`, ...)
148
+ * `penalty` (Symbol or String): the penalty to use, either `:l2`, `:l1`, `:en`
149
+ (elastic net) or `:none`. (Default: `:l2`)
150
+ * `lambda` (Real): strength of the regulariser if `penalty` is `:l2` or `:l1`.
151
+ Strength of the L2 regulariser if `penalty` is `:en`.
152
+ * `gamma` (Real): strength of the L1 regulariser if `penalty` is `:en`.
153
+ * `fit_intercept` (Bool): whether to fit an intercept (Default: `true`)
154
+ * `penalize_intercept` (Bool): whether to penalize intercept (Default: `false`)
155
+ * `solver` (Solver): type of solver to use, default if `nothing`.
156
+ """
86
157
@with_kw_noshow mutable struct RobustRegressor <: MMI.Deterministic
87
158
rho:: RobustRho = HuberRho (0.1 )
88
159
lambda:: Real = 1.0
@@ -105,6 +176,14 @@ descr(::Type{RobustRegressor}) = "Robust regression with objective ``∑ρ(Xθ -
105
176
HUBER REGRESSOR
106
177
=============== =#
107
178
179
+ """
180
+ $SIGNATURES
181
+
182
+ Huber Regression, see `RobustRegressor`, it's the same but with the robust loss
183
+ set to `HuberRho`. The parameters are the same apart from `delta` which
184
+ parametrises the `HuberRho` function (radius of the ball within which the loss
185
+ is a quadratic loss).
186
+ """
108
187
@with_kw_noshow mutable struct HuberRegressor <: MMI.Deterministic
109
188
delta:: Real = 0.5
110
189
lambda:: Real = 1.0
@@ -127,6 +206,14 @@ descr(::Type{HuberRegressor}) = "Robust regression with objective ``∑ρ(Xθ -
127
206
QUANTILE REGRESSOR
128
207
================== =#
129
208
209
+ """
210
+ $SIGNATURES
211
+
212
+ Quantile Regression, see `RobustRegressor`, it's the same but with the robust
213
+ loss set to `QuantileRho`. The parameters are the same apart from `delta`
214
+ which parametrises the `QuantileRho` function (indicating the quantile to use
215
+ with default `0.5` for the median regression).
216
+ """
130
217
@with_kw_noshow mutable struct QuantileRegressor <: MMI.Deterministic
131
218
delta:: Real = 0.5
132
219
lambda:: Real = 1.0
@@ -149,6 +236,17 @@ descr(::Type{QuantileRegressor}) = "Robust regression with objective ``∑ρ(Xθ
149
236
LEAST ABSOLUTE DEVIATION REGRESSOR
150
237
================================== =#
151
238
239
+ """
240
+ $SIGNATURES
241
+
242
+ Least Absolute Deviation regression with with objective function
243
+
244
+ ``∑ρ(Xθ - y) + λ|θ|₂² + γ|θ|₁``
245
+
246
+ where `ρ` is the absolute loss.
247
+
248
+ See also `RobustRegressor`.
249
+ """
152
250
@with_kw_noshow mutable struct LADRegressor <: MMI.Deterministic
153
251
lambda:: Real = 1.0
154
252
gamma:: Real = 0.0
0 commit comments