Forum

SLRM-3 Building a L...
 
Notifications
Clear all

SLRM-3 Building a Linear Regression Model  

   RSS

0

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 Ex_LinearRegression_start.py) ?

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

 

2 Answers
0

Hey @chewern.

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

Check out the GetAge() function definition too!

Screenshot   9 8 2020 , 5 11 55 AM

 

0

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?

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

Share:

Delete your account