(data_instances, cols_index, summary_statistics, is_sparse)
return summary_statistics
Statics sums, sum_square, max and min value through one traversal

        Parameters
        ----------
        data_instances : Table
            The input data

        cols_index : indices
            Specify which column(s) need to apply statistic.

        summary_statistics: SummaryStatistics

        Returns
        -------
        Dict of SummaryStatistics object
Statics sums, sum_square, max and min value through one traversal
Statics sums sum_square max and min value through one traversal
def static_in_partition(data_instances, cols_index, summary_statistics, is_sparse):
        """
        Statics sums, sum_square, max and min value through one traversal

        Parameters
        ----------
        data_instances : Table
            The input data

        cols_index : indices
            Specify which column(s) need to apply statistic.

        summary_statistics: SummaryStatistics

        Returns
        -------
        Dict of SummaryStatistics object

        """

        for k, instances in data_instances:
            if not is_sparse:
                if isinstance(instances, Instance):
                    features = instances.features
                else:
                    features = instances
                    # try:
                    #     features = np.array(instances, dtype=float)
                    # except ValueError as e:
                    #     raise ValueError(f"Static Module accept numeric input only. Error info: {e}")
                # LOGGER.debug(f"In statics, features: {features}")
                row_values = [x for idx, x in enumerate(features) if idx in cols_index]
                # row_values = features[cols_index]
            else:
                sparse_data = instances.features.get_sparse_vector()
                row_values = np.array([sparse_data.get(x, 0) for x in cols_index])
            summary_statistics.add_rows(row_values)
        return summary_statistics
def static_in_partition ( data_instances , cols_index , summary_statistics , is_sparse ) : for k , instances in data_instances : if not is_sparse : if isinstance ( instances , Instance ) : features = instances . features else : features = instances # try: #     features = np.array(instances, dtype=float) # except ValueError as e: #     raise ValueError(f"Static Module accept numeric input only. Error info: {e}") # LOGGER.debug(f"In statics, features: {features}") row_values = [ x for idx , x in enumerate ( features ) if idx in cols_index ] # row_values = features[cols_index] else : sparse_data = instances . features . get_sparse_vector ( ) row_values = np . array ( [ sparse_data . get ( x , 0 ) for x in cols_index ] ) summary_statistics . add_rows ( row_values ) return summary_statistics