nerdexam
Databricks

DATABRICKS-CERTIFIED-PROFESSIONAL-DATA-SCIENTIST · Question #109

What is the considerable difference between L1 and L2 regularization?

The correct answer is B. Size of the model can be much smaller in L1 regularization than that produced by L2-regularization. The two most common regularization methods are called L1 and L2 regularization. L1 regularization penalizes the weight vector for its L1-norm (i.e. the sum of the absolute values of the weights), whereas L2 regularization uses its L2-norm. There is usually not a considerable…

Machine Learning Algorithms

Question

What is the considerable difference between L1 and L2 regularization?

Options

  • AL1 regularization has more accuracy of the resulting model
  • BSize of the model can be much smaller in L1 regularization than that produced by L2-regularization
  • CL2-regularization can be of vital importance when the application is deployed in resource-tight
  • DAll of the above are correct

How the community answered

(22 responses)
  • A
    9% (2)
  • B
    86% (19)
  • D
    5% (1)

Explanation

The two most common regularization methods are called L1 and L2 regularization. L1 regularization penalizes the weight vector for its L1-norm (i.e. the sum of the absolute values of the weights), whereas L2 regularization uses its L2-norm. There is usually not a considerable difference between the two methods in terms of the accuracy of the resulting model (Gao et al 2007), but L1 regularization has a significant advantage in practice. Because many of the weights of the features become zero as a result of L1-regularized training, the size of the model can be much smaller than that produced by L2-regularization. Compact models require less space on memory and storage, and enable the application to start up quickly. These merits can be of vital importance when the application is deployed in resource-tight environments such as cell-phones. Regularization works by adding the penalty associated with the coefficient values to the error of the hypothesis. This way, an accurate hypothesis with unlikely coefficients would be penalized whila a somewhat less accurate but more conservative hypothesis with low coefficients would not be penalized as much.

Topics

#L1 regularization#L2 regularization#model size#sparsity

Community Discussion

No community discussion yet for this question.

Full DATABRICKS-CERTIFIED-PROFESSIONAL-DATA-SCIENTIST Practice