Feature binning or data binning is a data pre-processing technique. It can be use to reduce the effects of minor observation errors, calculate information values and so on.
Currently, we provide quantile binning and bucket binning methods. To achieve quantile binning approach, we have used a special data structure mentioned in this paper. Feel free to check out the detail algorithm in the paper.
As for calculating the federated iv and woe values, the following figure can describe the principle properly.
As the figure shows, B party which has the data labels encrypt its labels with Addiction homomorphic encryption and then send to A. A static each bin's label sum and send back. Then B can calculate woe and iv base on the given information.
- Support Quantile Binning based on quantile summary algorithm.
- Support Bucket Binning.
- Support missing value input by ignoring them.
- Support sparse data format generated by dataio component.
- Support calculating woe and iv as well as counting positive and negative cases for each bin.
- Support transforming data into bin indexes.
Feature selection is a process that selects a subset of features for model construction. Take good advantage of feature selection can improve model performance.
In this version, we provide several filter methods for feature selection.
-
unique_value: filter the columns if all values in this feature is the same
-
iv_value_thres: Use information value to filter columns. Filter those columns whose iv is smaller than threshold.
-
iv_percentile: Use information value to filter columns. A float ratio threshold need to be provided. Pick floor(ratio * feature_num) features with higher iv. If multiple features around the threshold are same, all those columns will be keep.
-
coefficient_of_variation_value_thres: Use coefficient of variation to judge whether to filter or not.
-
outlier_cols: Filter columns whose percentile value is larger than the given threshold.
More feature selection methods will be provided. Please make suggestions by submitting an issue.
From Fate v0.2 supports sample method. Sample module supports two sample modes: Random sample mode and StratifiedSampler sample mode.
- In random mode, "downsample" and "upsample" methods are provided. Users can set the sample parameter "fractions", which is the sample ratio within data.
- In stratified mode, "downsample" and "upsample" methods are also provided. Users can set the sample parameter "fractions" too, but it should be a list of tuples in the form (label_i, ratio). Tuples in the list each specify the sample ratio of corresponding label. e.g. [(0, 1.5), (1, 2.5), (3, 3.5)]
Feature scale is a process that scales each feature along column. The feature scale module now supports min-max scale and standard scale.
- min-max scale: this estimator scales and translates each feature individually such that it is in the given range on the training set, e.g. between min and max value of each feature.
- standard scale: standardize features by removing the mean and scaling to unit variance
OneHot encoding is a process by which category variables are converted to binary values. The detailed info could be found in OneHot wiki