/ulda-Py

Python package for ULDA (Uncorrelated Linear Discriminant Analysis)

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

ulda

Python Version

Uncorrelated Linear Discriminant Analysis (ULDA), modified based on Ye, J., & Yu, B. (2005).

Features

  • Provide a more robust LDA module compared to one in sklearn, especially when handling perfect separation in high-dimensional data.
  • Faster performance.

Installation

pip install ulda

Example

import numpy as np
from ulda import ULDA
X = np.array([[0, 0], [0,1], [1, 1], [1, 2], [2, 2], [2, 3]])
y = np.array(['A', 'A', 'B', 'B', 'C', 'C'])
lda = ULDA()
lda.fit(X, y)
print(lda.predict([[1, 3]]))