New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it support Dataframe as input? #100
Comments
Yes, if you set One caveat is that you can't use In the next release |
Thanks for your help, but an error occurs even if array_check=0, it still uses ndarray [3000 rows x 6 columns], y= Res_Final_Position [3000 rows x 1 columns], idx=None, r=0) [3000 rows x 1 columns] ........................................................................... [3000 rows x 1 columns], name='view') [3000 rows x 1 columns] AttributeError: 'DataFrame' object has no attribute 'view' |
Aha! The offending line is a legacy from This works as long as Btw, to install the necessary update, do pip uninstall mlens;
git clone https://github.com/flennerhag/mlens; cd mlens;
git fetch; git checkout mmap;
pip install . This will uninstall the version you currently have and install the |
btw in the bleeding edge version |
Thanks for the help, when I tried passing in a DataFrame to it, it ran into a index error, I tried the simple example from the getting started page and simply use pd.DataFrame(X) and pd.DataFrame(y) to change the type and the [start:stop] format for indexing that DataFrame works [150 rows x 4 columns], y= 0 [150 rows x 1 columns], idx=array([ 75, 76, 77, 78, 79, 80, 81, 82, ...40, 141, 142, 143, 144, 145, 146, 147, 148, 149]), r=0) |
Sorry for the delay, the issue's been fixed. Turns out using simple slicing ( You should be able to run with dataframes both as |
In master branch as of #101. |
when the predicted and actual y is passed to the accuracy scorer, can the dataframe along with its indexes be passed or will the model simply pass a ndarray? |
if |
It seems that this still does not function. It looks like an index issue. There are some index calls not using [] instead of .loc[]. |
The estimator I am trying to fit accepts a pandas data frame as input in the fit method, using the column labels, however when using the SuperLearner, the data is converted to a numpy.ndarray when passing to the estimator's fit method, is there a way to preserve the column label data?
The text was updated successfully, but these errors were encountered: