(self)
return self.response
Get feature definitions for an existing model
Get feature definitions for an existing model
Get feature definitions for an existing model
def get_features(self):
        """
        Get feature definitions for an existing model
        """
        
        # Get the model from cache or disk based on the model_name in request
        self._get_model_by_name()
        
        # Prepare the output
        self.response = self.model.features_df
        self.response["sort_order"] = pd.Series([i+1 for i in range(len(self.response.index))], index=self.response.index)
        self.response = self.response[["model_name", "sort_order", "name", "variable_type", "data_type",\
                                       "feature_strategy", "strategy_args"]]
        
        # Send the reponse table description to Qlik
        self._send_table_description("features")
        
        # Debug information is printed to the terminal and logs if the paramater debug = true
        if self.model.debug:
            self._print_log(4)
        
        # Finally send the response
        return self.response
def get_features ( self ) : # Get the model from cache or disk based on the model_name in request self . _get_model_by_name ( ) # Prepare the output self . response = self . model . features_df self . response [ "sort_order" ] = pd . Series ( [ i + 1 for i in range ( len ( self . response . index ) ) ] , index = self . response . index ) self . response = self . response [ [ "model_name" , "sort_order" , "name" , "variable_type" , "data_type" , "feature_strategy" , "strategy_args" ] ] # Send the reponse table description to Qlik self . _send_table_description ( "features" ) # Debug information is printed to the terminal and logs if the paramater debug = true if self . model . debug : self . _print_log ( 4 ) # Finally send the response return self . response