we can clearly see from this output that we have total of five features including the new interaction features we can see the degree of each feature in the matrixusing the following snippet in [ ]pd dataframe(pf powers_columns=['attack_degree''defense_degree']out[ ]attack_degree defense_degree now that we know what each feature actually represented from the degrees depictedwe can assign name to each feature as follows to get the updated feature set in [ ]intr_features pd dataframe(rescolumns=['attack''defense''attack^ ''attack defense''defense^ ']intr_features head( out[ ]attack defense attack^ attack defense defense^ thus we can see our original and interaction features in figure - the fit_transformapi function from scikit-learn is useful to build feature engineering representation object on the training datawhich can be reused on new data during model predictions by calling on the transformfunction let' take some sample new observations for pokemon attack and defense features and try to transform them using this same mechanism in [ ]new_df pd dataframe([[ ],[ ][ ]]columns=['attack''defense']new_df out[ ]attack defense we can now use the pf object that we created earlier and transform these input features to give us the interaction features as follows in [ ]new_res pf transform(new_dfnew_intr_features pd dataframe(new_rescolumns=['attack''defense''attack^ ''attack defense''defense^ ']new_intr_features out[ ]