# TODO: Add import statements
from numpy import loadtxt
from sklearn.linear_model import Lasso

# Assign the data to predictor and outcome variables
# TODO: Load the data

train_data = loadtxt('regularization_data.csv', delimiter=',')
X = train_data[:, :-1]
y = train_data[:, -1]

# TODO: Create the linear regression model with lasso regularization.
lasso_reg = Lasso()

# TODO: Fit the model.
lasso_reg.fit(X, y)

# TODO: Retrieve and print out the coefficients from the regression model.
reg_coef = lasso_reg.coef_
print(reg_coef)