Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
When using (for example) the following transformators
This leads to an error:
But there is no equivalent for
Yes, this is a limitation of our API currently. One option is to use a parameter grid that only allows valid combinations, by using a list of parameter dicts wherein each setting is valid. A more robust forward-thinking solution might consider
With randomized search you can't encode constraints between multiple parameters, but you can use error_score=0. The function-based approach would require someone changing the n_components interface to allow it to be a function. It's not something we've generally done, so it's probably on the scale of requiring an Enhancement Proposal to suggest that this approach be used across the board. You could potentially do something hacky like inherit from TruncatedSVD and overwrite fit(X, y), such that it changes n_components depending on X.shape.…
On 31 January 2017 at 10:04, Fabian Retkowski ***@***.***> wrote: @jnothman <https://github.com/jnothman> Thank you, can you please elaborate a little bit more on the function-based approach? I am also considering to use the RandomizedSearchCV, but will probably face the same problem there, right? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8243 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEz6zL8M94v7cetnyu1-urZvHQCvUctks5rXmxkgaJpZM4Lw5tC> .