(self, data_instances, split_points,
                     labels=None, label_counts=None, bin_cols_map=None,
                     label_table=None)
return multi_bin_res
data_bin_table : Table.

            Each element represent for the corresponding bin number this feature belongs to.
            e.g. it could be:
            [{'x1': 1, 'x2': 5, 'x3': 2}
            ...
             ]
        Returns:
            MultiClassBinResult object
data_bin_table : Table.
data_bin_table : Table .
def cal_local_iv(self, data_instances, split_points,
                     labels=None, label_counts=None, bin_cols_map=None,
                     label_table=None):
        """
        data_bin_table : Table.

            Each element represent for the corresponding bin number this feature belongs to.
            e.g. it could be:
            [{'x1': 1, 'x2': 5, 'x3': 2}
            ...
             ]
        Returns:
            MultiClassBinResult object
        """
        header = data_instances.schema.get("header")
        if bin_cols_map is None:
            bin_cols_map = {name: idx for idx, name in enumerate(header)}
            bin_indexes = [idx for idx, _ in enumerate(header)]
        else:
            bin_indexes = []
            for h in header:
                if h in bin_cols_map:
                    bin_indexes.append(bin_cols_map[h])
        if label_counts is None:
            label_counts = data_overview.get_label_count(data_instances)
            labels = list(label_counts.keys())
            label_counts = [label_counts[k] for k in labels]

        data_bin_table = BaseBinning.get_data_bin(data_instances, split_points, bin_cols_map)
        sparse_bin_points = BaseBinning.get_sparse_bin(bin_indexes, split_points, header)
        sparse_bin_points = {header[k]: v for k, v in sparse_bin_points.items()}

        if label_table is None:
            label_table = self.convert_label(data_instances, labels)

        result_counts = self.cal_bin_label(data_bin_table, sparse_bin_points, label_table, label_counts)
        multi_bin_res = self.cal_iv_from_counts(result_counts, labels,
                                                role=self.role,
                                                party_id=self.party_id)
        for col_name, sp in split_points.items():
            multi_bin_res.put_col_split_points(col_name, sp)
        return multi_bin_res
def cal_local_iv ( self , data_instances , split_points , labels = None , label_counts = None , bin_cols_map = None , label_table = None ) : header = data_instances . schema . get ( "header" ) if bin_cols_map is None : bin_cols_map = { name : idx for idx , name in enumerate ( header ) } bin_indexes = [ idx for idx , _ in enumerate ( header ) ] else : bin_indexes = [ ] for h in header : if h in bin_cols_map : bin_indexes . append ( bin_cols_map [ h ] ) if label_counts is None : label_counts = data_overview . get_label_count ( data_instances ) labels = list ( label_counts . keys ( ) ) label_counts = [ label_counts [ k ] for k in labels ] data_bin_table = BaseBinning . get_data_bin ( data_instances , split_points , bin_cols_map ) sparse_bin_points = BaseBinning . get_sparse_bin ( bin_indexes , split_points , header ) sparse_bin_points = { header [ k ] : v for k , v in sparse_bin_points . items ( ) } if label_table is None : label_table = self . convert_label ( data_instances , labels ) result_counts = self . cal_bin_label ( data_bin_table , sparse_bin_points , label_table , label_counts ) multi_bin_res = self . cal_iv_from_counts ( result_counts , labels , role = self . role , party_id = self . party_id ) for col_name , sp in split_points . items ( ) : multi_bin_res . put_col_split_points ( col_name , sp ) return multi_bin_res