House Prices SOM
House Prices SOM#
We already used regression techniques to predict house prices. Now it’s time to visualize the underlying data set using SOMs.
Task: Load the preprocessed German housing data set generated in Worked Example: House Prices I. Convert categorical features to numeric features. For one hot encoding use as many code features as there are categories (do not drop one of them). Why?
# your solution
Task: Create a list of feature names, which we will use below to label plots. Create a NumPy array holding the data set.
# your solution
Task: Train a SOM on the data. Don’t forget to standardize data.
# your solution
Task: Plot the U-matrix.
# your solution
Task: Visualize each (high dimensional) feature in 2d. Arrange all plots in a 4 by 6 grid.
# your solution
Task: Create a new sample and get its position (best matching unit) in the SOM. Show corresponding activation map and mark the best matching unit in the map.
# your solution