Giter Club home page Giter Club logo

ordinalclassifier's People

Contributors

leeprevost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ordinalclassifier's Issues

How can I introduce class weight while fitting the estimators?

@leeprevost Thank you for creating and sharing this work with the community. I have reviewed the code and was unable to locate where I could input the binary class weights, which were calculated using the compute_sample_weight function in scikit-learn. I would appreciate any guidance you can provide on this matter.

passing binary y does not work --

File "C:\Users\lee\Dropbox\python sandbox\get_yahoo_data\models\ordinal.py", line 249, in fit
raise ValueError("This classifier expects target y to be multiclass. Got type: {}".format(self.y_type_))
ValueError: This classifier expects target y to be multiclass. Got type: binary

How to use this classifier?

Hi, how can I install this package ?

pip install OrdinalClassifier doesn't work.

Thanks in advance for your help!

Problem with lexographical sorting

I think I have a problem when I hand this classifier a y with text based classes (ie. low, medium, high). The default sorter sorts this lexographically (low, high, medium) which makes medium act like a pos class.

sklearn has some PRs for this:
#scikit-learn/scikit-learn#4450
#scikit-learn/scikit-learn#13631

Looks like I need to:

  • encode any ordinal informaiton from y
  • don't default to "sorted"
  • label binarize y and keep separate classes_ array

I already allow for custom ordering.

From testing on diabetes dataset, ordering does have a big effect on precision and recall of pos_class (ie. "high" disease progression in diabetes) so important to get this right.

LP

Pickling problem

Classifier does not pickle. Stops with error about dictionary keys.

Non default ordering of classes

Allow input to _init to allow for custom ordering of classes possibly by ordring from most important class (postive class) to least important (trivial class). For example, a three class problem where you are trying to classify stocks:

Buy
Hold
Sell

One may want high precision on "buy" class with less focus on recall. But, conversely, high recall on sell class. And less concerned with inaccurate predictions on hold class. So ordering may be:

Buy (pos class)
Sell (neg class)
Hold (neutral class)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.