Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.72 KB

README.md

File metadata and controls

59 lines (39 loc) · 3.72 KB

Hetero Feature Binning

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.

samples
Figure 1: Federated Feature Binning Principle

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.

Features

  1. Support Quantile Binning based on quantile summary algorithm.
  2. Support Bucket Binning.
  3. Support missing value input by ignoring them.
  4. Support sparse data format generated by dataio component.
  5. Support calculating woe and iv as well as counting positive and negative cases for each bin.
  6. Support transforming data into bin indexes.

Hetero Feature Selection

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.

Features

  1. unique_value: filter the columns if all values in this feature is the same

  2. iv_value_thres: Use information value to filter columns. Filter those columns whose iv is smaller than threshold.

  3. 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.

  4. coefficient_of_variation_value_thres: Use coefficient of variation to judge whether to filter or not.

  5. 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.

Federated Sampling

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

Feature scale is a process that scales each feature along column. The feature scale module now supports min-max scale and standard scale.

  1. 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.
  2. standard scale: standardize features by removing the mean and scaling to unit variance

OneHot Encoder

OneHot encoding is a process by which category variables are converted to binary values. The detailed info could be found in OneHot wiki