hyperopt / hyperopt-sklearn

Hyper-parameter optimization for sklearn
hyperopt.github.io/hyperopt-sklearn
Other
1.58k stars 272 forks source link

Tuning parameters for sklearn.decomposition algorithms? #29

Open lzamparo opened 10 years ago

lzamparo commented 10 years ago

Hey,

I'd like to use this to tune the kernel parameter for k-PCA, but all the examples are for use with labeled data. How would I go about setting up hyperopt-sklearn to allow me to tune the RBF kernel parameter for kernel PCA?

I've got some labeled data that I'd like to push through a pipeline of k-PCA -> K means -> V-measure. I don't see any mention of kernel PCA in the hyperopt-sklearn repository, is it supported yet?

jaberg commented 10 years ago

The short answer is that it is not supported.

What's necessary is to

  1. refactor the estimator.pyhttps://github.com/hyperopt/hyperopt-sklearn/blob/master/hpsklearn/estimator.pyfile so that the cost function (_cost_fn) can be either classification (currently supported) or something else (e.g. V-measure).
  2. set up a search space such that all of the possible configurations lead to a V-measure score. You can see in the components.py file a number of patterns to copy, so this isn't as tricky as part (1).

On Tue, May 13, 2014 at 3:50 PM, Lee Zamparo notifications@github.comwrote:

Hey,

I'd like to use this to tune the kernel parameter for k-PCA, but all the examples are for use with labeled data. How would I go about setting up hyperopt-sklearn to allow me to tune the RBF kernel parameter for kernel PCA?

I've got some labeled data that I'd like to push through a pipeline of k-PCA -> K means -> V-measure. I don't see any mention of kernel PCA in the hyperopt-sklearn repository, is it supported yet?

— Reply to this email directly or view it on GitHubhttps://github.com/hyperopt/hyperopt-sklearn/issues/29 .

lzamparo commented 10 years ago

Ok, thanks James. I don't have time to work on this right now, as I'm working towards a deadline, but I'll keep it in mind.