Package smile.data.transform
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
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 Summary
Modifier and TypeMethodDescriptiondefault Transform
Returns a composed function that first applies this function to its input, and then applies theafter
function to the result.default DataFrame
Applies this transform to the given argument.default Transform
Returns a composed function that first applies thebefore
function to its input, and then applies this function to the result.static Transform
Fits a pipeline of data transforms.static Transform
Returns a pipeline of data transforms.
-
Method Details
-
fit
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
Returns a pipeline of data transforms.- Parameters:
transforms
- the transforms to apply one after one.- Returns:
- a composed transform.
-
apply
Applies this transform to the given argument.- Parameters:
data
- the input data frame.- Returns:
- the transformed data frame.
-
andThen
Returns a composed function that first applies this function to its input, and then applies theafter
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
Returns a composed function that first applies thebefore
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.
-