You can always add a first step that turns you numpy array into a DataFrame such as the one required afterwards. 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. Alternatively you can try the PipeGraph library for dealing with those complex routes. Best Manuel Disclaimer: yes, I'm a coauthour of the PipeGraph library.
El vie., 28 jun. 2019 7:28, Roxana Danger <roxana.dan...@gmail.com> escribió: > Hello, > I would like to use the BaggingClassifier whose base estimator is a > pipeline with multiple transformations including a DataFrameMapper from > sklearn_pandas. > 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 BaseBagging._fit method). 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. > > Is there anyway I can overcome this problem? > > Many thanks, > Roxana > > _______________________________________________ > scikit-learn mailing list > scikit-learn@python.org > https://mail.python.org/mailman/listinfo/scikit-learn >
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn