I feel like this would go against "explicit is better than implicit",
but without it grid search would indeed be awkward.  Maybe:

if self.alpha_coef == 'same':
    alpha_coef = self.alpha_comp

?

On Thu, Nov 7, 2013 at 4:19 PM, Mathieu Blondel <math...@mblondel.org> wrote:
>
> On Thu, Nov 7, 2013 at 11:57 PM, Lars Buitinck <larsm...@gmail.com> wrote:
>>
>> For reproducing results from literature this is useful. E.g. Hoyer
>> only regularizes one of the matrices.
>
>
> For efficient grid-search with shared values, we could do this:
>
> if self.alpha_comp is None and self.alpha_coef is None:
>     alpha_comp = alpha_coef = DEFAULT_VALUE
> elif self.alpha_comp is None:
>     alpha_comp = self.alpha_coef
> elif self.alpha_coef is None:
>    alpha_coef = self.alpha_comp
>
> This way we get the flexibility of having two hyper-parameters but still
> allow for efficient grid search with a single shared value.
>
> Mathieu
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and
> register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to