当我们有多个目标时,sklearn中套索的目标函数是什么?

2024-06-03 17:34:16 发布

您现在位置:Python中文网/ 问答频道 /正文

在sklearn的documentation中,它说

The optimization objective for Lasso is:
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1

我想知道如果y的形状是(n_targets, n_features),那么||w||_1的定义是什么,在这种情况下w的形状是(n_features, n_targets)


Tags: thealphafor定义isdocumentationsklearnfeatures