Feature_column_names in train() and infer() - WHY?

model.fit(X_train[feature_column_names], y_train[target_column_name])

In both, the train() and the infer() function, I see an argument called feature_column_names, which seems to be a reduced set of features. Is it compulsory/recommended to use this reduced set for consistence or something like that? Because it shows up in the starter notebook as well.

I just want to understand the rationale behind the reduced set.

This was mainly for backward compatibilities.

You have access to feature_column_names_v1 and feature_column_names_v2 (which is aliased to feature_column_names).

You are free to not use them at all!

1 Like