Skip to content

Introduce order in your classification within 1 line

Notifications You must be signed in to change notification settings

mosh98/Ordinal_Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ordinal Classification/Regression

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.

How do i use it?

  1. import your favourite classifier from sklearn
  2. Insert that clf into the OrdinalClassifier
  3. Call fit and predict on your data

Here is an example: Open in Colab

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 

Please pull an issue if you find any bugs

Enjoy!!

About

Introduce order in your classification within 1 line

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published