It may be useful to make subtypes of smile.feature.FeatureTransform invertible, meaning that they also support the inverse transformations.
For instance, I may be willing to scale a dataset via an instance of smile.feature.Scaler and then scale back some of its rows to the original size.
One simple solution could be to add a FeatureTransform invert() method to smile.feature.FeatureTransform returning another instance of smile.feature.FeatureTransform carrying the inverse transform:
public interface FeatureTransform extends Serializable {
double[] transform(double[] x);
default double[][] transform(double[][] data);
Tuple transform(Tuple x);
DataFrame transform(DataFrame data);
FeatureTransform invert(); // new entry here
}
This may then imply a method to be added to 4 classes, namely: MaxAbsScaler, Normalizer, Standardizer, and Scaler
It may be useful to make subtypes of
smile.feature.FeatureTransform
invertible, meaning that they also support the inverse transformations. For instance, I may be willing to scale a dataset via an instance ofsmile.feature.Scaler
and then scale back some of its rows to the original size.One simple solution could be to add a
FeatureTransform invert()
method tosmile.feature.FeatureTransform
returning another instance ofsmile.feature.FeatureTransform
carrying the inverse transform:This may then imply a method to be added to 4 classes, namely:
MaxAbsScaler
,Normalizer
,Standardizer
, andScaler