Hm, from the pipeline example in the docs, they use SelectKBest feature selection, which takes an arbitrary callable score function. When calling get_params on the overall Pipeline, it returns this callable in its original form. This complicates trying to make the mls be a nice declarative set of parameters which can be used to reconstruct the model with sklearn.
Could return some info about the callable. For example, if they are just passing in f_regression from sklearn as in the example, it would be very messy but sufficient to just spit out the source line from inspect; something like:
Hm, from the pipeline example in the docs, they use SelectKBest feature selection, which takes an arbitrary callable score function. When calling
get_params
on the overallPipeline
, it returns this callable in its original form. This complicates trying to make the mls be a nice declarative set of parameters which can be used to reconstruct the model with sklearn.Could return some info about the callable. For example, if they are just passing in
f_regression
from sklearn as in the example, it would be very messy but sufficient to just spit out the source line frominspect
; something like:@vigsterkr any thoughts?