<div dir="auto">You can always add a first step that turns you numpy array into a DataFrame such as the one required afterwards.<div dir="auto">A bit of object oriented programming might be required though, for deriving you class from BaseTransformer and writing you particular code for fit and transform method.</div><div dir="auto">Alternatively you can try the PipeGraph library for dealing with those complex routes.<br><div dir="auto">Best</div><div dir="auto">Manuel</div><div dir="auto">Disclaimer: yes, I'm a coauthour of the PipeGraph library.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 28 jun. 2019 7:28, Roxana Danger <<a href="mailto:roxana.danger@gmail.com">roxana.danger@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I would like to use the BaggingClassifier whose base estimator is a pipeline with multiple transformations including a DataFrameMapper from sklearn_pandas.</div><div>I am getting an error during the fitting the DataFrameMapper as the first step of the BaggingClassifier is to convert the DataFrame to an array (see in <span style="color:rgb(0,0,0);font-family:Menlo;font-size:9pt">BaseBagging._fit method</span>). Similar problem happen using directly sklearn.Pipeline instead of the DataFrameMapper. in both cases, a DataFrame is expected as input, but, instead, an array is provided to the Pipeline.</div><div><br></div><div>Is there anyway I can overcome this problem?</div><div><br></div><div>Many thanks,</div><div>Roxana</div><div><br></div></div>
_______________________________________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank" rel="noreferrer">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scikit-learn</a><br>
</blockquote></div>