Welcome to DistClassiPy’s documentation!#
DistClassiPy is a Python package for a distance-based classifier which can use several different distance metrics.
Installation#
To install DistClassiPy, run the following command:
pip install distclassipy
Usage#
Here’s a quick example to get you started with DistClassiPy:
import distclassipy as dcpy
from sklearn.datasets import make_classification
X, y = make_classification(
n_samples=1000,
n_features=4,
n_informative=2,
n_redundant=0,
random_state=0,
shuffle=False,
)
clf = dcpy.DistanceMetricClassifier(metric="canberra")
clf.fit(X, y)
print(clf.predict([[0, 0, 0, 0]]))
Features#
Multiple distance metrics support
Easy integration with existing data processing pipelines
Efficient and scalable for large datasets