FAIL on Q3 and Q4

image

I’m getting FAIL for the Q3 and Q4.
However, my outputs for the input_cols and categorical_cols are list of strings only and with the correct column names.

input_cols:
image
image
image

categorical_cols:
image
image

Can someone please help me? I’m not getting where I’m going wrong.
Any help is appreciated!
Thanks

How did you generate your list of input_cols? Did you remember to exclude columns ‘Id’ and ‘SalePrice’? input_cols must include ALL columns except ‘Id’ and ‘SalePrice’

My input_cols is
[‘MSSubClass’, ‘MSZoning’, ‘LotFrontage’, ‘LotArea’, ‘Street’, ‘Alley’, ‘LotShape’, ‘LandContour’, ‘Utilities’, ‘LotConfig’, ‘LandSlope’, ‘Neighborhood’, ‘Condition1’, ‘Condition2’, ‘BldgType’, ‘HouseStyle’, ‘OverallQual’, ‘OverallCond’, ‘YearBuilt’, ‘YearRemodAdd’, ‘RoofStyle’, ‘RoofMatl’, ‘Exterior1st’, ‘Exterior2nd’, ‘MasVnrType’, ‘MasVnrArea’, ‘ExterQual’, ‘ExterCond’, ‘Foundation’, ‘BsmtQual’, ‘BsmtCond’, ‘BsmtExposure’, ‘BsmtFinType1’, ‘BsmtFinSF1’, ‘BsmtFinType2’, ‘BsmtFinSF2’, ‘BsmtUnfSF’, ‘TotalBsmtSF’, ‘Heating’, ‘HeatingQC’, ‘CentralAir’, ‘Electrical’, ‘1stFlrSF’, ‘2ndFlrSF’, ‘LowQualFinSF’, ‘GrLivArea’, ‘BsmtFullBath’, ‘BsmtHalfBath’, ‘FullBath’, ‘HalfBath’, ‘BedroomAbvGr’, ‘KitchenAbvGr’, ‘KitchenQual’, ‘TotRmsAbvGrd’, ‘Functional’, ‘Fireplaces’, ‘FireplaceQu’, ‘GarageType’, ‘GarageYrBlt’, ‘GarageFinish’, ‘GarageCars’, ‘GarageArea’, ‘GarageQual’, ‘GarageCond’, ‘PavedDrive’, ‘WoodDeckSF’, ‘OpenPorchSF’, ‘EnclosedPorch’, ‘3SsnPorch’, ‘ScreenPorch’, ‘PoolArea’, ‘PoolQC’, ‘Fence’, ‘MiscFeature’, ‘MiscVal’, ‘MoSold’, ‘YrSold’, ‘SaleType’, ‘SaleCondition’]

@drbazpython
Yes I removed the colums ‘Id’ and ‘SalePrice’.
image

See initially there were 81 columns and now after removing those 2, it’s 79

For further insight, below is the code:
input_cols:

[‘1stFlrSF’,
‘2ndFlrSF’,
‘3SsnPorch’,
‘Alley’,
‘BedroomAbvGr’,
‘BldgType’,
‘BsmtCond’,
‘BsmtExposure’,
‘BsmtFinSF1’,
‘BsmtFinSF2’,
‘BsmtFinType1’,
‘BsmtFinType2’,
‘BsmtFullBath’,
‘BsmtHalfBath’,
‘BsmtQual’,
‘BsmtUnfSF’,
‘CentralAir’,
‘Condition1’,
‘Condition2’,
‘Electrical’,
‘EnclosedPorch’,
‘ExterCond’,
‘ExterQual’,
‘Exterior1st’,
‘Exterior2nd’,
‘Fence’,
‘FireplaceQu’,
‘Fireplaces’,
‘Foundation’,
‘FullBath’,
‘Functional’,
‘GarageArea’,
‘GarageCars’,
‘GarageCond’,
‘GarageFinish’,
‘GarageQual’,
‘GarageType’,
‘GarageYrBlt’,
‘GrLivArea’,
‘HalfBath’,
‘Heating’,
‘HeatingQC’,
‘HouseStyle’,
‘KitchenAbvGr’,
‘KitchenQual’,
‘LandContour’,
‘LandSlope’,
‘LotArea’,
‘LotConfig’,
‘LotFrontage’,
‘LotShape’,
‘LowQualFinSF’,
‘MSSubClass’,
‘MSZoning’,
‘MasVnrArea’,
‘MasVnrType’,
‘MiscFeature’,
‘MiscVal’,
‘MoSold’,
‘Neighborhood’,
‘OpenPorchSF’,
‘OverallCond’,
‘OverallQual’,
‘PavedDrive’,
‘PoolArea’,
‘PoolQC’,
‘RoofMatl’,
‘RoofStyle’,
‘SaleCondition’,
‘SaleType’,
‘ScreenPorch’,
‘Street’,
‘TotRmsAbvGrd’,
‘TotalBsmtSF’,
‘Utilities’,
‘WoodDeckSF’,
‘YearBuilt’,
‘YearRemodAdd’,
‘YrSold’]
categorical_cols

There seems to be quite a difference between your input_cols column names and my names.
If you’d like to post a link to your notebook, perhaps we can see what dataset your using and how you’ve processed it.

@fenilshah78
Hi Fenil Shah,
You need to put False in the sort argument (sort=False):
input_cols = prices_df.columns.difference([‘Id’, ‘SalePrice’], sort=False).values.tolist()

You can use:
input_cols1 = prices_df.columns.difference([‘Id’, ‘SalePrice’], sort=False)
OR
input_cols = list(prices_df.columns[1:-1])

1 Like

@ntkn76 The evaluation script has been updated you probably won’t need to sort the values for input_cols anymore. @fenilshah78 You should have received a PASS grade now, please check.

2 Likes

Yep Got it. Thankss!

1 Like