leeprevost / ordinalclassifier Goto Github PK
View Code? Open in Web Editor NEWAdaptation of Simple Approach to Ordinal Classification for sklearn framework
License: MIT License
Adaptation of Simple Approach to Ordinal Classification for sklearn framework
License: MIT License
@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.
Initial version was "hard coded" around 3 class labeling of 0,1,2. Rework to generalize for class labeling.
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
Hi, how can I install this package ?
pip install OrdinalClassifier doesn't work.
Thanks in advance for your help!
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:
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
Classifier does not pickle. Stops with error about dictionary keys.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.