Skip to content

Fit for AutoSklearn2Classifier fails whens input matrix is in CSR sparse Format #1204

@JohnnyC08

Description

@JohnnyC08

Describe the bug

When fitting a CSR matrix on the AutoSklearn2Classifier, the method fails and returns Trying to set illegal value 'gradient_boosting'

python version: 3.9
auto-sklearn version: 0.13.0

To Reproduce

Steps to reproduce the behavior:

import sklearn.datasets
from scipy import sparse
from autosklearn.experimental.askl2 import AutoSklearn2Classifier

X, y = sklearn.datasets.load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = \
    sklearn.model_selection.train_test_split(X, y, random_state=1)

X_train = sparse.csr_matrix(X_train)
automl = AutoSklearn2Classifier(
    time_left_for_this_task=120,
    per_run_time_limit=30
)
automl.fit(X_train, y_train, dataset_name='breast_cancer')

Note, the above works fine when using autosklearn.classification.AutoSklearnClassifier.

The use case for a CSR matrix is fitting text classification models after the text has been transformed into a TF-IDF format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions