Comments (5)
@RomainBrault You can use an if else statement based on the version number. I can't think of a clearner way to do it.
Thoughts @mblondel ?
from project-template.
We typically try to maintain backward compatibility for two releases so this seems like a bug.
@amueller Would it be possible to support both classes and instances for two releases?
from project-template.
From the discussion, it seems the 0.17 version is a bug and didn't work. All the checks expect a class object, not an instance.
from project-template.
@vighneshbirodkar Yes, it's what I did, but It looks a bit hackish to do it at user's level.
Anyway If I pass an instantiation of the object in 0.17, check_estimator only uses its class name. I think
it's actually useful if the check is done at the class level: one can do check_estimator(self)
instead of check_estimator(self.__class__).
However if not applying on self, the code in master looks more natural to me (no need to (default) construct the estimator). I would be in favour of supporting both.
from project-template.
In the meantime (I'm looking at current sklearn 0.19.1) check_estimator
can work with an instance or class, so this can be closed.
from project-template.
Related Issues (20)
- Clarify distinction between TemplateEstimator and TemplateClassifier HOT 2
- Migration to CircleCI 2.0
- Simplify CI template HOT 2
- Update of the documentation
- GitHub bot applying the template to the projects it is used in HOT 1
- Apply changes done on sklearn-extra here. HOT 1
- Travis CI is run on python 2.7 only HOT 1
- how to run doctests? HOT 1
- License when using this template HOT 1
- Incompatible dependencies in .travis.yml environment
- Can't import skltemplate in doc/conf.py HOT 2
- CSS broken somehow; rendering parameters doesn't work HOT 5
- Use setuptools_scm HOT 1
- Migrate to Azure pipelines for CI HOT 1
- check_estimator outside of unittests HOT 3
- There is no TemplateRegressor HOT 1
- check_estimator(...) should be passed instances in scikit-learn>=0.24 HOT 1
- Should add the package directory to `sys.path` by default
- Add _OneToOneFeatureMixin to class templates HOT 1
- Does Templates supports pandas output HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from project-template.