Skip to content

Filling missed data-points with the most common values among nearest neighbors

Notifications You must be signed in to change notification settings

HuzeyfeAyaz/Knn-Imputer-With-Hamming-Distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

KNN Imputer With Hamming Distance

Filling missed categorical data-points with the most common value among nearest neighbors using KNN-based imputation and Hamming as a distance metric.

Example Usage

from knn_imputer_with_hamming import KnnImputerWithHamming

knn_imputer = KnnImputerWithHamming(data)
knn_imputer.calculate_hamming_distance()
knn_imputer.impute_data(n=30, threshold=0.8)

print(knn_imputer.features)

*A quick solution for small datasets. But if you are working with large datasets, you are welcome to contribute and optimize the code.

About

Filling missed data-points with the most common values among nearest neighbors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages