l1 and l2 regularization in scikit-learn Question Title * 1. What is overfitting? The normal state of the model training. The state of the model while predicting new values. The effect related to the poor generalization of the model. The effect related to bad fit of the model. Question Title * 2. Why do we encounter overfitting? Because of the complexity of decision boundaries learned by the model. Because of the fact that the model isn’t complex enough. Because of the big regularization effect. Because of the small number of samples in our data. Question Title * 3. What is the regularization? The technique used to accelerate training process The technique used to prevent overfitting. The technique used to prevent underfitting. The technique used to change model architecture on the fly. Question Title * 4. What is the purpose of alpha parameter in l1 and l2 regularization? It denotes the number of parameters the regularization will be applied to. It denotes the power of regularization. It denotes the width of the model. It denotes the speed of training. Question Title * 5. Suppose that you initialized a scaler = MinMaxScaler()What data should you fit a scaler on? You should fit it on validation data and then use it to scale other subsets. You should fit it on train data and then use it to scale other subsets. You should fit it on all the data and then use it to scale other subsets. You should fit it on test data and then use it to scale other subsets. Question Title * 6. How do you use an l2 regularization technique on linear regression model? Initialize LinearRegression class with parameter regularization=”l2”. Import Ridge class from sklearn.linear_model and use it. Import Lasso class from sklearn.linear_model and use it. Initialize LinearRegression class with parameter reg=”l2” Question Title * 7. How do you use an l1 regularization technique on linear regression model? Import Ridge class from sklearn.linear_model and use it. Import Lasso class from sklearn.linear_model and use it. Initialize LinearRegression class with parameter regularization=”l2”. Initialize LinearRegression class with parameter reg=”l2”. Готово