Turn your favourite classifier into an ordinal classifier.
Ordinal classification packages where every sklearn classifier is supported.
You need to have more than 2 labels for your features obviously!
The classification is based upon this paper over here:
[1] https://dl.acm.org/doi/10.1007/3-540-44795-4_13
!git clone https://github.com/mosh98/Ordinal_Classifier.git
wait! i havent deployed to pypi yet, will do it when i feel like it.
- import your favourite classifier from sklearn
- Insert that clf into the OrdinalClassifier
- Call fit and predict on your data
from Ordinal_Classifier import Ordinal_Classifier as OC
from sklearn.tree import DecisionTreeClassifier
clf = OC.OrdinalClassifier(DecisionTreeClassifier())
clf.fit(X_train, y_train)
predictions = clf.predict(X_test)
# TADA! You just became a regression master!
# By exploting an unemployed engineer. Remember that when you sleep