RFE complains if there's only one feature
Created by: bacalfa
I'm testing the AutoML approach of Fedot
to fit a dataset with a single feature. But I'm getting the following error:
Traceback (most recent call last):
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\fedot\core\operations\evaluation\operation_implementations\data_operations\sklearn_selectors.py", line 38, in fit
self.operation.fit(features_to_process, target)
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\feature_selection\_rfe.py", line 184, in fit
return self._fit(X, y)
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\feature_selection\_rfe.py", line 193, in _fit
X, y = self._validate_data(
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\utils\validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\utils\validation.py", line 871, in check_X_y
X = check_array(X, accept_sparse=accept_sparse,
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\utils\validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "C:\Users\username\Miniconda3\envs\myenv\lib\site-packages\sklearn\utils\validation.py", line 734, in check_array
raise ValueError("Found array with %d feature(s) (shape=%s) while"
ValueError: Found array with 1 feature(s) (shape=(11, 1)) while a minimum of 2 is required.
Is there a way around this?