what is the check_transformer_data_not_an_array test from sklearn's check_estimator intended to?
Scikit-learn estimators should validate X and y. This validation will convert the input X and y into a NumPy array to do the numerical operation of the estimator.
check_transformer_data_not_an_array makes sure that passing an array-like (but
not a NumPy array) is still working as if passing an array.
It basically ensures that the validation under the hood happen. The validation is done by the check_X_y class
This was actually an answer I got from one of Scikit-learn developers through the mailing list :)
I am trying to get in house made transformers pass the check_estimator tests and there is one test, that I am not too sure what it is intended for.
The transformers fail the check_transformer_data_not_an_array because the input is a _NotAnArray class, and my package transformers don't like that. The transformers are intended to work only with dataframes, and I added a workaround to transform numpy arrays into df to pass most of the check_estimators tests.
_NotAnArray is a class developed in the Scikit-learn library, which purpose I do not know. And I guess the test check_transformer_data_not_an_array also has a purpose, unbeknownst to me.
My question is:
What is check_transformer_data_not_an_array intended for? Or in other words, why is it important?
And if anybody knows as well, why the class _NotAnArray was created / needed, that would also help.
Thank you!