(self, method_results)
Calculate summary of a method.

        Parameters
        ----------
        method_results: list
            A list of StateIO object that contains experiment results of a method.
Calculate summary of a method.
Calculate summary of a method .
def stateio_summary(self, method_results):
        """Calculate summary of a method.

        Parameters
        ----------
        method_results: list
            A list of StateIO object that contains experiment results of a method.
        """
        # examine the AlExperiment object
        if not np.all([sio.check_batch_size() for sio in method_results]):
            # warnings.warn('Checking validity fails, different batch size is found.',
            #               category=ValidityWarning)
            self.batch_flag = False
        else:
            bs = np.unique([sio.batch_size for sio in method_results])
            if len(bs) == 1:
                self.batch_flag = True
                self.batch_size = bs[0]

        result_len = [len(sio) for sio in method_results]
        # if len(np.unique(result_len))!=1:
        #     warnings.warn('Checking validity fails, different length of folds is found.',
        #                   category=ValidityWarning)
        self.effective_length = np.min(result_len)

        # get matrix
        ex_data = []
        for result in method_results:
            self.ip = result.initial_point
            one_fold_perf = [result[i].get_value('performance') for i in range(self.effective_length)]
            one_fold_cost = [result[i].get_value('cost') if 'cost' in result[i].keys() else 0 for i in
                             range(self.effective_length)]
            self.cost_inall.append(one_fold_cost)
            if self.ip is not None:
                one_fold_perf.insert(0, self.ip)
            ex_data.append(one_fold_perf)
        mean_ex = np.mean(ex_data, axis=1)
        self.mean = np.mean(mean_ex)
        self.std = np.std(mean_ex)
def stateio_summary ( self , method_results ) : # examine the AlExperiment object if not np . all ( [ sio . check_batch_size ( ) for sio in method_results ] ) : # warnings.warn('Checking validity fails, different batch size is found.', #               category=ValidityWarning) self . batch_flag = False else : bs = np . unique ( [ sio . batch_size for sio in method_results ] ) if len ( bs ) == 1 : self . batch_flag = True self . batch_size = bs [ 0 ] result_len = [ len ( sio ) for sio in method_results ] # if len(np.unique(result_len))!=1: #     warnings.warn('Checking validity fails, different length of folds is found.', #                   category=ValidityWarning) self . effective_length = np . min ( result_len ) # get matrix ex_data = [ ] for result in method_results : self . ip = result . initial_point one_fold_perf = [ result [ i ] . get_value ( 'performance' ) for i in range ( self . effective_length ) ] one_fold_cost = [ result [ i ] . get_value ( 'cost' ) if 'cost' in result [ i ] . keys ( ) else 0 for i in range ( self . effective_length ) ] self . cost_inall . append ( one_fold_cost ) if self . ip is not None : one_fold_perf . insert ( 0 , self . ip ) ex_data . append ( one_fold_perf ) mean_ex = np . mean ( ex_data , axis = 1 ) self . mean = np . mean ( mean_ex ) self . std = np . std ( mean_ex )