@@ -2204,8 +2204,7 @@ def _more_tags(self):
2204
2204
2205
2205
2206
2206
class MultiTaskElasticNet (Lasso ):
2207
- """Multi-task ElasticNet model trained with L1/L2 mixed-norm as
2208
- regularizer.
2207
+ """Multi-task ElasticNet model trained with L1/L2 mixed-norm as regularizer.
2209
2208
2210
2209
The optimization objective for MultiTaskElasticNet is::
2211
2210
@@ -2313,31 +2312,31 @@ class MultiTaskElasticNet(Lasso):
2313
2312
2314
2313
.. versionadded:: 1.0
2315
2314
2316
- Examples
2317
- --------
2318
- >>> from sklearn import linear_model
2319
- >>> clf = linear_model.MultiTaskElasticNet(alpha=0.1)
2320
- >>> clf.fit([[0,0], [1, 1], [2, 2]], [[0, 0], [1, 1], [2, 2]])
2321
- MultiTaskElasticNet(alpha=0.1)
2322
- >>> print(clf.coef_)
2323
- [[0.45663524 0.45612256]
2324
- [0.45663524 0.45612256]]
2325
- >>> print(clf.intercept_)
2326
- [0.0872422 0.0872422]
2327
-
2328
2315
See Also
2329
2316
--------
2330
2317
MultiTaskElasticNetCV : Multi-task L1/L2 ElasticNet with built-in
2331
2318
cross-validation.
2332
- ElasticNet
2333
- MultiTaskLasso
2319
+ ElasticNet : Linear regression with combined L1 and L2 priors as regularizer.
2320
+ MultiTaskLasso : Multi-task L1/L2 Lasso with built-in cross-validation.
2334
2321
2335
2322
Notes
2336
2323
-----
2337
2324
The algorithm used to fit the model is coordinate descent.
2338
2325
2339
2326
To avoid unnecessary memory duplication the X and y arguments of the fit
2340
2327
method should be directly passed as Fortran-contiguous numpy arrays.
2328
+
2329
+ Examples
2330
+ --------
2331
+
7477
>>> from sklearn import linear_model
2332
+ >>> clf = linear_model.MultiTaskElasticNet(alpha=0.1)
2333
+ >>> clf.fit([[0,0], [1, 1], [2, 2]], [[0, 0], [1, 1], [2, 2]])
2334
+ MultiTaskElasticNet(alpha=0.1)
2335
+ >>> print(clf.coef_)
2336
+ [[0.45663524 0.45612256]
2337
+ [0.45663524 0.45612256]]
2338
+ >>> print(clf.intercept_)
2339
+ [0.0872422 0.0872422]
2341
2340
"""
2342
2341
2343
2342
def __init__ (
0 commit comments