msmbuilder / osprey

🦅Hyperparameter optimization for machine learning pipelines 🦅
http://msmbuilder.org/osprey
Apache License 2.0
74 stars 26 forks source link

Unclear how to use custom estimator #214

Closed synapticarbors closed 7 years ago

synapticarbors commented 7 years ago

It's unclear from the documentation how one would go about using a custom estimator. Suppose I have a class that inherits from sklean.base.BaseEstimator that defines a score and fit method called MyEstimator, and it lives in mytools.osprey.myestimators. Normally it would be imported like:

from mytools.osprey.myestimators import MyEstimator`

How should I go about specifying my custom estimator in the osprey config?

synapticarbors commented 7 years ago

Never mind, I figured it out by digging in the code:

    eval: MyEstimator()
    eval_scope: mytools.osprey

osprey figures out which module the estimator lives in.