MLS Course 2 / W3 Programming Assignment Question

Link to the classroom item: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera

Description:
In section 2.3 of the programming assignment called “Compare performance on training and test data” it mentions:
" Let’s build a high degree polynomial model to minimize training error. This will use the linear_regression functions from sklearn . The code is in the imported utility file if you would like to see the details." and the code it uses in the jupyter notebook shows:

# create a model in sklearn, train on training data
degree = 10
lmodel = lin_model(degree)
lmodel.fit(X_train, y_train)

I can’t seem to locate the function:

lin_model(degree)

within the util.py file.

Where is the function implementation located?

Start by looking at the “import” statements in the first cell of the notebook. These refer to python (.py) files. You can find them by using the File → Open menu in the notebook.

The function you’re looking for is probably in one of the imported files.

Tip: Utility files usually have the text “util” somewhere in the file name.

1 Like

Much appreciated! I found it now :+1: Thank you @TMosh

1 Like