(self)
return self.response
Get the best parameters for the model based on the grid search cross validation
Get the best parameters for the model based on the grid search cross validation
Get the best parameters for the model based on the grid search cross validation
def get_best_params(self):
        """
        Get the best parameters for the model based on the grid search cross validation 
        """
        
        # Get the model from cache or disk based on the model_name in request
        self._get_model_by_name()
        
        try:
            # Prepare the response
            self.response = pd.DataFrame([[self.model.name, utils.dict_to_sse_arg(self.model.best_params)]])
        except AttributeError:
            err = "Best parameters are not available as a parameter grid was not provided for cross validation."
            raise Exception(err)
        
        # Send the reponse table description to Qlik
        self._send_table_description("best_params")
        
        # 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_best_params ( self ) : # Get the model from cache or disk based on the model_name in request self . _get_model_by_name ( ) try : # Prepare the response self . response = pd . DataFrame ( [ [ self . model . name , utils . dict_to_sse_arg ( self . model . best_params ) ] ] ) except AttributeError : err = "Best parameters are not available as a parameter grid was not provided for cross validation." raise Exception ( err ) # Send the reponse table description to Qlik self . _send_table_description ( "best_params" ) # 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