Thanks for visiting!
As you said this is a rather introductory example of Lasso and Ridge regression. Even though the article talks about regression, I would like to clarify that Ridge and Lasso should be taken as regularization techniques. For finding these hyper-parameters like alpha for Lasso, C and gamma for Support Vector Machine etc., you always use grid-search cross-validation (GridSearchCV). For finding the best alpha in Lasso you can directly use LassoCV.
The post tries to demonstrate that reducing the value of alpha is equivalent to lesser constraints on the weights. Finding the best alpha is not exactly the motive here. That’s all! Thank you for commenting.
Cheers!