features.build_features

Functions

add_extra_features(X[, add_bedrooms_per_room]) Adds extra features to data sets.
get_indices([filename]) Retrieves incdices from selected columns.
features.build_features.get_indices(filename='data/raw/housing.csv')[source]

Retrieves incdices from selected columns.

Function loads the first row csv, then converts labels to list. Finally retreives column index from name.

Parameters:filename (string (optional)) – data location
Returns:list with indices
Return type:list
features.build_features.add_extra_features(X, add_bedrooms_per_room=True)[source]

Adds extra features to data sets.

If boolean is true adds bedrooms per room column. Also adds rooms_per_household and population_per_household columns.

Parameters:
  • X (numpy.Array) – dataframe to modify
  • column_name (string (optional)) – column containing hourly data
Returns:

X – transformed array .

Return type:

numpy.Array