/ivdm_py

Interpolated Value Distance Metric (IVDM) for Python3

Primary LanguagePythonMIT LicenseMIT

IVDM for Python

Based on paper Improved Heterogeneous Distance Functions by D. Randall Wilson and Tony R. Martinez

Implements a Scikit-Learn interface for utilizing the IVDM (Interpolated Value Distance Metric) algorithm in Python. Calling fit() on the Estimator computes the minimum and maximum values for each feature in the training set, and sets up the conditional probability lookup table as computed via the VDM3 library

Example Usage

from ivdm_py import InterpolatedValueDistanceMetric
from sklearn.datasets import load_iris

ivdm_metric = InterpolatedValueDistanceMetric(s=10, n_neighbors=5, norm=2)

X, y = load_iris(return_X_y=True)

ivdm_metric.fit(X[:100], y[:100])

predictions = ivdm_metric.predict(X[100:])