SLRM-3 Building a L...
Clear all

SLRM-3 Building a Linear Regression Model  



Hi under AI4I Batch 4, exercise Regression: SLRM-3 Building a Linear Regression Model, may I know if i have correctly filled up the preprocess code (line 89 to 91 of file ?

preprocess = make_column_transformer((GetAge(),['YearBuilt']), (StandardScaler(),numerical_features), (OneHotEncoder(),categorical_features))


2 Answers

Hey @chewern.

You can see the suggested solution in the file under the Solutions folder.

Check out the GetAge() function definition too!

Screenshot   9 8 2020 , 5 11 55 AM



Hi Yi Sheng,

Thank you for your reply. I was puzzled by the solution provided because the function GetAge() seemed to be applied across all numerical features, which should not be the case. Hence I wanted to check if my code that restricts GetAge() to 'YearBuilt' is correct?

GetAge() is restricted to 'YearBuilt' in the provided solution too! It is defined in the GetAge definition.


Delete your account