New York University CS-UY MISC prob_lasso_soln.
Introduction to Machine Learning
Problems: LASSO and Model Selection
Prof. Sundeep Rangan
1. Exhaustive search. In this problem, we will look at how to exhaustively search over all possible
subsets of features. You are given three python functions:
model = LinearRegression() # Create a linear regression model object
model.fit(X,y) # Fits t
...[Show More]
New York University CS-UY MISC prob_lasso_soln.
Introduction to Machine Learning
Problems: LASSO and Model Selection
Prof. Sundeep Rangan
1. Exhaustive search. In this problem, we will look at how to exhaustively search over all possible
subsets of features. You are given three python functions:
model = LinearRegression() # Create a linear regression model object
model.fit(X,y) # Fits the model
yhat = model.predict(X) # Predicts targets given features
Given training data Xtr,ytr and test data Xts,yts, write a few lines of python code to:
(a) Find the best model using only one feature of the data (i.e. one column of Xtr and Xts).
(b) Find the best model using only two features of the data (i.e. two columns of Xtr and Xts).
(c) Suppose we wish to find the best k of p features via exhaustive searching over all possible
subsets of features. How many times would you need to call the fit function? What if
k = 10 and p = 1000?
Soluti
[Show Less]