Class KMedoidsImputer
java.lang.Object
smile.feature.imputation.KMedoidsImputer
- All Implemented Interfaces:
Serializable, Function<Tuple,Tuple>, Transform
Missing value imputation by K-Medoids clustering. The k-medoids algorithm
is an adaptation of the k-means algorithm. Rather than calculate the mean
of the items in each cluster, a representative item, or medoid, is chosen
for each cluster at each iteration. The missing values of an instance are
replaced the corresponding ones of the nearest medoid.
- See Also:
-
Constructor Details
-
KMedoidsImputer
Constructor.- Parameters:
kmedoids- the K-Medoids clustering.
-
-
Method Details
-
apply
-
fit
Fits the missing value imputation values.- Parameters:
data- the training data.distance- the lambda of distance measure.k- the number of clusters.- Returns:
- the imputer.
-