(self, performance_metric='accuracy_score', **kwargs)
Set the metric for experiment.

        Parameters
        ------------
        performace_metric: str 
            The query performance-metric function.
            Giving str to use a pre-defined performance-metric.
            
        kwargs: dict, optional
            The args used in performance-metric.
            if kwargs is None,the pre-defined performance will init in the default way.
             (See the default way of pre-defined query strategy in the alipy/metric/'performance').
            Note that, each parameters should be static.
Set the metric for experiment.
Set the metric for experiment .
def set_performance_metric(self, performance_metric='accuracy_score', **kwargs):
        """
        Set the metric for experiment.

        Parameters
        ------------
        performace_metric: str 
            The query performance-metric function.
            Giving str to use a pre-defined performance-metric.
            
        kwargs: dict, optional
            The args used in performance-metric.
            if kwargs is None,the pre-defined performance will init in the default way.
             (See the default way of pre-defined query strategy in the alipy/metric/'performance').
            Note that, each parameters should be static.
                
        """
        if performance_metric not in ['accuracy_score', 'roc_auc_score', 'get_fps_tps_thresholds', 'hamming_loss',
                                      'one_error', 'coverage_error',
                                      'label_ranking_loss', 'label_ranking_average_precision_score', 'zero_one_loss']:
            raise NotImplementedError('Performance {} is not implemented.'.format(str(performance_metric)))

        self._performance_metric_name = performance_metric
        self._performance_metric = getattr(performance, performance_metric)
        self._metrics = True
def set_performance_metric ( self , performance_metric = 'accuracy_score' , * * kwargs ) : if performance_metric not in [ 'accuracy_score' , 'roc_auc_score' , 'get_fps_tps_thresholds' , 'hamming_loss' , 'one_error' , 'coverage_error' , 'label_ranking_loss' , 'label_ranking_average_precision_score' , 'zero_one_loss' ] : raise NotImplementedError ( 'Performance {} is not implemented.' . format ( str ( performance_metric ) ) ) self . _performance_metric_name = performance_metric self . _performance_metric = getattr ( performance , performance_metric ) self . _metrics = True