You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main idea of this transformer is to take a continuous value and map it into a continuous + categorical value (which is represented with a one-hot-encoding). To implement this, most of the code can be taken from here, specifically the _fit_continuous, _transform_continuous, and _reverse_transform_continuous functions.
The fit method will train the BayesianGMM model. A GMM model has multiple "modes", where each "mode" is a Gaussian.
The transform method will take the raw values and will randomly select a mode (proportional to the probability of the value coming from that mode). Then, it generates a normalized version of the raw value by (approximately) subtracting/dividing by the mean/std.
The reverse_transform method will select the maximum likelihood mode and reverse the transformation.
Two things to note:
Multiple calls to fit can return different numbers of output columns. For example, in one run, it might infer 3 modes in the data, resulting in 4 output columns. In another run, if a random seed isn't set, it may infer a different number of modes.
Multiple calls to transform can generate different outputs. Although the result is always reversible, the mode is randomly selected (proportional to the likelihood).
When implementing this in RDT, we may want to allow the user to enable/disable these.
The text was updated successfully, but these errors were encountered:
The main idea of this transformer is to take a continuous value and map it into a continuous + categorical value (which is represented with a one-hot-encoding). To implement this, most of the code can be taken from here, specifically the
_fit_continuous
,_transform_continuous
, and_reverse_transform_continuous
functions.fit
method will train theBayesianGMM
model. A GMM model has multiple "modes", where each "mode" is a Gaussian.transform
method will take the raw values and will randomly select a mode (proportional to the probability of the value coming from that mode). Then, it generates a normalized version of the raw value by (approximately) subtracting/dividing by the mean/std.reverse_transform
method will select the maximum likelihood mode and reverse the transformation.Two things to note:
fit
can return different numbers of output columns. For example, in one run, it might infer 3 modes in the data, resulting in 4 output columns. In another run, if a random seed isn't set, it may infer a different number of modes.transform
can generate different outputs. Although the result is always reversible, the mode is randomly selected (proportional to the likelihood).When implementing this in RDT, we may want to allow the user to enable/disable these.
The text was updated successfully, but these errors were encountered: