Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sklean style api #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

mariusvniekerk
Copy link
Collaborator

Initial draft of an sklearn style api

@@ -22,7 +22,7 @@ install:
- conda info -a

# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION scipy numpy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, scikit-learn is explicitly designed in a way that you don't need to depend on it to satisfy it's API (you need to implement set_params and get_params, though that is very easy).

@amueller
Copy link

If you decide you want to depend on scikit-learn, I'd encourage you to run this function in your unit tests: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/estimator_checks.py#L219

It is new in 0.17 and checks scikit-learn compatibility.
Also see the docs here:
http://scikit-learn.org/dev/developers/contributing.html#rolling-your-own-estimator

(they also contain more details on set_params and get_params)

You could also make scikit-learn an optional dependency, so that it can be used to test compatibility but is not required by the user.

@ericdill
Copy link

@mariusvniekerk what's the status of this PR?

@mariusvniekerk
Copy link
Collaborator Author

Basically needs refactoring to be closer to Andreas' suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants