Interface Transform

All Superinterfaces:
Function<Tuple,Tuple>, Serializable
All Known Subinterfaces:
InvertibleTransform
All Known Implementing Classes:
BagOfWords, ColumnTransform, GHA, InvertibleColumnTransform, KernelPCA, KMedoidsImputer, KNNImputer, Normalizer, PCA, ProbabilisticPCA, Projection, RandomProjection, SimpleImputer

public interface Transform extends Function<Tuple,Tuple>, Serializable
Data transformation interface. In general, learning algorithms benefit from standardization of the data set. If some outliers are present in the set, robust transformers are more appropriate.
  • Method Details

    • fit

      @SafeVarargs static Transform fit(DataFrame data, Function<DataFrame,Transform>... trainers)
      Fits a pipeline of data transforms.
      Parameters:
      data - the training data.
      trainers - the training algorithm to fit the transforms to apply one after one.
      Returns:
      a composed transform.
    • pipeline

      static Transform pipeline(Transform... transforms)
      Returns a pipeline of data transforms.
      Parameters:
      transforms - the transforms to apply one after one.
      Returns:
      a composed transform.
    • apply

      default DataFrame apply(DataFrame data)
      Applies this transform to the given argument.
      Parameters:
      data - the input data frame.
      Returns:
      the transformed data frame.
    • andThen

      default Transform andThen(Transform after)
      Returns a composed function that first applies this function to its input, and then applies the after function to the result.
      Parameters:
      after - the transform to apply after this transform is applied.
      Returns:
      a composed transform that first applies this transform and then applies the after transform.
    • compose

      default Transform compose(Transform before)
      Returns a composed function that first applies the before function to its input, and then applies this function to the result.
      Parameters:
      before - the transform to apply before this transform is applied.
      Returns:
      a composed transform that first applies the before transform and then applies this transform.