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

add dart parameter to sklearn interface #145

Merged
merged 2 commits into from
Dec 28, 2016
Merged

add dart parameter to sklearn interface #145

merged 2 commits into from
Dec 28, 2016

Conversation

wxchan
Copy link
Contributor

@wxchan wxchan commented Dec 28, 2016

@guolinke move from #140 , you can close that thread

  1. I suggest adding them one by one in the end of init
    in sklearn.base.BaseEstimator:

Notes
All estimators should specify all the parameters that can be set at the class level in their init as explicit keyword arguments (no *args or **kwargs).

  1. do we really need override get_params? I suggest move if self.nthread <= 0: params.pop('nthread', None) to fit() and delete this method.

@msftclas
Copy link

Hi @wxchan, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@guolinke
Copy link
Collaborator

@wxchan ,
for 1, it seems will have many parameters...
for 2. Have you tested to not pop nthread in get_params ? I remember it will cause error..

@wxchan
Copy link
Contributor Author

wxchan commented Dec 28, 2016

It passes the test even if I delete pop nthread. What kind of error did you meet?

@guolinke
Copy link
Collaborator

I forget the details. it seems is something like parameter xxx not found.
If it can pass the test. I think it is ok.

@wxchan
Copy link
Contributor Author

wxchan commented Dec 28, 2016

Perhaps some error in c_api already been fixed?

I think we should follow sklearn.base.BaseEstimator though there will be many parameters because it's inherited, and it can let user know where to set drop_rate etc.

@wxchan
Copy link
Contributor Author

wxchan commented Dec 28, 2016

Finished.

**kwargs won't work for RandomizedSearchCV & GridSearchCV. other_params need to specify dict of dict. I go along with sklearn.base.BaseEstimator.

I remove pop nthread for now, if there is a bug, add it under fit().

@guolinke guolinke merged commit 49178de into microsoft:master Dec 28, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants